config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/innodb/t/partition-upgrade.test

# Can't run test of external client with embedded server
--source include/not_embedded.inc
--source include/have_innodb.inc

let $MYSQLD_DATADIR=`SELECT @@datadir`;
let PATH_TO_TABLE=$MYSQLD_DATADIR/test/t575;
let FILE_LIST_PATTERN=$MYSQLD_DATADIR/test/t575*ibd;

--source include/create_575_part_table.inc

--source include/get_frm_info.inc
SHOW CREATE TABLE t575;
--echo # File list of test/t575*
--replace_result #p# #P# #sp# #SP#
--list_files $MYSQLD_DATADIR/test t575*

--echo # Flush the table data files
FLUSH TABLE t575 FOR EXPORT;
--source include/get_frm_info.inc
let LIST_OUT_FILE=$MYSQLD_DATADIR/test/list_t575_1.txt;
--source include/list_files_with_size_and_hash.inc
UNLOCK TABLES;

SHOW CREATE TABLE t575;

--enable_info
CHECK TABLE t575;
CHECK TABLE t575 FOR UPGRADE;
CHECK TABLE t575;
ALTER TABLE t575 UPGRADE PARTITIONING;
ALTER TABLE t575 UPGRADE PARTITIONING;

--echo # Flush the table data files
FLUSH TABLE t575 FOR EXPORT;
let LIST_OUT_FILE=$MYSQLD_DATADIR/test/list_t575_2.txt;
--source include/list_files_with_size_and_hash.inc
--diff_files $MYSQLD_DATADIR/test/list_t575_1.txt $MYSQLD_DATADIR/test/list_t575_2.txt
UNLOCK TABLES;

--echo # Test mysql_upgrade
--echo # First with the already upgraded table
--exec $MYSQL_UPGRADE --skip-verbose --skip-version-check --skip-sys-schema --skip-upgrade-system-tables --force 2>&1

--echo # Flush the table data files
FLUSH TABLE t575 FOR EXPORT;
--source include/get_frm_info.inc
let LIST_OUT_FILE=$MYSQLD_DATADIR/test/list_t575_3.txt;
--source include/list_files_with_size_and_hash.inc
--diff_files $MYSQLD_DATADIR/test/list_t575_2.txt $MYSQLD_DATADIR/test/list_t575_3.txt
SHOW CREATE TABLE t575;
UNLOCK TABLES;

--echo # Flush out the old table definition
FLUSH TABLE t575;

--echo # Replace the .frm and copy a .par file, so it is the same as a 5.7.5
--echo # table. InnoDB internals is the same.
--remove_file $MYSQLD_DATADIR/test/t575.frm
--copy_file std_data/parts/t575.frm $MYSQLD_DATADIR/test/t575.frm
--copy_file std_data/parts/t575.par $MYSQLD_DATADIR/test/t575.par

--source include/get_frm_info.inc
SHOW CREATE TABLE t575;

--echo # Then with 5.7.5 version of .frm and .par files
--exec $MYSQL_UPGRADE --skip-verbose --skip-version-check --skip-sys-schema --skip-upgrade-system-tables --force 2>&1

--echo # Flush the table data files
FLUSH TABLE t575 FOR EXPORT;
--source include/get_frm_info.inc
let LIST_OUT_FILE=$MYSQLD_DATADIR/test/list_t575_4.txt;
--source include/list_files_with_size_and_hash.inc
--diff_files $MYSQLD_DATADIR/test/list_t575_3.txt $MYSQLD_DATADIR/test/list_t575_4.txt
SHOW CREATE TABLE t575;
UNLOCK TABLES;

--echo # Verify that ALTER TABLE would change the file digest hash
ALTER TABLE t575 ENGINE = INNODB, ALGORITHM = COPY;

--echo # Flush the table data files
FLUSH TABLE t575 FOR EXPORT;
--source include/get_frm_info.inc
let LIST_OUT_FILE=$MYSQLD_DATADIR/test/list_t575_5.txt;
--source include/list_files_with_size_and_hash.inc
# Expect it to be different
--error 1
--diff_files $MYSQLD_DATADIR/test/list_t575_4.txt $MYSQLD_DATADIR/test/list_t575_5.txt
UNLOCK TABLES;

SHOW CREATE TABLE t575;

DROP TABLE t575;

--source include/create_575_part_table.inc
--error ER_PARSE_ERROR
ALTER TABLE t575 COMMENT = 'test' UPGRADE PARTITIONING;
--error ER_PARSE_ERROR
ALTER TABLE t575 UPGRADE PARTITIONING COMMENT = 'test';

--echo # Test that all ALTER that modify the .frm contents also updates to
--echo # native partitioning. (I.e. all ALTER except empty, RENAME and
--echo # ENABLE/DISABLE KEYS)
ALTER TABLE t575 ALGORITHM = INPLACE;
--source include/get_frm_info.inc

ALTER TABLE t575 ALGORITHM = DEFAULT;
--source include/get_frm_info.inc

ALTER TABLE t575;
--source include/get_frm_info.inc

ALTER TABLE t575 ALGORITHM = COPY;
--source include/get_frm_info.inc
DROP TABLE t575;

