From 06eaf7232e9a920468c0f8d74dcf2fe8b555501c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:24:36 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- .../mysql-test/storage_engine/alter_table.inc | 116 ++ .../mysql-test/storage_engine/alter_table.rdiff | 151 +++ .../storage_engine/alter_table_online.rdiff | 82 ++ .../storage_engine/alter_tablespace.rdiff | 34 + .../mysql-test/storage_engine/analyze_table.rdiff | 34 + .../mysql-test/storage_engine/autoincrement.rdiff | 64 + .../mysql-test/storage_engine/cache_index.rdiff | 71 + .../storage_engine/checksum_table_live.rdiff | 13 + .../mysql-test/storage_engine/cleanup_engine.inc | 16 + .../mysql-test/storage_engine/create_table.inc | 208 +++ .../mysql-test/storage_engine/create_table.rdiff | 57 + .../mysql-test/storage_engine/define_engine.inc | 49 + .../mysql-test/storage_engine/disabled.def | 4 + .../mysql-test/storage_engine/foreign_keys.rdiff | 147 ++ .../storage_engine/fulltext_search.rdiff | 150 +++ .../mysql-test/storage_engine/handler.rdiff | 88 ++ .../mysql-test/storage_engine/index.rdiff | 11 + .../storage_engine/index_enable_disable.rdiff | 33 + .../storage_engine/index_type_btree.rdiff | 11 + .../storage_engine/index_type_hash.rdiff | 69 + .../mysql-test/storage_engine/insert_delayed.rdiff | 26 + .../myisammrg/mysql-test/storage_engine/lock.rdiff | 80 ++ .../myisammrg/mysql-test/storage_engine/misc.rdiff | 34 + .../mysql-test/storage_engine/optimize_table.rdiff | 35 + .../storage_engine/parts/alter_table.rdiff | 68 + .../storage_engine/parts/analyze_table.rdiff | 87 ++ .../storage_engine/parts/check_table.rdiff | 176 +++ .../storage_engine/parts/checksum_table.rdiff | 89 ++ .../storage_engine/parts/create_table.rdiff | 159 +++ .../storage_engine/parts/optimize_table.rdiff | 95 ++ .../storage_engine/parts/repair_table.rdiff | 299 ++++ .../storage_engine/parts/truncate_table.rdiff | 101 ++ .../mysql-test/storage_engine/repair_table.rdiff | 132 ++ .../mysql-test/storage_engine/show_engine.rdiff | 10 + .../mysql-test/storage_engine/tbl_opt_ai.rdiff | 16 + .../storage_engine/tbl_opt_avg_row_length.rdiff | 17 + .../storage_engine/tbl_opt_checksum.rdiff | 17 + .../storage_engine/tbl_opt_connection.rdiff | 19 + .../storage_engine/tbl_opt_data_dir.rdiff | 18 + .../storage_engine/tbl_opt_delay_key_write.rdiff | 17 + .../storage_engine/tbl_opt_index_dir.rdiff | 18 + .../storage_engine/tbl_opt_insert_method.rdiff | 17 + .../storage_engine/tbl_opt_key_block_size.rdiff | 17 + .../storage_engine/tbl_opt_max_rows.rdiff | 17 + .../storage_engine/tbl_opt_min_rows.rdiff | 17 + .../storage_engine/tbl_opt_pack_keys.rdiff | 17 + .../storage_engine/tbl_opt_password.rdiff | 17 + .../storage_engine/tbl_opt_row_format.rdiff | 33 + .../mysql-test/storage_engine/tbl_opt_union.rdiff | 16 + .../storage_engine/tbl_standard_opts.rdiff | 19 + .../mysql-test/storage_engine/tbl_temporary.rdiff | 10 + .../mysql-test/storage_engine/truncate_table.rdiff | 48 + .../trx/cons_snapshot_repeatable_read.rdiff | 20 + .../trx/cons_snapshot_serializable.rdiff | 20 + .../mysql-test/storage_engine/trx/delete.rdiff | 50 + .../mysql-test/storage_engine/trx/insert.rdiff | 65 + .../storage_engine/trx/level_read_committed.rdiff | 94 ++ .../trx/level_read_uncommitted.rdiff | 12 + .../storage_engine/trx/level_repeatable_read.rdiff | 96 ++ .../storage_engine/trx/level_serializable.rdiff | 103 ++ .../storage_engine/trx/select_for_update.rdiff | 50 + .../trx/select_lock_in_share_mode.rdiff | 37 + .../mysql-test/storage_engine/trx/update.rdiff | 58 + .../mysql-test/storage_engine/trx/xa.rdiff | 89 ++ .../storage_engine/trx/xa_recovery.rdiff | 32 + .../storage_engine/type_char_indexes.rdiff | 20 + .../storage_engine/type_float_indexes.rdiff | 11 + .../mysql-test/storage_engine/type_spatial.rdiff | 712 ++++++++++ .../storage_engine/type_spatial_indexes.rdiff | 1422 ++++++++++++++++++++ .../myisammrg/mysql-test/storage_engine/vcol.rdiff | 82 ++ 70 files changed, 6122 insertions(+) create mode 100644 storage/myisammrg/mysql-test/storage_engine/alter_table.inc create mode 100644 storage/myisammrg/mysql-test/storage_engine/alter_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/alter_table_online.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/analyze_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/cache_index.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/checksum_table_live.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/cleanup_engine.inc create mode 100644 storage/myisammrg/mysql-test/storage_engine/create_table.inc create mode 100644 storage/myisammrg/mysql-test/storage_engine/create_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/define_engine.inc create mode 100644 storage/myisammrg/mysql-test/storage_engine/disabled.def create mode 100644 storage/myisammrg/mysql-test/storage_engine/foreign_keys.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/fulltext_search.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/handler.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/index.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/index_enable_disable.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/index_type_btree.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/index_type_hash.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/insert_delayed.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/lock.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/misc.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/optimize_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/parts/alter_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/parts/analyze_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/parts/check_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/parts/checksum_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/parts/create_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/parts/optimize_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/parts/repair_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/parts/truncate_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/repair_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/show_engine.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_ai.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_avg_row_length.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_checksum.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_connection.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_data_dir.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_delay_key_write.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_index_dir.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_insert_method.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_key_block_size.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_max_rows.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_min_rows.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_pack_keys.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_password.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_row_format.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_opt_union.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_standard_opts.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/tbl_temporary.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/truncate_table.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/cons_snapshot_repeatable_read.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/cons_snapshot_serializable.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/delete.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/insert.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/level_read_committed.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/level_read_uncommitted.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/level_repeatable_read.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/level_serializable.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/select_for_update.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/select_lock_in_share_mode.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/update.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/xa.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/trx/xa_recovery.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/type_char_indexes.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/type_float_indexes.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/type_spatial.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/type_spatial_indexes.rdiff create mode 100644 storage/myisammrg/mysql-test/storage_engine/vcol.rdiff (limited to 'storage/myisammrg/mysql-test') diff --git a/storage/myisammrg/mysql-test/storage_engine/alter_table.inc b/storage/myisammrg/mysql-test/storage_engine/alter_table.inc new file mode 100644 index 00000000..a978ade4 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/alter_table.inc @@ -0,0 +1,116 @@ +################################## +# +# This include file will be used for all ALTER TABLE statements in the suite. +# If you need to add additional steps or change the logic, copy the file +# to storage//mysql-test/storage_engine/ folder and modify it there. +# +################## +# +# Parameters: +# +# --let $alter_definition = # mandatory, everything that goes after the table name in ALTER statement +# --let $table_name = # optional, default t1 +# --let $error_codes = # optional, default 0 +# --let $online = [0|1] # optional, default 0 (1 adds ONLINE) +# --let $rename_to = # optional, default empty. +# # If set, means we are running RENAME TO, then alter definition is ignored +# +# Usage examples: +# +# --let $alter_definition = ADD COLUMN b $char_col DEFAULT '' +# + +--let $child_alter_definition = $alter_definition + +if ($rename_to) +{ + --let $alter_definition = RENAME TO $rename_to + --let $child_alter_definition = RENAME TO mrg.$rename_to +} + +if (!$alter_definition) +{ + --die # The ALTER statement is empty +} + +--let $alter_statement = ALTER + +if ($online) +{ + --let $alter_statement = $alter_statement ONLINE +} + +if (!$table_name) +{ + --let $table_name = t1 +} + +--let $alter_statement = $alter_statement TABLE $table_name $alter_definition +# We don't want to do ONLINE on underlying tables, we are not testing MyISAM +--let $child_statement = ALTER TABLE mrg.$table_name $child_alter_definition + + + +# We now have the complete ALTER statement in $alter_statement. +# If your ALTER statement should be composed differently, +# modify the logic above. + +##################### +# Here you can add logic needed BEFORE the main statement +# (e.g. base tables need to be altered, etc.). +# Surround it by --disable_query_log/--enable_query_log +# if you don't want it to appear in the result output. +##################### + +--source obfuscate.inc + +eval $alter_statement; +--source check_errors.inc + +# Make sure you don't add any statements between the main ALTER (above) +# and saving mysql_errno and mysql_errname (below) +# They are saved in case you want to add more logic after the main ALTER, +# because we need the result code of the statement. +# Also, do not change $alter_statement after it is executed! + +--let $my_errno = $mysql_errno +--let $my_errname = $mysql_errname + +##################### +# Here you can add logic needed AFTER the main statement. +# Surround it by --disable_query_log/--enable_query_log +# if you don't want it to appear in the result output. +##################### +--disable_query_log +--disable_warnings +--disable_result_log +# We will only try to alter the underlying table if the main alter was successful +if (!$my_errno) +{ + if ($rename_to) + { + eval ALTER TABLE $rename_to UNION(mrg.$rename_to); + } + # In the same section, the manual says that FLUSH TABLES should be performed before altering + # the underlying table, and later also says that it should be done after. We'll do both + FLUSH TABLES; + eval $child_statement; + FLUSH TABLES; +} +--enable_result_log +--enable_warnings +--enable_query_log + +# Unset the parameters, we don't want them to be accidentally reused later +--let $alter_definition = +--let $table_name = +--let $error_codes = +--let $online = 0 +--let $rename_to = + +# Restore the error codes of the main statement +--let $mysql_errno = $my_errno +--let $mysql_errname = $my_errname +# Make sure you don't add any SQL statements after restoring +# mysql_errno and mysql_errname (above) + diff --git a/storage/myisammrg/mysql-test/storage_engine/alter_table.rdiff b/storage/myisammrg/mysql-test/storage_engine/alter_table.rdiff new file mode 100644 index 00000000..b2ec2129 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/alter_table.rdiff @@ -0,0 +1,151 @@ +--- alter_table.result 2013-01-22 22:05:05.246633000 +0400 ++++ alter_table.reject 2013-01-23 02:50:10.652118538 +0400 +@@ -8,7 +8,7 @@ + `a` int(11) DEFAULT NULL, + `c` char(8) DEFAULT NULL, + `b` int(11) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 ALTER COLUMN a SET DEFAULT '0'; + SHOW CREATE TABLE t1; + Table Create Table +@@ -16,7 +16,7 @@ + `a` int(11) DEFAULT '0', + `c` char(8) DEFAULT NULL, + `b` int(11) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 ALTER a DROP DEFAULT; + SHOW CREATE TABLE t1; + Table Create Table +@@ -24,7 +24,7 @@ + `a` int(11), + `c` char(8) DEFAULT NULL, + `b` int(11) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 CHANGE COLUMN b b1 FIRST; + SHOW CREATE TABLE t1; + Table Create Table +@@ -32,7 +32,7 @@ + `b1` char(8) DEFAULT NULL, + `a` int(11), + `c` char(8) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 CHANGE b1 b AFTER c; + SHOW CREATE TABLE t1; + Table Create Table +@@ -40,7 +40,7 @@ + `a` int(11), + `c` char(8) DEFAULT NULL, + `b` int(11) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 CHANGE b b ; + SHOW CREATE TABLE t1; + Table Create Table +@@ -48,7 +48,7 @@ + `a` int(11), + `c` char(8) DEFAULT NULL, + `b` char(8) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 MODIFY COLUMN b ; + SHOW CREATE TABLE t1; + Table Create Table +@@ -56,7 +56,7 @@ + `a` int(11), + `c` char(8) DEFAULT NULL, + `b` int(11) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 MODIFY COLUMN b FIRST; + SHOW CREATE TABLE t1; + Table Create Table +@@ -64,7 +64,7 @@ + `b` char(8) DEFAULT NULL, + `a` int(11), + `c` char(8) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 MODIFY COLUMN b AFTER a; + SHOW CREATE TABLE t1; + Table Create Table +@@ -72,14 +72,14 @@ + `a` int(11), + `b` int(11) DEFAULT NULL, + `c` char(8) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 DROP COLUMN b; + SHOW CREATE TABLE t1; + Table Create Table + t1 CREATE TABLE `t1` ( + `a` int(11), + `c` char(8) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 RENAME TO t2; + SHOW CREATE TABLE t1; + ERROR 42S02: Table 'test.t1' doesn't exist +@@ -88,7 +88,7 @@ + t2 CREATE TABLE `t2` ( + `a` int(11), + `c` char(8) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t2`) + DROP TABLE t2; + CREATE TABLE t1 (a , b ) ENGINE= ; + INSERT INTO t1 (a,b) VALUES (1,5),(2,2),(4,3); +@@ -97,14 +97,14 @@ + t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 ORDER BY b ASC, a DESC; + SHOW CREATE TABLE t1; + Table Create Table + t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + SELECT a,b FROM t1; + a b + 2 2 +@@ -119,7 +119,7 @@ + `a` int(11) DEFAULT NULL, + `b` char(8) COLLATE latin1_general_cs DEFAULT NULL, + `c` char(8) COLLATE latin1_general_cs DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs ++) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; + SHOW CREATE TABLE t1; + Table Create Table +@@ -127,7 +127,7 @@ + `a` int(11) DEFAULT NULL, + `b` char(8) DEFAULT NULL, + `c` char(8) DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=utf8 ++) ENGINE= DEFAULT CHARSET=utf8 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 DEFAULT CHARACTER SET = latin1 COLLATE latin1_general_ci; + SHOW CREATE TABLE t1; + Table Create Table +@@ -135,7 +135,7 @@ + `a` int(11) DEFAULT NULL, + `b` char(8) CHARACTER SET utf8 DEFAULT NULL, + `c` char(8) CHARACTER SET utf8 DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci ++) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + ALTER TABLE t1 FORCE; + SHOW CREATE TABLE t1; + Table Create Table +@@ -143,5 +143,5 @@ + `a` int(11) DEFAULT NULL, + `b` char(8) CHARACTER SET utf8 DEFAULT NULL, + `c` char(8) CHARACTER SET utf8 DEFAULT NULL +-) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci ++) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + DROP TABLE t1; diff --git a/storage/myisammrg/mysql-test/storage_engine/alter_table_online.rdiff b/storage/myisammrg/mysql-test/storage_engine/alter_table_online.rdiff new file mode 100644 index 00000000..857854a6 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/alter_table_online.rdiff @@ -0,0 +1,82 @@ +--- suite/storage_engine/alter_table_online.result 2014-11-12 05:27:00.000000000 +0400 ++++ suite/storage_engine/alter_table_online.reject 2014-12-05 20:42:25.000000000 +0400 +@@ -2,8 +2,35 @@ + CREATE TABLE t1 (a , b , c ) ENGINE= ; + INSERT INTO t1 (a,b,c) VALUES (1,100,'a'),(2,200,'b'),(3,300,'c'); + ALTER ONLINE TABLE t1 MODIFY b DEFAULT 5; ++ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. ++# ERROR: Statement ended with errno 1845, errname ER_ALTER_OPERATION_NOT_SUPPORTED (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# The statement|command finished with ER_ALTER_OPERATION_NOT_SUPPORTED. ++# Functionality or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + ALTER ONLINE TABLE t1 CHANGE b new_name ; ++ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. ++# ERROR: Statement ended with errno 1845, errname ER_ALTER_OPERATION_NOT_SUPPORTED (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# The statement|command finished with ER_ALTER_OPERATION_NOT_SUPPORTED. ++# Functionality or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + ALTER ONLINE TABLE t1 COMMENT 'new comment'; ++ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. ++# ERROR: Statement ended with errno 1845, errname ER_ALTER_OPERATION_NOT_SUPPORTED (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# The statement|command finished with ER_ALTER_OPERATION_NOT_SUPPORTED. ++# Functionality or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + ALTER ONLINE TABLE t1 RENAME TO t2; + ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. + DROP TABLE IF EXISTS t2; +@@ -12,10 +39,6 @@ + CREATE TEMPORARY TABLE t1 (a , b ) ENGINE= ; + INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'); + ALTER ONLINE TABLE t1 MODIFY b DEFAULT 5; +-Warnings: +-Warning 1366 Incorrect integer value: 'a' for column 'b' at row 1 +-Warning 1366 Incorrect integer value: 'b' for column 'b' at row 2 +-Warning 1366 Incorrect integer value: 'c' for column 'b' at row 3 + ALTER ONLINE TABLE t1 CHANGE b new_name ; + ALTER ONLINE TABLE t1 COMMENT 'new comment'; + ALTER ONLINE TABLE t1 RENAME TO t2; +@@ -23,12 +46,30 @@ + CREATE TABLE t1 (a , b , c ) ENGINE= ; + INSERT INTO t1 (a,b,c) VALUES (1,100,'a'),(2,200,'b'),(3,300,'c'); + ALTER ONLINE TABLE t1 DROP COLUMN b, ADD b ; ++ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. ++# ERROR: Statement ended with errno 1845, errname ER_ALTER_OPERATION_NOT_SUPPORTED (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# The statement|command finished with ER_ALTER_OPERATION_NOT_SUPPORTED. ++# Functionality or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + ALTER ONLINE TABLE t1 MODIFY b BIGINT ; +-ERROR 0A000: LOCK=NONE is not supported. Reason: Cannot change column type. Try LOCK=SHARED. ++ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. ++# ERROR: Statement ended with errno 1845, errname ER_ALTER_OPERATION_NOT_SUPPORTED (expected results: ER_ALTER_OPERATION_NOT_SUPPORTED_REASON) + ALTER ONLINE TABLE t1 ENGINE=MEMORY; + ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED. + DROP TABLE t1; + CREATE TABLE t1 (a , b , c ) ENGINE= ; + ALTER ONLINE TABLE t1 ADD INDEX (b); +-ALTER ONLINE TABLE t1 DROP INDEX b; ++ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE. ++# ERROR: Statement ended with errno 1845, errname ER_ALTER_OPERATION_NOT_SUPPORTED (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# The statement|command finished with ER_ALTER_OPERATION_NOT_SUPPORTED. ++# Adding an index or ALTER ONLINE or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + DROP TABLE t1; diff --git a/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff b/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff new file mode 100644 index 00000000..e5462f8c --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff @@ -0,0 +1,34 @@ +--- alter_tablespace.result 2013-01-22 22:05:05.246633000 +0400 ++++ alter_tablespace.reject 2013-01-23 02:50:11.288110543 +0400 +@@ -1,21 +1,14 @@ + DROP TABLE IF EXISTS t1, t2; + CREATE TABLE t1 (a ) ENGINE= ; + ALTER TABLE t1 DISCARD TABLESPACE; +-DROP TABLE t1; +-CREATE TABLE t1 (a ) ENGINE= ; +-INSERT INTO t1 (a) VALUES (1),(2); +-SELECT a FROM t1; +-a +-1 +-2 +-ALTER TABLE t1 DISCARD TABLESPACE; +-SELECT a FROM t1; +-ERROR HY000: Tablespace has been discarded for table `t1` +-ALTER TABLE t1 IMPORT TABLESPACE; +-Warnings: +-Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification +-SELECT a FROM t1; +-a +-1 +-2 ++ERROR HY000: Storage engine MRG_MyISAM of the table `test`.`t1` doesn't have this option ++# ERROR: Statement ended with errno 1031, errname ER_ILLEGAL_HA (expected to succeed) ++# ------------ UNEXPECTED RESULT ------------ ++# [ ALTER TABLE t1 DISCARD TABLESPACE ] ++# The statement|command finished with ER_ILLEGAL_HA. ++# Tablespace operations or the syntax or the mix could be unsupported. ++# You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. ++# Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. ++# Also, this problem may cause a chain effect (more errors of different kinds in the test). ++# ------------------------------------------- + DROP TABLE t1; diff --git a/storage/myisammrg/mysql-test/storage_engine/analyze_table.rdiff b/storage/myisammrg/mysql-test/storage_engine/analyze_table.rdiff new file mode 100644 index 00000000..9854a986 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/analyze_table.rdiff @@ -0,0 +1,34 @@ +--- analyze_table.result 2013-01-22 22:05:05.246633000 +0400 ++++ analyze_table.reject 2013-01-23 02:50:11.912102699 +0400 +@@ -5,25 +5,25 @@ + INSERT INTO t1 (a,b) VALUES (3,'c'); + ANALYZE TABLE t1; + Table Op Msg_type Msg_text +-test.t1 analyze status OK ++test.t1 analyze note The storage engine for the table doesn't support analyze + INSERT INTO t2 (a,b) VALUES (4,'d'); + ANALYZE NO_WRITE_TO_BINLOG TABLE t2; + Table Op Msg_type Msg_text +-test.t2 analyze status OK ++test.t2 analyze note The storage engine for the table doesn't support analyze + INSERT INTO t1 (a,b) VALUES (5,'e'); + INSERT INTO t2 (a,b) VALUES (6,'f'); + ANALYZE LOCAL TABLE t1, t2; + Table Op Msg_type Msg_text +-test.t1 analyze status OK +-test.t2 analyze status OK ++test.t1 analyze note The storage engine for the table doesn't support analyze ++test.t2 analyze note The storage engine for the table doesn't support analyze + DROP TABLE t1, t2; + CREATE TABLE t1 (a , (a)) ENGINE= ; + INSERT INTO t1 (a) VALUES (1),(2),(4),(7); + ANALYZE TABLE t1; + Table Op Msg_type Msg_text +-test.t1 analyze status OK ++test.t1 analyze note The storage engine for the table doesn't support analyze + INSERT INTO t1 (a) VALUES (8),(10),(11),(12); + ANALYZE TABLE t1; + Table Op Msg_type Msg_text +-test.t1 analyze status OK ++test.t1 analyze note The storage engine for the table doesn't support analyze + DROP TABLE t1; diff --git a/storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff b/storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff new file mode 100644 index 00000000..cc04b800 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff @@ -0,0 +1,64 @@ +--- autoincrement.result 2013-01-22 22:05:05.246633000 +0400 ++++ autoincrement.reject 2013-01-23 02:50:12.848090932 +0400 +@@ -6,7 +6,7 @@ + `a` int(11) NOT NULL AUTO_INCREMENT, + `b` char(8) DEFAULT NULL, + KEY `a` (`a`) +-) ENGINE= DEFAULT CHARSET=latin1 ++) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) + INSERT INTO t1 (b) VALUES ('a'),('b'); + SELECT a,b FROM t1 ORDER BY a; + a b +@@ -52,14 +52,14 @@ + SET sql_mode = ''; + SHOW TABLE STATUS FROM test LIKE 't1'; + Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary +-t1 # # # # # # # # 6 # # # # # # # # N ++t1 # # # # # # # # 0 # # # # # # # # N + INSERT INTO t1 (a,b) VALUES (6,'g'),(7,'h'); + SELECT LAST_INSERT_ID(); + LAST_INSERT_ID() + 5 + SHOW TABLE STATUS FROM test LIKE 't1'; + Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary +-t1 # # # # # # # # # 8 # # # # # # # # N ++t1 # # # # # # # # # 0 # # # # # # # # N + INSERT INTO t1 (a,b) VALUES (NULL,'i'),(9,'j'); + SELECT a,b FROM t1 ORDER BY a; + a b +@@ -78,11 +78,11 @@ + 8 + SHOW TABLE STATUS FROM test LIKE 't1'; + Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary +-t1 # # # # # # # # # 10 # # # # # # # # N ++t1 # # # # # # # # # 0 # # # # # # # # N + INSERT INTO t1 (a,b) VALUES (20,'k'); + SHOW TABLE STATUS FROM test LIKE 't1'; + Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary +-t1 # # # # # # # # # 21 # # # # # # # # N ++t1 # # # # # # # # # 0 # # # # # # # # N + INSERT INTO t1 (a,b) VALUES (NULL,'l'); + SELECT a,b FROM t1 ORDER BY a; + a b +@@ -103,7 +103,7 @@ + 21 + SHOW TABLE STATUS FROM test LIKE 't1'; + Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary +-t1 # # # # # # # # # 22 # # # # # # # # N ++t1 # # # # # # # # # 0 # # # # # # # # N + INSERT INTO t1 (a,b) VALUES (-5,'m'); + SELECT a,b FROM t1 ORDER BY a; + a b +@@ -125,9 +125,9 @@ + INSERT INTO t1 (a,b) VALUES (NULL,'a'),(NULL,'b'); + SELECT a,b FROM t1; + a b +-100 a +-101 b ++1 a ++2 b + SELECT LAST_INSERT_ID(); + LAST_INSERT_ID() +-100 ++1 + DROP TABLE t1; diff --git a/storage/myisammrg/mysql-test/storage_engine/cache_index.rdiff b/storage/myisammrg/mysql-test/storage_engine/cache_index.rdiff new file mode 100644 index 00000000..612c8d38 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/cache_index.rdiff @@ -0,0 +1,71 @@ +--- cache_index.result 2013-01-22 22:05:05.246633000 +0400 ++++ cache_index.reject 2013-01-23 02:50:13.468083137 +0400 +@@ -12,31 +12,31 @@ + SET GLOBAL .key_buffer_size=128*1024; + CACHE INDEX t1 INDEX (a), t2 IN ; + Table Op Msg_type Msg_text +-test.t1 assign_to_keycache status OK +-test.t2 assign_to_keycache status OK ++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache ++test.t2 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache + LOAD INDEX INTO CACHE t1, t2; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK +-test.t2 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys ++test.t2 preload_keys note The storage engine for the table doesn't support preload_keys + INSERT INTO t1 (a,b) VALUES (3,'c'),(4,'d'); + SET GLOBAL .key_buffer_size=8*1024; + LOAD INDEX INTO CACHE t1, t2 IGNORE LEAVES; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK +-test.t2 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys ++test.t2 preload_keys note The storage engine for the table doesn't support preload_keys + SET GLOBAL .key_cache_age_threshold = 100, .key_cache_block_size = 512, .key_cache_division_limit = 1, .key_cache_segments=2; + INSERT INTO t1 (a,b) VALUES (5,'e'),(6,'f'); + LOAD INDEX INTO CACHE t1; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys + SET GLOBAL new_.key_buffer_size=128*1024; + CACHE INDEX t1 IN new_; + Table Op Msg_type Msg_text +-test.t1 assign_to_keycache status OK ++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache + INSERT INTO t1 (a,b) VALUES (7,'g'),(8,'h'); + LOAD INDEX INTO CACHE t1 IGNORE LEAVES; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys + INSERT INTO t1 (a,b) VALUES (9,'i'); + DROP TABLE t2; + DROP TABLE t1; +@@ -47,11 +47,11 @@ + ) ENGINE= ; + CACHE INDEX t1 IN ; + Table Op Msg_type Msg_text +-test.t1 assign_to_keycache status OK ++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache + INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); + LOAD INDEX INTO CACHE t1; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys + DROP TABLE t1; + CREATE TABLE t1 (a , + b , +@@ -59,11 +59,11 @@ + ) ENGINE= ; + CACHE INDEX t1 IN ; + Table Op Msg_type Msg_text +-test.t1 assign_to_keycache status OK ++test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache + INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); + LOAD INDEX INTO CACHE t1; + Table Op Msg_type Msg_text +-test.t1 preload_keys status OK ++test.t1 preload_keys note The storage engine for the table doesn't support preload_keys + DROP TABLE t1; + SET GLOBAL .key_buffer_size=0; + SET GLOBAL new_.key_buffer_size=0; diff --git a/storage/myisammrg/mysql-test/storage_engine/checksum_table_live.rdiff b/storage/myisammrg/mysql-test/storage_engine/checksum_table_live.rdiff new file mode 100644 index 00000000..f09aec97 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/checksum_table_live.rdiff @@ -0,0 +1,13 @@ +--- checksum_table_live.result 2013-01-22 22:05:05.246633000 +0400 ++++ checksum_table_live.reject 2013-01-23 02:50:14.440070917 +0400 +@@ -11,8 +11,8 @@ + test.t1 4272806499 + CHECKSUM TABLE t1, t2 QUICK; + Table Checksum +-test.t1 4272806499 +-test.t2 0 ++test.t1 NULL ++test.t2 NULL + CHECKSUM TABLE t1, t2 EXTENDED; + Table Checksum + test.t1 4272806499 diff --git a/storage/myisammrg/mysql-test/storage_engine/cleanup_engine.inc b/storage/myisammrg/mysql-test/storage_engine/cleanup_engine.inc new file mode 100644 index 00000000..b8f84110 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/cleanup_engine.inc @@ -0,0 +1,16 @@ +########################################### +# +# This is a stub of the include file cleanup_engine.inc which +# should be placed in storage//mysql-test/storage_engine folder. +# +################################ +# +# Here you can add whatever is needed to cleanup +# in case your define_engine.inc created any artefacts, +# e.g. an additional schema and/or tables. +--disable_query_log +--disable_warnings +DROP DATABASE IF EXISTS mrg; +--enable_warnings +--enable_query_log + diff --git a/storage/myisammrg/mysql-test/storage_engine/create_table.inc b/storage/myisammrg/mysql-test/storage_engine/create_table.inc new file mode 100644 index 00000000..c74460d4 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/create_table.inc @@ -0,0 +1,208 @@ +################################## +# +# This include file will be used for all CREATE TABLE statements in the suite. +# If you need to add additional steps or change the logic, copy the file +# to storage//mysql-test/storage_engine/ folder and modify it there. +# +################## +# +# Parameters: +# +# --let $create_definition = # optional, default t1 +# --let $table_options =
# optional, default based on define_engine.inc +# --let $partition_options = # optional, default none +# --let $as_select =