From: kevin.lewis Date: March 7 2012 2:51am Subject: bzr push into mysql-trunk branch (kevin.lewis:3715 to 3716) List-Archive: http://lists.mysql.com/commits/143114 Message-Id: <20120307025135.E29FD1EC608A@dhcp-adc-twvpn-2-vpnpool-10-154-62-110.vpn.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3716 kevin.lewis@stripped 2012-03-06 Testcase improvement and cleanup. modified: mysql-test/suite/innodb/r/innodb-tablespace.result mysql-test/suite/innodb/t/innodb-tablespace.test mysql-test/suite/parts/r/partition_basic_symlink_innodb.result mysql-test/suite/parts/t/partition_basic_symlink_innodb.test 3715 kevin.lewis@stripped 2012-03-05 [merge] merge added: mysql-test/include/ctype_inet.inc mysql-test/r/trans_read_only.result mysql-test/suite/sys_vars/r/tx_read_only_basic.result mysql-test/suite/sys_vars/t/tx_read_only_basic.test mysql-test/t/trans_read_only-master.opt mysql-test/t/trans_read_only.test modified: VERSION include/mysql/plugin.h include/mysql/plugin_audit.h.pp include/mysql/plugin_auth.h.pp include/mysql/plugin_ftparser.h.pp include/mysql_com.h mysql-test/include/check-warnings.test mysql-test/r/bug58669.result mysql-test/r/commit.result mysql-test/r/ctype_ascii.result mysql-test/r/ctype_big5.result mysql-test/r/ctype_binary.result mysql-test/r/ctype_cp1250_ch.result mysql-test/r/ctype_cp1251.result mysql-test/r/ctype_eucjpms.result mysql-test/r/ctype_euckr.result mysql-test/r/ctype_gb2312.result mysql-test/r/ctype_gbk.result mysql-test/r/ctype_latin1.result mysql-test/r/ctype_latin2.result mysql-test/r/ctype_sjis.result mysql-test/r/ctype_tis620.result mysql-test/r/ctype_ujis.result mysql-test/r/ctype_utf8.result mysql-test/r/ctype_utf8mb4.result mysql-test/r/mysqld--help-notwin.result mysql-test/r/mysqld--help-win.result mysql-test/r/read_only.result mysql-test/suite/engines/iuds/r/insert_number.result mysql-test/suite/engines/iuds/r/update_delete_number.result mysql-test/suite/funcs_1/r/myisam_views-big.result mysql-test/suite/innodb/r/innodb-tablespace.result mysql-test/suite/innodb/t/innodb-tablespace.test mysql-test/suite/perfschema/r/digest_table_full.result mysql-test/suite/perfschema/r/statement_digest.result mysql-test/suite/perfschema/r/statement_digest_consumers.result mysql-test/suite/perfschema/r/statement_digest_long_query.result mysql-test/suite/rpl/r/rpl_mts_debug.result mysql-test/suite/rpl/t/rpl_mts_debug.test mysql-test/suite/sys_vars/r/slave_checkpoint_group_basic.result mysql-test/t/bug58669.test mysql-test/t/commit.test mysql-test/t/ctype_ascii.test mysql-test/t/ctype_big5.test mysql-test/t/ctype_binary.test mysql-test/t/ctype_cp1250_ch.test mysql-test/t/ctype_cp1251.test mysql-test/t/ctype_eucjpms.test mysql-test/t/ctype_euckr.test mysql-test/t/ctype_gb2312.test mysql-test/t/ctype_gbk.test mysql-test/t/ctype_latin1.test mysql-test/t/ctype_latin2.test mysql-test/t/ctype_sjis.test mysql-test/t/ctype_tis620.test mysql-test/t/ctype_ujis.test mysql-test/t/ctype_utf8.test mysql-test/t/ctype_utf8mb4.test mysql-test/t/read_only.test sql/event_data_objects.cc sql/event_scheduler.cc sql/events.cc sql/handler.cc sql/handler.h sql/item_inetfunc.cc sql/lex.h sql/mysqld.cc sql/rpl_rli_pdb.cc sql/rpl_slave.cc sql/rpl_slave.h sql/share/errmsg-utf8.txt sql/sql_base.cc sql/sql_class.cc sql/sql_class.h sql/sql_insert.cc sql/sql_parse.cc sql/sql_yacc.yy sql/sys_vars.cc sql/sys_vars.h sql/transaction.cc tests/mysql_client_test.c === modified file 'mysql-test/suite/innodb/r/innodb-tablespace.result' --- a/mysql-test/suite/innodb/r/innodb-tablespace.result revid:kevin.lewis@stripped +++ b/mysql-test/suite/innodb/r/innodb-tablespace.result revid:kevin.lewis@stripped @@ -32,20 +32,22 @@ DROP TABLE t1; # Innodb does not support DATA DIRECTORY without innodb_file_per_table=ON. SET SESSION innodb_strict_mode = ON; SET GLOBAL innodb_file_per_table=OFF; -CREATE TABLE t1 (a int KEY, b text) INDEX DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data'; +CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data'; ERROR HY000: Can't create table 'test.t1' (errno: 1478) SHOW WARNINGS; Level Code Message -Warning 1478 InnoDB: INDEX DIRECTORY is not supported +Warning 1478 InnoDB: DATA DIRECTORY requires innodb_file_per_table. Error 1005 Can't create table 'test.t1' (errno: 1478) # Without strict mode, DATA DIRECTORY without innodb_file_per_table=ON is just ignored. SET SESSION innodb_strict_mode = OFF; -CREATE TABLE t1 (a int KEY, b text) INDEX DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data'; +CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data'; Warnings: -Warning 1618 option ignored +Warning 1478 InnoDB: DATA DIRECTORY requires innodb_file_per_table. +Warning 1618 option ignored SHOW WARNINGS; Level Code Message -Warning 1618 option ignored +Warning 1478 InnoDB: DATA DIRECTORY requires innodb_file_per_table. +Warning 1618 option ignored SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -210,119 +212,6 @@ t1 CREATE TEMPORARY TABLE `t1` ( PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t1; -# The partition engine can send DATA DIRECTORY to InnoDB. -# In strict mode, it is an error if innodb_file_per_table = OFF -# or INDEX DIRECTORY is used. -SET SESSION innodb_strict_mode = ON; -SET GLOBAL innodb_file_per_table = OFF; -CREATE TABLE t1 (a int KEY, b text) ENGINE = InnoDB PARTITION BY HASH (a) -(PARTITION p0 engine=InnoDB DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/alternate_dir/data' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp/alternate_dir/data', -PARTITION p1 engine=InnoDB DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/alternate_dir/data' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp/alternate_dir/data'); -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: DATA DIRECTORY requires innodb_file_per_table. -Warning 1478 InnoDB: INDEX DIRECTORY is not supported -Error 1005 Can't create table 'test.t1' (errno: 1478) -Error 6 Error on delete of './test/t1.par' (Errcode: 2 - No such file or directory) -# Try again with innodb_file_per_table = ON and no INDEX DIRECTORY. -SET GLOBAL innodb_file_per_table = ON; -CREATE TABLE t1 (a int KEY, b text) ENGINE = InnoDB PARTITION BY HASH (a) -(PARTITION p0 engine=InnoDB DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/alternate_dir/data', -PARTITION p1 engine=InnoDB DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/alternate_dir/data2'); -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` text, - PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (a) -(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/alternate_dir/data' ENGINE = InnoDB, - PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/alternate_dir/data2' ENGINE = InnoDB) */ -SELECT name,n_cols,file_format,row_format -FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'; -name n_cols file_format row_format -test/t1#p#p0 5 Antelope Compact -test/t1#p#p1 5 Antelope Compact -SELECT name,file_format,row_format -FROM information_schema.innodb_sys_tablespaces; -name file_format row_format -test/t1#p#p0 Antelope Compact or Redundant -test/t1#p#p1 Antelope Compact or Redundant -SELECT path FROM information_schema.innodb_sys_datafiles; -path -MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0.ibd -MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1.ibd -# Verifying .frm, .par, .isl & .ibd files -# Verifying that there are no MyISAM files -# Test TRUNCATE TABLE with partitioned InnoDB tables -INSERT INTO t1 VALUES (1, "red"); -INSERT INTO t1 VALUES (2, "green"); -INSERT INTO t1 VALUES (3, "blue"); -SELECT * FROM t1; -a b -2 green -1 red -3 blue -TRUNCATE TABLE t1; -SELECT * FROM t1; -a b -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` text, - PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (a) -(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data' ENGINE = InnoDB, - PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2' ENGINE = InnoDB) */ -SELECT name,n_cols,file_format,row_format -FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'; -name n_cols file_format row_format -test/t1#p#p0 5 Antelope Compact -test/t1#p#p1 5 Antelope Compact -SELECT name,file_format,row_format -FROM information_schema.innodb_sys_tablespaces; -name file_format row_format -test/t1#p#p0 Antelope Compact or Redundant -test/t1#p#p1 Antelope Compact or Redundant -SELECT path FROM information_schema.innodb_sys_datafiles; -path -MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0.ibd -MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1.ibd -# Verifying .frm, .par and MyISAM files (.MYD, MYI) -# Test RENAME TABLE with partitioned InnoDB tables -RENAME TABLE t1 TO t11; -SHOW CREATE TABLE t11; -Table Create Table -t11 CREATE TABLE `t11` ( - `a` int(11) NOT NULL, - `b` text, - PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY HASH (a) -(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data' ENGINE = InnoDB, - PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2' ENGINE = InnoDB) */ -SELECT name,n_cols,file_format,row_format -FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'; -name n_cols file_format row_format -test/t11#p#p0 5 Antelope Compact -test/t11#p#p1 5 Antelope Compact -SELECT name,file_format,row_format -FROM information_schema.innodb_sys_tablespaces; -name file_format row_format -test/t11#p#p0 Antelope Compact or Redundant -test/t11#p#p1 Antelope Compact or Redundant -SELECT path FROM information_schema.innodb_sys_datafiles; -path -MYSQL_TMP_DIR/alternate_dir/data/test/t11#p#p0.ibd -MYSQL_TMP_DIR/alternate_dir/data2/test/t11#p#p1.ibd -# Verifying .frm, .par and MyISAM files (.MYD, MYI) # # Cleanup # -DROP TABLE t11; === modified file 'mysql-test/suite/innodb/t/innodb-tablespace.test' --- a/mysql-test/suite/innodb/t/innodb-tablespace.test revid:kevin.lewis@stripped +++ b/mysql-test/suite/innodb/t/innodb-tablespace.test revid:kevin.lewis@stripped @@ -8,18 +8,15 @@ SET default_storage_engine=InnoDB; --echo # TABLESPACE related tests. --echo # ---disable_query_log -let $MYSQLD_DATADIR = `select @@datadir`; -let $data_directory = DATA DIRECTORY='$MYSQL_TMP_DIR/alternate_dir/data'; -let $data_directory2 = DATA DIRECTORY='$MYSQL_TMP_DIR/alternate_dir/data2'; -let $index_directory = INDEX DIRECTORY='$MYSQL_TMP_DIR/alternate_dir/data'; +# Set up some variables +LET $MYSQLD_DATADIR = `select @@datadir`; +LET $data_directory = DATA DIRECTORY='$MYSQL_TMP_DIR/alternate_dir/data'; +LET $index_directory = INDEX DIRECTORY='$MYSQL_TMP_DIR/alternate_dir/data'; # These values can change during the test LET $innodb_file_format_orig=`select @@innodb_file_format`; LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`; LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; -SET default_storage_engine=InnoDB; ---enable_query_log --echo # --echo # CREATE TABLE ... DATA DIRECTORY @@ -45,13 +42,13 @@ SET SESSION innodb_strict_mode = ON; SET GLOBAL innodb_file_per_table=OFF; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR --error ER_CANT_CREATE_TABLE -eval CREATE TABLE t1 (a int KEY, b text) $index_directory; +eval CREATE TABLE t1 (a int KEY, b text) $data_directory; SHOW WARNINGS; --echo # Without strict mode, DATA DIRECTORY without innodb_file_per_table=ON is just ignored. SET SESSION innodb_strict_mode = OFF; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -eval CREATE TABLE t1 (a int KEY, b text) $index_directory; +eval CREATE TABLE t1 (a int KEY, b text) $data_directory; SHOW WARNINGS; SHOW CREATE TABLE t1; DROP TABLE t1; @@ -177,128 +174,12 @@ SHOW WARNINGS; SHOW CREATE TABLE t1; DROP TABLE t1; - ---echo # The partition engine can send DATA DIRECTORY to InnoDB. ---echo # In strict mode, it is an error if innodb_file_per_table = OFF ---echo # or INDEX DIRECTORY is used. -SET SESSION innodb_strict_mode = ON; -SET GLOBAL innodb_file_per_table = OFF; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---error ER_CANT_CREATE_TABLE -eval CREATE TABLE t1 (a int KEY, b text) ENGINE = InnoDB PARTITION BY HASH (a) - (PARTITION p0 engine=InnoDB $data_directory $index_directory, - PARTITION p1 engine=InnoDB $data_directory $index_directory); -SHOW WARNINGS; - ---echo # Try again with innodb_file_per_table = ON and no INDEX DIRECTORY. -SET GLOBAL innodb_file_per_table = ON; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval CREATE TABLE t1 (a int KEY, b text) ENGINE = InnoDB PARTITION BY HASH (a) - (PARTITION p0 engine=InnoDB $data_directory, - PARTITION p1 engine=InnoDB $data_directory2); -SHOW WARNINGS; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -SHOW CREATE TABLE t1; -# replace_result 't1#P' with 't1#p' because on Linux, InnoDB is always -# case sensitive with table names and on Windows, it is always lower case. -# This is independent of the value of lower_case_table_names. This cannot -# be changes without breaking backward compatibility. ---replace_result t1#P t1#p -SELECT name,n_cols,file_format,row_format - FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'; ---replace_result t1#P t1#p -SELECT name,file_format,row_format - FROM information_schema.innodb_sys_tablespaces; ---replace_result t1#P t1#p $MYSQL_TMP_DIR MYSQL_TMP_DIR -SELECT path FROM information_schema.innodb_sys_datafiles; - ---echo # Verifying .frm, .par, .isl & .ibd files ---file_exists $MYSQLD_DATADIR/test/t1.frm ---file_exists $MYSQLD_DATADIR/test/t1.par ---file_exists $MYSQLD_DATADIR/test/t1#P#p0.isl ---file_exists $MYSQLD_DATADIR/test/t1#P#p1.isl ---file_exists $MYSQL_TMP_DIR/alternate_dir/data/test/t1#P#p0.ibd ---file_exists $MYSQL_TMP_DIR/alternate_dir/data2/test/t1#P#p1.ibd - ---echo # Verifying that there are no MyISAM files ---error 1 ---file_exists $MYSQLD_DATADIR/test/t1#P#p0.myd ---error 1 ---file_exists $MYSQLD_DATADIR/test/t1#P#p0.myi ---error 1 ---file_exists $MYSQLD_DATADIR/test/t1#P#p1.myd ---error 1 ---file_exists $MYSQLD_DATADIR/test/t1#P#p1.myi ---error 1 ---file_exists $MYSQL_TMP_DIR/alternate_dir/data/t1#P#p0.myd ---error 1 ---file_exists $MYSQL_TMP_DIR/alternate_dir/data/t1#P#p0.myi ---error 1 ---file_exists $MYSQL_TMP_DIR/alternate_dir/data2/t1#P#p1.myd ---error 1 ---file_exists $MYSQL_TMP_DIR/alternate_dir/data2/t1#P#p1.myi -# The ibd tablespaces should not be directly under the DATA DIRECTORY ---error 1 ---file_exists $MYSQL_TMP_DIR/alternate_dir/data/t1#P#p0.ibd ---error 1 ---file_exists $MYSQL_TMP_DIR/alternate_dir/data2/t1#P#p1.ibd - ---echo # Test TRUNCATE TABLE with partitioned InnoDB tables -INSERT INTO t1 VALUES (1, "red"); -INSERT INTO t1 VALUES (2, "green"); -INSERT INTO t1 VALUES (3, "blue"); -SELECT * FROM t1; -TRUNCATE TABLE t1; -SELECT * FROM t1; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -SHOW CREATE TABLE t1; ---replace_result t1#P t1#p -SELECT name,n_cols,file_format,row_format - FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'; ---replace_result t1#P t1#p -SELECT name,file_format,row_format - FROM information_schema.innodb_sys_tablespaces; ---replace_result t1#P t1#p $MYSQL_TMP_DIR MYSQL_TMP_DIR -SELECT path FROM information_schema.innodb_sys_datafiles; ---echo # Verifying .frm, .par and MyISAM files (.MYD, MYI) ---file_exists $MYSQLD_DATADIR/test/t1.frm ---file_exists $MYSQLD_DATADIR/test/t1.par ---file_exists $MYSQLD_DATADIR/test/t1#P#p0.isl ---file_exists $MYSQLD_DATADIR/test/t1#P#p1.isl ---file_exists $MYSQL_TMP_DIR/alternate_dir/data/test/t1#P#p0.ibd ---file_exists $MYSQL_TMP_DIR/alternate_dir/data2/test/t1#P#p1.ibd ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR - ---echo # Test RENAME TABLE with partitioned InnoDB tables -RENAME TABLE t1 TO t11; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -SHOW CREATE TABLE t11; ---replace_result t11#P t11#p -SELECT name,n_cols,file_format,row_format - FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'; ---replace_result t11#P t11#p -SELECT name,file_format,row_format - FROM information_schema.innodb_sys_tablespaces; ---replace_result t11#P t11#p $MYSQL_TMP_DIR MYSQL_TMP_DIR -SELECT path FROM information_schema.innodb_sys_datafiles; ---echo # Verifying .frm, .par and MyISAM files (.MYD, MYI) ---file_exists $MYSQLD_DATADIR/test/t11.frm ---file_exists $MYSQLD_DATADIR/test/t11.par ---file_exists $MYSQLD_DATADIR/test/t11#P#p0.isl ---file_exists $MYSQLD_DATADIR/test/t11#P#p1.isl ---file_exists $MYSQL_TMP_DIR/alternate_dir/data/test/t11#P#p0.ibd ---file_exists $MYSQL_TMP_DIR/alternate_dir/data2/test/t11#P#p1.ibd ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR - --echo # --echo # Cleanup --echo # -DROP TABLE t11; --rmdir $MYSQL_TMP_DIR/alternate_dir/data/test --rmdir $MYSQL_TMP_DIR/alternate_dir/data ---rmdir $MYSQL_TMP_DIR/alternate_dir/data2/test ---rmdir $MYSQL_TMP_DIR/alternate_dir/data2 --rmdir $MYSQL_TMP_DIR/alternate_dir --disable_query_log === modified file 'mysql-test/suite/parts/r/partition_basic_symlink_innodb.result' --- a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result revid:kevin.lewis@stripped +++ b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result revid:kevin.lewis@stripped @@ -19,7 +19,7 @@ Level Code Message Warning 1478 InnoDB: DATA DIRECTORY requires innodb_file_per_table. Warning 1478 InnoDB: INDEX DIRECTORY is not supported Error 1005 Can't create table 'test.t1' (errno: 1478) -Error 6 Error on delete of './test/t1.par' (Errcode: 2 - No such file or directory) +Error 6 Error on delete of 'MYSQLD_DATADIR/test/t1.par' (Errcode: 2 - No such file or directory) # InnoDB is different from MyISAM in that it uses a text file # with an '.isl' extension instead of a symbolic link so that # the tablespace can be re-located on any OS. Also, instead of @@ -54,8 +54,8 @@ t1 CREATE TABLE `t1` ( /*!50100 PARTITION BY HASH (c1) (PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB, PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB) */ -# Verify that the DATA/INDEX DIRECTORY is stored and used if -# ALTER to MyISAM. +# Verify that the DATA/INDEX DIRECTORY is stored and used if we +# ALTER TABLE to MyISAM. ALTER TABLE t1 engine=MyISAM; SHOW CREATE TABLE t1; Table Create Table @@ -66,4 +66,30 @@ t1 CREATE TABLE `t1` ( (PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ # Verifying .frm, .par and MyISAM files (.MYD, MYI) +# Now verify that the DATA DIRECTORY is used again if we +# ALTER TABLE back to InnoDB. First try stict mode which +# will fail since INDEX DIRECTORY is part of the definition. +SET SESSION innodb_strict_mode = ON; +ALTER TABLE t1 engine=InnoDB; +ERROR HY000: Can't create table 'test.#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: INDEX DIRECTORY is not supported +Error 1005 Can't create table 'test.#sql-temporary' (errno: 1478) +Error 6 Error on delete of 'MYSQLD_DATADIR/test/#sql-temporary.par' (Errcode: 2 - No such file or directory) +# Now use non-stict mode so that the INDEX DIRECTORY is ignored. +SET SESSION innodb_strict_mode = OFF; +ALTER TABLE t1 engine=InnoDB; +Warnings: +Warning 1618 option ignored +Warning 1618 option ignored +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY HASH (c1) +(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB, + PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB) */ +# Verifying .frm, .par and MyISAM files (.MYD, MYI) DROP TABLE t1; === modified file 'mysql-test/suite/parts/t/partition_basic_symlink_innodb.test' --- a/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test revid:kevin.lewis@stripped +++ b/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test revid:kevin.lewis@stripped @@ -68,6 +68,7 @@ PARTITION BY HASH (c1) DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir' ); +--replace_result ./ MYSQLD_DATADIR/ $MYSQLD_DATADIR MYSQLD_DATADIR SHOW WARNINGS; --echo # InnoDB is different from MyISAM in that it uses a text file @@ -123,8 +124,8 @@ FLUSH TABLES; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR SHOW CREATE TABLE t1; ---echo # Verify that the DATA/INDEX DIRECTORY is stored and used if ---echo # ALTER to MyISAM. +--echo # Verify that the DATA/INDEX DIRECTORY is stored and used if we +--echo # ALTER TABLE to MyISAM. ALTER TABLE t1 engine=MyISAM; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR SHOW CREATE TABLE t1; @@ -152,6 +153,53 @@ SHOW CREATE TABLE t1; --file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/test/t1#P#p0.ibd --error 1 --file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/test/t1#P#p1.ibd + + +--echo # Now verify that the DATA DIRECTORY is used again if we +--echo # ALTER TABLE back to InnoDB. First try stict mode which +--echo # will fail since INDEX DIRECTORY is part of the definition. +SET SESSION innodb_strict_mode = ON; +--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 engine=InnoDB; +--replace_result ./ MYSQLD_DATADIR/ $MYSQLD_DATADIR MYSQLD_DATADIR +--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ +SHOW WARNINGS; + +--echo # Now use non-stict mode so that the INDEX DIRECTORY is ignored. +SET SESSION innodb_strict_mode = OFF; +ALTER TABLE t1 engine=InnoDB; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t1; +--echo # Verifying .frm, .par and MyISAM files (.MYD, MYI) +--file_exists $MYSQLD_DATADIR/test/t1.frm +--file_exists $MYSQLD_DATADIR/test/t1.par +--file_exists $MYSQLD_DATADIR/test/t1#P#p0.isl +--file_exists $MYSQLD_DATADIR/test/t1#P#p1.isl +--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/test/t1#P#p0.ibd +--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/test/t1#P#p1.ibd + +--error 1 +--file_exists $MYSQLD_DATADIR/test/t1#P#p0.myd +--error 1 +--file_exists $MYSQLD_DATADIR/test/t1#P#p1.myd +--error 1 +--file_exists $MYSQLD_DATADIR/test/t1#P#p0.myi +--error 1 +--file_exists $MYSQLD_DATADIR/test/t1#P#p1.myi +--error 1 +--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.myd +--error 1 +--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.myd +--error 1 +--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.myi +--error 1 +--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.myi +--error 1 +--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.ibd +--error 1 +--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.ibd + DROP TABLE t1; --rmdir $MYSQLTEST_VARDIR/mysql-test-data-dir/test No bundle (reason: useless for push emails).