--source include/create_575_part_table.inc
ALTER TABLE t575 RENAME TO t1;
let PATH_TO_TABLE=$MYSQLD_DATADIR/test/t1;
--source include/get_frm_info.inc

ALTER TABLE t1 RENAME TO t575, ALGORITHM = INPLACE;
let PATH_TO_TABLE=$MYSQLD_DATADIR/test/t575;
--source include/get_frm_info.inc

ALTER TABLE t575 RENAME TO t1, ALGORITHM = DEFAULT;
let PATH_TO_TABLE=$MYSQLD_DATADIR/test/t1;
--source include/get_frm_info.inc

ALTER TABLE t1 RENAME TO t575, ALGORITHM = COPY;
let PATH_TO_TABLE=$MYSQLD_DATADIR/test/t575;
--source include/get_frm_info.inc
DROP TABLE t575;

--source include/create_575_part_table.inc

ALTER TABLE t575 DISABLE KEYS, ALGORITHM = INPLACE;
--source include/get_frm_info.inc
ALTER TABLE t575 ENABLE KEYS, ALGORITHM = DEFAULT;
--source include/get_frm_info.inc
ALTER TABLE t575 DISABLE KEYS;
--source include/get_frm_info.inc

--replace_regex /'#sql-[0-9a-f_]*'/'#sql-nnnn_n'/
ALTER TABLE t575 ENABLE KEYS, ALGORITHM = COPY;
--source include/get_frm_info.inc
DROP TABLE t575;

--echo # Forced ALTER must do a rebuilt
--source include/create_575_part_table.inc
--echo # Flush the table data files
FLUSH TABLE t575 FOR EXPORT;
--source include/get_frm_info.inc
--remove_files_wildcard $MYSQLD_DATADIR/test list_t575*.txt
let LIST_OUT_FILE=$MYSQLD_DATADIR/test/list_t575_1.txt;
--source include/list_files_with_size_and_hash.inc
UNLOCK TABLES;
ALTER TABLE t575 ENGINE = InnoDB;
--echo # Flush the table data files
FLUSH TABLE t575 FOR EXPORT;
--source include/get_frm_info.inc
let LIST_OUT_FILE=$MYSQLD_DATADIR/test/list_t575_2.txt;
--source include/list_files_with_size_and_hash.inc
UNLOCK TABLES;
--error 1
--diff_files $MYSQLD_DATADIR/test/list_t575_1.txt $MYSQLD_DATADIR/test/list_t575_2.txt
DROP TABLE t575;

--echo # ALTER PARTITION will also upgrade the table to native partitioning!
--source include/create_575_part_table.inc
ALTER TABLE t575 REORGANIZE PARTITION pmax INTO
(PARTITION p2 VALUES LESS THAN (300),
 PARTITION pmax VALUES LESS THAN MAXVALUE);
--source include/get_frm_info.inc
SHOW CREATE TABLE t575;
DROP TABLE t575;

--source include/create_575_part_table.inc
--echo # changing comment is default INPLACE with ha_innopart!
ALTER TABLE t575 COMMENT = 'test comment';
--source include/get_frm_info.inc
SHOW CREATE TABLE t575;
DROP TABLE t575;

--echo # NOTICE that REPAIR/ANALYZE does not upgrade the table!
--source include/create_575_part_table.inc
REPAIR TABLE t575;
--source include/get_frm_info.inc
--disable_info
SHOW CREATE TABLE t575;
--echo # File list of test/t575*
--replace_result #p# #P# #sp# #SP#
--list_files $MYSQLD_DATADIR/test t575*
ANALYZE TABLE t575;
--source include/get_frm_info.inc
--echo # But OPTIMIZE does upgrade to native partitioning!
OPTIMIZE TABLE t575;
--source include/get_frm_info.inc
DROP TABLE t575;

--source include/create_575_part_table.inc
--source include/get_frm_info.inc
--enable_info
ALTER TABLE t575 MODIFY b varchar(65), ALGORITHM = INPLACE;
--disable_info
--source include/get_frm_info.inc
DROP TABLE t575;

--source include/create_575_part_table.inc
--source include/get_frm_info.inc
--enable_info
ALTER TABLE t575 change b c varchar(65);
--disable_info
--source include/get_frm_info.inc
DROP TABLE t575;

--source include/create_575_part_table.inc
--source include/get_frm_info.inc
--enable_info
ALTER TABLE t575 ADD INDEX (b);
--disable_info
--source include/get_frm_info.inc
DROP TABLE t575;

--source include/create_575_part_table.inc
--source include/get_frm_info.inc
--enable_info
CREATE INDEX b ON t575 (b);
--disable_info
--source include/get_frm_info.inc
DROP TABLE t575;

--source include/create_575_part_table.inc
--source include/get_frm_info.inc
--enable_info
DROP INDEX `PRIMARY` ON t575;
--disable_info
--source include/get_frm_info.inc
DROP TABLE t575;

--remove_files_wildcard $MYSQLD_DATADIR/test list_t575*.txt

--source include/mysql_upgrade_cleanup.inc

Man Man