diff options
Diffstat (limited to 'mysql-test')
56 files changed, 2640 insertions, 2631 deletions
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index 3f1e63bcfb9..44074d0838d 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -36,6 +36,21 @@ use POSIX qw[ _exit ]; use IO::Handle qw[ flush ]; use mtr_results; +use Term::ANSIColor; + +my %color_map = qw/pass green + retry-pass green + fail red + retry-fail red + disabled bright_black + skipped yellow + reset reset/; +sub xterm_color { + if (-t STDOUT and defined $ENV{TERM} and $ENV{TERM} =~ /xterm/) { + syswrite STDOUT, color($color_map{$_[0]}); + } +} + my $tot_real_time= 0; our $timestamp= 0; @@ -498,7 +513,16 @@ sub mtr_print (@) { sub mtr_report (@) { if (defined $verbose) { - print _name(). join(" ", @_). "\n"; + my @s = split /\[ (\S+) \]/, _name() . "@_\n"; + if (@s > 1) { + print $s[0]; + xterm_color($s[1]); + print "[ $s[1] ]"; + xterm_color('reset'); + print $s[2]; + } else { + print $s[0]; + } } } diff --git a/mysql-test/main/join_outer.result b/mysql-test/main/join_outer.result index 1c81c57b23a..96de74dd6aa 100644 --- a/mysql-test/main/join_outer.result +++ b/mysql-test/main/join_outer.result @@ -2514,6 +2514,40 @@ WHERE tb1.pk = 40 ORDER BY tb1.i1; v2 DROP TABLE t1,t2; +# +# MDEV-19790 : IS NOT TRUE / IS NOT FALSE predicates over +# inner tables of outer joins +# +create table t1 (a int); +create table t2 (b int); +insert into t1 values (3), (7), (1); +insert into t2 values (7), (4), (3); +select * from t1 left join t2 on a=b; +a b +3 3 +7 7 +1 NULL +select * from t1 left join t2 on a=b where (b > 3) is not true; +a b +3 3 +1 NULL +explain extended select * from t1 left join t2 on a=b where (b > 3) is not true; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` left join `test`.`t2` on(`test`.`t2`.`b` = `test`.`t1`.`a`) where `test`.`t2`.`b` > 3 is not true +select * from t1 left join t2 on a=b where (b > 3) is not false; +a b +7 7 +1 NULL +explain extended select * from t1 left join t2 on a=b where (b > 3) is not false; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` left join `test`.`t2` on(`test`.`t2`.`b` = `test`.`t1`.`a`) where `test`.`t2`.`b` > 3 is not false +drop table t1,t2; # end of 5.5 tests # # MDEV-19258: chained right joins all converted to inner joins diff --git a/mysql-test/main/join_outer.test b/mysql-test/main/join_outer.test index c9ac0224745..c02b2e32580 100644 --- a/mysql-test/main/join_outer.test +++ b/mysql-test/main/join_outer.test @@ -2041,6 +2041,29 @@ ORDER BY tb1.i1; DROP TABLE t1,t2; +--echo # +--echo # MDEV-19790 : IS NOT TRUE / IS NOT FALSE predicates over +--echo # inner tables of outer joins +--echo # + +create table t1 (a int); +create table t2 (b int); +insert into t1 values (3), (7), (1); +insert into t2 values (7), (4), (3); +select * from t1 left join t2 on a=b; + +let $q= +select * from t1 left join t2 on a=b where (b > 3) is not true; +eval $q; +eval explain extended $q; + +let $q= +select * from t1 left join t2 on a=b where (b > 3) is not false; +eval $q; +eval explain extended $q; + +drop table t1,t2; + --echo # end of 5.5 tests --echo # diff --git a/mysql-test/main/join_outer_jcl6.result b/mysql-test/main/join_outer_jcl6.result index 91378d1add0..8151231839f 100644 --- a/mysql-test/main/join_outer_jcl6.result +++ b/mysql-test/main/join_outer_jcl6.result @@ -2525,6 +2525,40 @@ WHERE tb1.pk = 40 ORDER BY tb1.i1; v2 DROP TABLE t1,t2; +# +# MDEV-19790 : IS NOT TRUE / IS NOT FALSE predicates over +# inner tables of outer joins +# +create table t1 (a int); +create table t2 (b int); +insert into t1 values (3), (7), (1); +insert into t2 values (7), (4), (3); +select * from t1 left join t2 on a=b; +a b +7 7 +3 3 +1 NULL +select * from t1 left join t2 on a=b where (b > 3) is not true; +a b +3 3 +1 NULL +explain extended select * from t1 left join t2 on a=b where (b > 3) is not true; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t2 hash_ALL NULL #hash#$hj 5 test.t1.a 3 100.00 Using where; Using join buffer (flat, BNLH join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` left join `test`.`t2` on(`test`.`t2`.`b` = `test`.`t1`.`a` and `test`.`t1`.`a` is not null) where `test`.`t2`.`b` > 3 is not true +select * from t1 left join t2 on a=b where (b > 3) is not false; +a b +7 7 +1 NULL +explain extended select * from t1 left join t2 on a=b where (b > 3) is not false; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t2 hash_ALL NULL #hash#$hj 5 test.t1.a 3 100.00 Using where; Using join buffer (flat, BNLH join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` left join `test`.`t2` on(`test`.`t2`.`b` = `test`.`t1`.`a` and `test`.`t1`.`a` is not null) where `test`.`t2`.`b` > 3 is not false +drop table t1,t2; # end of 5.5 tests # # MDEV-19258: chained right joins all converted to inner joins diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index e14975d6de4..eab6a4e5841 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -374,6 +374,8 @@ main(); sub main { + $ENV{MTR_PERL}=$^X; + # Default, verbosity on report_option('verbose', 0); diff --git a/mysql-test/suite/encryption/r/debug_key_management.result b/mysql-test/suite/encryption/r/debug_key_management.result index c06d2bb3965..911a369f0c6 100644 --- a/mysql-test/suite/encryption/r/debug_key_management.result +++ b/mysql-test/suite/encryption/r/debug_key_management.result @@ -4,6 +4,7 @@ show variables like 'innodb_encrypt%'; Variable_name Value innodb_encrypt_log ON innodb_encrypt_tables ON +innodb_encrypt_temporary_tables OFF innodb_encryption_rotate_key_age 2 innodb_encryption_rotation_iops 100 innodb_encryption_threads 4 diff --git a/mysql-test/suite/encryption/r/innochecksum.result b/mysql-test/suite/encryption/r/innochecksum.result index 98bc92ec015..5dc6ed90acc 100644 --- a/mysql-test/suite/encryption/r/innochecksum.result +++ b/mysql-test/suite/encryption/r/innochecksum.result @@ -27,8 +27,7 @@ CREATE TABLE t6 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB; # Run innochecksum on t2 # Run innochecksum on t3 # Run innochecksum on t6 -# In new checksum format, checksum calculated for whole page. -# So It should affected. +# Space ID mismatch # Restore the original tables # Corrupt FIL_DATA+10 (data) # Run innochecksum on t2 diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result index 8a4ab8088d5..934f0607958 100644 --- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result +++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result @@ -96,7 +96,6 @@ connection default; SET DEBUG_SYNC = 'now WAIT_FOR done'; SET GLOBAL innodb_flush_log_at_trx_commit=1; COMMIT; -# restart disconnect con1; select * from t1; f1 f2 diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log.result b/mysql-test/suite/encryption/r/innodb_encrypt_log.result index d0c17ed09ae..ff5b7c15b8b 100644 --- a/mysql-test/suite/encryption/r/innodb_encrypt_log.result +++ b/mysql-test/suite/encryption/r/innodb_encrypt_log.result @@ -22,6 +22,8 @@ key (col_int_key), key (col_char_key) ) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1; CREATE TEMPORARY TABLE t LIKE t0; +Warnings: +Warning 1478 Ignoring encryption parameter during temporary table creation. INSERT INTO t VALUES (NULL,1,1,'private','secret'),(NULL,2,2,'sacred','success'), (NULL,3,3,'story','secure'),(NULL,4,4,'security','sacrament'); diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result b/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result new file mode 100644 index 00000000000..9a291ae1354 --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result @@ -0,0 +1,19 @@ +SELECT variable_value into @old_encrypted FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted'; +SELECT variable_value into @old_decrypted FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted'; +CREATE TEMPORARY TABLE t1(f1 CHAR(200), f2 CHAR(200)) ENGINE=InnoDB; +INSERT INTO t1 (f1,f2) SELECT '', '' FROM seq_1_to_8192; +CREATE TEMPORARY TABLE t2(f1 CHAR(100), f2 CHAR(200), f3 CHAR(200))ENGINE=InnoDB; +INSERT INTO t2 (f1,f2,f3) SELECT '', '', '' FROM seq_1_to_8192; +SELECT COUNT(*) FROM t1; +COUNT(*) +8192 +SELECT variable_value > @old_encrypted FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted'; +variable_value > @old_encrypted +1 +SELECT variable_value > @old_decrypted FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted'; +variable_value > @old_decrypted +1 diff --git a/mysql-test/suite/encryption/r/innodb_encryption.result b/mysql-test/suite/encryption/r/innodb_encryption.result index ab31eed5cf2..4ede82ebd38 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption.result +++ b/mysql-test/suite/encryption/r/innodb_encryption.result @@ -3,6 +3,7 @@ SHOW VARIABLES LIKE 'innodb_encrypt%'; Variable_name Value innodb_encrypt_log ON innodb_encrypt_tables ON +innodb_encrypt_temporary_tables OFF innodb_encryption_rotate_key_age 15 innodb_encryption_rotation_iops 100 innodb_encryption_threads 4 @@ -58,6 +59,7 @@ SHOW VARIABLES LIKE 'innodb_encrypt%'; Variable_name Value innodb_encrypt_log ON innodb_encrypt_tables OFF +innodb_encrypt_temporary_tables OFF innodb_encryption_rotate_key_age 15 innodb_encryption_rotation_iops 100 innodb_encryption_threads 0 diff --git a/mysql-test/suite/encryption/t/innochecksum.test b/mysql-test/suite/encryption/t/innochecksum.test index 0cc48e53fc9..0f44844c103 100644 --- a/mysql-test/suite/encryption/t/innochecksum.test +++ b/mysql-test/suite/encryption/t/innochecksum.test @@ -209,9 +209,8 @@ EOF --exec $INNOCHECKSUM $t3_IBD --echo # Run innochecksum on t6 ---echo # In new checksum format, checksum calculated for whole page. ---echo # So It should affected. ---error $error_code +--echo # Space ID mismatch +--error 1 --exec $INNOCHECKSUM $t6_IBD --enable_result_log diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test index d9a0e4e95cd..f0177b2ca4e 100644 --- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test +++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test @@ -123,6 +123,8 @@ SET DEBUG_SYNC = 'now WAIT_FOR done'; SET GLOBAL innodb_flush_log_at_trx_commit=1; COMMIT; +let $restart_parameters = --innodb_encryption_threads=2; +let $restart_noprint = 2; --let $shutdown_timeout= 0 --source include/restart_mysqld.inc disconnect con1; diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.opt b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.opt new file mode 100644 index 00000000000..70797302d01 --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.opt @@ -0,0 +1,2 @@ +--innodb_buffer_pool_size=5M +--innodb_encrypt_temporary_tables=1 diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test new file mode 100644 index 00000000000..779e77a4540 --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test @@ -0,0 +1,22 @@ +--source include/have_sequence.inc +--source include/have_innodb.inc +--source include/have_file_key_management_plugin.inc + +SELECT variable_value into @old_encrypted FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted'; + +SELECT variable_value into @old_decrypted FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted'; + +CREATE TEMPORARY TABLE t1(f1 CHAR(200), f2 CHAR(200)) ENGINE=InnoDB; +INSERT INTO t1 (f1,f2) SELECT '', '' FROM seq_1_to_8192; + +CREATE TEMPORARY TABLE t2(f1 CHAR(100), f2 CHAR(200), f3 CHAR(200))ENGINE=InnoDB; +INSERT INTO t2 (f1,f2,f3) SELECT '', '', '' FROM seq_1_to_8192; + +SELECT COUNT(*) FROM t1; +SELECT variable_value > @old_encrypted FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted'; + +SELECT variable_value > @old_decrypted FROM information_schema.global_status +WHERE variable_name = 'innodb_encryption_n_temp_blocks_decrypted'; diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 8b3e5500709..fe33f035516 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -19,6 +19,7 @@ MW-329 : wsrep_local_replays not stable MW-336 : MDEV-13549 incorrect wait_condition for wsrep_slave_threads changes MW-360 : needs rewrite to be MariaDB gtid compatible MW-336 : MDEV-19746 Galera test failures because of wsrep_slave_threads identification +MW-388: MDEV-19803 Long semaphore wait error on galera.MW-388 MW-416 : MDEV-13549 Galera test failures MW-44 : MDEV-15809 Test failure on galera.MW-44 galera_account_management : MariaDB 10.0 does not support ALTER USER diff --git a/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc b/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc index 90288bb2913..50267852fb0 100644 --- a/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc +++ b/mysql-test/suite/innodb/include/show_i_s_tablespaces.inc @@ -9,12 +9,10 @@ SELECT s.name 'Space_Name', s.space_type 'Space_Type', s.page_size 'Page_Size', s.zip_page_size 'Zip_Size', - s.row_format 'Formats_Permitted', d.path 'Path' FROM information_schema.innodb_sys_tablespaces s, information_schema.innodb_sys_datafiles d WHERE s.space = d.space AND s.name NOT LIKE 'mysql/%' - AND s.name NOT LIKE 'sys/%' ORDER BY s.space; --enable_query_log diff --git a/mysql-test/suite/innodb/r/alter_missing_tablespace.result b/mysql-test/suite/innodb/r/alter_missing_tablespace.result index 935b8199ab9..5de5d0dfc44 100644 --- a/mysql-test/suite/innodb/r/alter_missing_tablespace.result +++ b/mysql-test/suite/innodb/r/alter_missing_tablespace.result @@ -9,23 +9,23 @@ CREATE TABLE t1(a SERIAL)ENGINE=InnoDB; INSERT INTO t1 VALUES(1),(2),(3); # restart SELECT * FROM t; -ERROR 42S02: Table 'test.t' doesn't exist in engine +ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE; -ERROR 42S02: Table 'test.t' doesn't exist in engine +ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB SHOW WARNINGS; Level Code Message Warning 1812 Tablespace is missing for table 'test/t' -Error 1932 Table 'test.t' doesn't exist in engine +Error 1030 Got error 194 "Tablespace is missing for a table" from storage engine InnoDB ALTER TABLE t ADD INDEX (a), ALGORITHM=COPY; -ERROR 42S02: Table 'test.t' doesn't exist in engine +ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB SHOW WARNINGS; Level Code Message Warning 1812 Tablespace is missing for table 'test/t' -Error 1932 Table 'test.t' doesn't exist in engine +Error 1030 Got error 194 "Tablespace is missing for a table" from storage engine InnoDB ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=INPLACE; -ERROR 42S02: Table 'test.t' doesn't exist in engine +ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=COPY; -ERROR 42S02: Table 'test.t' doesn't exist in engine +ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB ALTER TABLE t ALGORITHM=INPLACE, DISCARD TABLESPACE; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DISCARD TABLESPACE' at line 1 ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE; @@ -38,7 +38,7 @@ Warning 1812 Tablespace is missing for table 'test/t' Warning 1812 Tablespace is missing for table 'test/t' DROP TABLE t; SELECT * FROM `x..d`; -ERROR 42S02: Table 'test.x..d' doesn't exist in engine +ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB DROP TABLE `x..d`; ALTER TABLE t1 DISCARD TABLESPACE; ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=INPLACE; diff --git a/mysql-test/suite/innodb/r/blob-crash.result b/mysql-test/suite/innodb/r/blob-crash.result new file mode 100644 index 00000000000..85d12ff49b5 --- /dev/null +++ b/mysql-test/suite/innodb/r/blob-crash.result @@ -0,0 +1,149 @@ +# +# Bug #16963396 INNODB: USE OF LARGE EXTERNALLY-STORED FIELDS MAKES +# CRASH RECOVERY LOSE DATA +# +# +# Uncompressed Table - Insert Operation - Crash Test +# Fresh insert with blobs +# +CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB; +INSERT INTO t1 (a, b) VALUES (1, repeat('^', 40000)); +INSERT INTO t1 (a, b) VALUES (2, '2'); +INSERT INTO t1 (a, b) VALUES (3, '3'); +INSERT INTO t1 (a, b) VALUES (4, '4'); +INSERT INTO t1 (a, b) VALUES (5, '5'); +begin; +INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 4*1024*1024)); +SELECT a, right(b, 50) FROM t1; +a right(b, 50) +1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 2 +3 3 +4 4 +5 5 +# +# Uncompressed Table - UPDATE Operation - Crash Test +# Update of non-blob column so that blob is needed. +# +begin; +UPDATE t1 set b = REPEAT('a', 4*1024*1024) where a = 5 ; +SELECT a, right(b, 50) FROM t1; +a right(b, 50) +1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 2 +3 3 +4 4 +5 5 +# +# Uncompressed Table - UPDATE Operation - Crash Test +# Update of blob column to blob. +# +connect con1,localhost,root,,; +begin; +UPDATE t1 set b = REPEAT('$', 50000) where a = 1; +connection default; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +UPDATE t1 SET b='five' WHERE a=5; +disconnect con1; +SELECT a, right(b, 50) FROM t1; +a right(b, 50) +1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +2 2 +3 3 +4 4 +5 five +# +# Uncompressed Table - Rollback of UPDATE operation +# Update moves offpage data to inline data. +# +create table t2 (f1 bigint primary key, f2 longblob, f3 longblob, +index(f2(10), f3(10))) engine=innodb; +insert into t2 values (10, repeat('.', 40000), repeat('?', 40000)); +connect con1,localhost,root,,; +begin; +update t2 set f2 = '='; +select f1, right(f2, 20), right(f3, 20) from t2; +f1 right(f2, 20) right(f3, 20) +10 = ???????????????????? +update t2 set f3 = '&'; +select f1, right(f2, 20), right(f3, 20) from t2; +f1 right(f2, 20) right(f3, 20) +10 = & +connection default; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1 WHERE a=1; +disconnect con1; +select f1, right(f2, 20), right(f3, 20) from t2; +f1 right(f2, 20) right(f3, 20) +10 .................... ???????????????????? +check table t2; +Table Op Msg_type Msg_text +test.t2 check status OK +drop table t2; +# +# Compressed Table - Insert Operation - Crash Test +# fresh insert with BLOBs +# +set global innodb_compression_level = 0; +create table t3 (f1 bigint primary key, f2 longblob, f3 longblob, +index(f2(10), f3(10))) engine=innodb row_format=compressed; +connect con1,localhost,root,,; +begin; +INSERT INTO t3 (f1, f2, f3) VALUES (6, repeat('/', 40000), repeat('<', 40000)); +connection default; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1 WHERE a=2; +disconnect con1; +select f1, length(f2), length(f3) from t3; +f1 length(f2) length(f3) +select f1, right(f2, 30), right(f3, 20) from t3; +f1 right(f2, 30) right(f3, 20) +check table t3; +Table Op Msg_type Msg_text +test.t3 check status OK +# +# Compressed Table - Update Operation - Crash Test +# update of a non-BLOB column so that BLOB is needed +# +set global innodb_compression_level = 0; +insert into t3 values (2, repeat('!', 30), repeat('+', 30)); +connect con1,localhost,root,,; +begin; +UPDATE t3 set f2 = repeat('>', 40000) where f1 = 2; +connection default; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1 WHERE a=3; +disconnect con1; +select f1, length(f2), length(f3) from t3; +f1 length(f2) length(f3) +2 30 30 +select f1, right(f2, 30), right(f3, 20) from t3; +f1 right(f2, 30) right(f3, 20) +2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ++++++++++++++++++++ +check table t3; +Table Op Msg_type Msg_text +test.t3 check status OK +# +# Compressed Table - Update Operation - Crash Test +# update blob to blob +# +set global innodb_compression_level = 0; +insert into t3 values (3, repeat('%', 40000), repeat('~', 40000)); +connect con1,localhost,root,,; +begin; +UPDATE t3 set f2 = concat(f2, repeat(',', 10)) where f1 = 3; +connection default; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1 WHERE a=4; +select f1, length(f2), length(f3) from t3; +f1 length(f2) length(f3) +2 30 30 +3 40000 40000 +select f1, right(f2, 30), right(f3, 20) from t3; +f1 right(f2, 30) right(f3, 20) +2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ++++++++++++++++++++ +3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ~~~~~~~~~~~~~~~~~~~~ +check table t3; +Table Op Msg_type Msg_text +test.t3 check status OK +DROP TABLE t1,t3; diff --git a/mysql-test/suite/innodb/r/innodb_buffer_pool_dump_pct.result b/mysql-test/suite/innodb/r/innodb_buffer_pool_dump_pct.result new file mode 100644 index 00000000000..d9f5e4dfeed --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_buffer_pool_dump_pct.result @@ -0,0 +1,22 @@ +CREATE TABLE tab5 (col1 int auto_increment primary key, +col2 VARCHAR(25), col3 varchar(25)) ENGINE=InnoDB; +CREATE INDEX idx1 ON tab5(col2(10)); +CREATE INDEX idx2 ON tab5(col3(10)); +SET GLOBAL innodb_buffer_pool_filename=ib_buffer_pool100; +SET GLOBAL innodb_buffer_pool_dump_pct=100; +SELECT variable_value INTO @IBPDS +FROM information_schema.global_status +WHERE variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS'; +SET GLOBAL innodb_buffer_pool_dump_now=ON; +SET GLOBAL innodb_buffer_pool_filename=ib_buffer_pool1; +SET GLOBAL innodb_buffer_pool_dump_pct=1; +SELECT @@global.innodb_buffer_pool_dump_pct; +@@global.innodb_buffer_pool_dump_pct +1 +SELECT variable_value INTO @IBPDS +FROM information_schema.global_status +WHERE variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS'; +SET GLOBAL innodb_buffer_pool_dump_now=ON; +SET GLOBAL innodb_buffer_pool_dump_pct=DEFAULT; +SET GLOBAL innodb_buffer_pool_filename=DEFAULT; +DROP TABLE tab5; diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 7a164da41b5..b78988e08a8 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -3133,8 +3133,49 @@ ERROR 22007: Truncated incorrect datetime value: '' DROP TABLE t1; SET SQL_MODE=DEFAULT; # -# Bug#56862 Moved to innodb_16k.test +# Bug#56862 Execution of a query that uses index merge returns a wrong result # +CREATE TABLE t1 ( +pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, +a int, +b int, +INDEX idx(a)) +ENGINE=INNODB; +INSERT INTO t1(a,b) VALUES +(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), +(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), +(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), +(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); +set @optimizer_switch_saved=@@optimizer_switch; +SET SESSION optimizer_switch='derived_merge=off'; +SET SESSION sort_buffer_size = 1024*36; +EXPLAIN +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 1537 +2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 1537 Using sort_union(idx,PRIMARY); Using where +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +COUNT(*) +1537 +set @@optimizer_switch=@optimizer_switch_saved; +SET SESSION sort_buffer_size = DEFAULT; +DROP TABLE t1; # # Test for bug #39932 "create table fails if column for FK is in different # case than in corr index". diff --git a/mysql-test/suite/innodb/r/missing_tablespaces.result b/mysql-test/suite/innodb/r/missing_tablespaces.result new file mode 100644 index 00000000000..11b79273498 --- /dev/null +++ b/mysql-test/suite/innodb/r/missing_tablespaces.result @@ -0,0 +1,11 @@ +# +# Bug#19419026 WHEN A TABLESPACE IS NOT FOUND, DO NOT REPORT "TABLE NOT FOUND" +# +CREATE DATABASE `..................................................`; +USE `..................................................`; +CREATE TABLE `..................................................` (ID INT) +ENGINE=INNODB; +select * from `..................................................`; +ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB +DROP TABLE `..................................................`; +DROP DATABASE `..................................................`; diff --git a/mysql-test/suite/innodb/r/page_id_innochecksum.result b/mysql-test/suite/innodb/r/page_id_innochecksum.result new file mode 100644 index 00000000000..e2c13442fe6 --- /dev/null +++ b/mysql-test/suite/innodb/r/page_id_innochecksum.result @@ -0,0 +1,6 @@ +# Set the environmental variables +create table t1(f1 int not null)engine=innodb; +insert into t1 values(1), (2), (3); +# Change the page offset +FOUND 1 /page id mismatch/ in result.log +drop table t1; diff --git a/mysql-test/suite/innodb/r/purge.result b/mysql-test/suite/innodb/r/purge.result new file mode 100644 index 00000000000..fe10ca1f4d5 --- /dev/null +++ b/mysql-test/suite/innodb/r/purge.result @@ -0,0 +1,121 @@ +SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; +# Bug #12429576 - Test an assertion failure on purge. +CREATE TABLE t1_purge ( +A int, +B blob, C blob, D blob, E blob, +F blob, G blob, H blob, +PRIMARY KEY (B(767), C(767), D(767), E(767), A), +INDEX (A) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t1_purge VALUES (1, +REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766), +REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766)); +CREATE TABLE t2_purge ( +A int PRIMARY KEY, +B blob, C blob, D blob, E blob, +F blob, G blob, H blob, I blob, +J blob, K blob, L blob, +INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t2_purge VALUES (1, +REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766), +REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766), REPEAT('i', 766), +REPEAT('j', 766), REPEAT('k', 766), REPEAT('l', 766)); +CREATE TABLE t3_purge ( +A int, +B varchar(800), C varchar(800), D varchar(800), E varchar(800), +F varchar(800), G varchar(800), H varchar(800), +PRIMARY KEY (B(767), C(767), D(767), E(767), A), +INDEX (A) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t3_purge SELECT * FROM t1_purge; +CREATE TABLE t4_purge ( +A int PRIMARY KEY, +B varchar(800), C varchar(800), D varchar(800), E varchar(800), +F varchar(800), G varchar(800), H varchar(800), I varchar(800), +J varchar(800), K varchar(800), L varchar(800), +INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t4_purge SELECT * FROM t2_purge; +DELETE FROM t1_purge; +DELETE FROM t2_purge; +DELETE FROM t3_purge; +DELETE FROM t4_purge; +SET @r=REPEAT('a',500); +CREATE TABLE t12637786(a int, +v1 varchar(500), v2 varchar(500), v3 varchar(500), +v4 varchar(500), v5 varchar(500), v6 varchar(500), +v7 varchar(500), v8 varchar(500), v9 varchar(500), +v10 varchar(500), v11 varchar(500), v12 varchar(500), +v13 varchar(500), v14 varchar(500), v15 varchar(500), +v16 varchar(500), v17 varchar(500), v18 varchar(500) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +CREATE INDEX idx1 ON t12637786(a,v1); +INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +UPDATE t12637786 SET a=1000; +DELETE FROM t12637786; +# Bug#12963823 - Test that the purge thread does not crash when +CREATE TABLE t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob, +i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob) +ENGINE=innodb ROW_FORMAT=dynamic; +SET @r = REPEAT('a', 767); +INSERT INTO t12963823 VALUES (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r); +CREATE INDEX ndx_a ON t12963823 (a(500)); +CREATE INDEX ndx_b ON t12963823 (b(500)); +CREATE INDEX ndx_c ON t12963823 (c(500)); +CREATE INDEX ndx_d ON t12963823 (d(500)); +CREATE INDEX ndx_e ON t12963823 (e(500)); +CREATE INDEX ndx_f ON t12963823 (f(500)); +CREATE INDEX ndx_k ON t12963823 (k(500)); +CREATE INDEX ndx_l ON t12963823 (l(500)); +SET @r = REPEAT('b', 500); +UPDATE t12963823 set a=@r,b=@r,c=@r,d=@r; +UPDATE t12963823 set e=@r,f=@r,g=@r,h=@r; +UPDATE t12963823 set i=@r,j=@r,k=@r,l=@r; +UPDATE t12963823 set m=@r,n=@r,o=@r,p=@r; +ALTER TABLE t12963823 DROP INDEX ndx_a; +ALTER TABLE t12963823 DROP INDEX ndx_b; +CREATE INDEX ndx_g ON t12963823 (g(500)); +CREATE INDEX ndx_h ON t12963823 (h(500)); +CREATE INDEX ndx_i ON t12963823 (i(500)); +CREATE INDEX ndx_j ON t12963823 (j(500)); +CREATE INDEX ndx_m ON t12963823 (m(500)); +CREATE INDEX ndx_n ON t12963823 (n(500)); +CREATE INDEX ndx_o ON t12963823 (o(500)); +CREATE INDEX ndx_p ON t12963823 (p(500)); +SHOW CREATE TABLE t12963823; +Table Create Table +t12963823 CREATE TABLE `t12963823` ( + `a` blob DEFAULT NULL, + `b` blob DEFAULT NULL, + `c` blob DEFAULT NULL, + `d` blob DEFAULT NULL, + `e` blob DEFAULT NULL, + `f` blob DEFAULT NULL, + `g` blob DEFAULT NULL, + `h` blob DEFAULT NULL, + `i` blob DEFAULT NULL, + `j` blob DEFAULT NULL, + `k` blob DEFAULT NULL, + `l` blob DEFAULT NULL, + `m` blob DEFAULT NULL, + `n` blob DEFAULT NULL, + `o` blob DEFAULT NULL, + `p` blob DEFAULT NULL, + KEY `ndx_c` (`c`(500)), + KEY `ndx_d` (`d`(500)), + KEY `ndx_e` (`e`(500)), + KEY `ndx_f` (`f`(500)), + KEY `ndx_k` (`k`(500)), + KEY `ndx_l` (`l`(500)), + KEY `ndx_g` (`g`(500)), + KEY `ndx_h` (`h`(500)), + KEY `ndx_i` (`i`(500)), + KEY `ndx_j` (`j`(500)), + KEY `ndx_m` (`m`(500)), + KEY `ndx_n` (`n`(500)), + KEY `ndx_o` (`o`(500)), + KEY `ndx_p` (`p`(500)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +InnoDB 0 transactions not purged +DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge, t12637786, t12963823; +SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency; diff --git a/mysql-test/suite/innodb/r/truncate_missing.result b/mysql-test/suite/innodb/r/truncate_missing.result index 62a4ef5c552..938bd5f2213 100644 --- a/mysql-test/suite/innodb/r/truncate_missing.result +++ b/mysql-test/suite/innodb/r/truncate_missing.result @@ -12,7 +12,7 @@ t CREATE TABLE `t` ( ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 # restart SELECT * FROM t; -ERROR 42S02: Table 'test.t' doesn't exist in engine +ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB TRUNCATE TABLE t; -ERROR 42S02: Table 'test.t' doesn't exist in engine +ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/alter_missing_tablespace.test b/mysql-test/suite/innodb/t/alter_missing_tablespace.test index bdcbdfb4408..287aa437d10 100644 --- a/mysql-test/suite/innodb/t/alter_missing_tablespace.test +++ b/mysql-test/suite/innodb/t/alter_missing_tablespace.test @@ -35,22 +35,21 @@ INSERT INTO t1 VALUES(1),(2),(3); --source include/start_mysqld.inc -# The ER_NO_SUCH_TABLE is being thrown by ha_innobase::open(). # The table does exist, only the tablespace does not exist. ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_GET_ERRNO SELECT * FROM t; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_GET_ERRNO ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE; SHOW WARNINGS; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_GET_ERRNO ALTER TABLE t ADD INDEX (a), ALGORITHM=COPY; SHOW WARNINGS; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_GET_ERRNO ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=INPLACE; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_GET_ERRNO ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=COPY; --error ER_PARSE_ERROR @@ -61,7 +60,7 @@ ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE; ALTER TABLE t ALGORITHM=DEFAULT, DISCARD TABLESPACE; ALTER TABLE t DISCARD TABLESPACE; DROP TABLE t; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_GET_ERRNO SELECT * FROM `x..d`; DROP TABLE `x..d`; diff --git a/mysql-test/suite/innodb/t/blob-crash.test b/mysql-test/suite/innodb/t/blob-crash.test new file mode 100644 index 00000000000..beb500553ea --- /dev/null +++ b/mysql-test/suite/innodb/t/blob-crash.test @@ -0,0 +1,209 @@ +--source include/maybe_debug.inc +--source include/innodb_page_size_small.inc + +--echo # +--echo # Bug #16963396 INNODB: USE OF LARGE EXTERNALLY-STORED FIELDS MAKES +--echo # CRASH RECOVERY LOSE DATA +--echo # + +# .......................................................................... + +--echo # +--echo # Uncompressed Table - Insert Operation - Crash Test +--echo # Fresh insert with blobs +--echo # + +CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB; + +# Insert a few rows (it doesn't really matter how many). These transactions +# are committed once they are acked, so they should not be lost. +INSERT INTO t1 (a, b) VALUES (1, repeat('^', 40000)); +INSERT INTO t1 (a, b) VALUES (2, '2'); +INSERT INTO t1 (a, b) VALUES (3, '3'); +INSERT INTO t1 (a, b) VALUES (4, '4'); +INSERT INTO t1 (a, b) VALUES (5, '5'); + +# The BLOB insert will fail, and should disappear. However no data committed +# up to this point should be lost. +begin; +INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 4*1024*1024)); + +let $shutdown_timeout=0; +let $restart_noprint=2; +--source include/restart_mysqld.inc + +SELECT a, right(b, 50) FROM t1; + +# .......................................................................... + +--echo # +--echo # Uncompressed Table - UPDATE Operation - Crash Test +--echo # Update of non-blob column so that blob is needed. +--echo # + +# The BLOB update will fail, and should disappear. However no data committed +# up to this point should be lost. +begin; +UPDATE t1 set b = REPEAT('a', 4*1024*1024) where a = 5 ; + +let $shutdown_timeout=0; +--source include/restart_mysqld.inc + +SELECT a, right(b, 50) FROM t1; + +# .......................................................................... + +--echo # +--echo # Uncompressed Table - UPDATE Operation - Crash Test +--echo # Update of blob column to blob. +--echo # + +# The BLOB update will fail, and should disappear. However no data committed +# up to this point should be lost. +connect (con1,localhost,root,,); +begin; +UPDATE t1 set b = REPEAT('$', 50000) where a = 1; + +connection default; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +UPDATE t1 SET b='five' WHERE a=5; + +let $shutdown_timeout=0; +--source include/restart_mysqld.inc + +disconnect con1; + +SELECT a, right(b, 50) FROM t1; + +# .......................................................................... + +--echo # +--echo # Uncompressed Table - Rollback of UPDATE operation +--echo # Update moves offpage data to inline data. +--echo # + +create table t2 (f1 bigint primary key, f2 longblob, f3 longblob, + index(f2(10), f3(10))) engine=innodb; + +insert into t2 values (10, repeat('.', 40000), repeat('?', 40000)); + +connect (con1,localhost,root,,); +begin; +update t2 set f2 = '='; +select f1, right(f2, 20), right(f3, 20) from t2; +update t2 set f3 = '&'; +select f1, right(f2, 20), right(f3, 20) from t2; + +if ($have_debug) { +--disable_query_log +set DEBUG_SYNC='blob_rollback_middle SIGNAL stuck WAIT_FOR ever'; +send ROLLBACK; +--enable_query_log +} + +connection default; +if ($have_debug) { +--disable_query_log +SET DEBUG_SYNC = 'now WAIT_FOR stuck'; +--enable_query_log +} +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1 WHERE a=1; + +let $shutdown_timeout=0; +--source include/restart_mysqld.inc + +disconnect con1; + +select f1, right(f2, 20), right(f3, 20) from t2; +check table t2; +drop table t2; + +# .......................................................................... + +--echo # +--echo # Compressed Table - Insert Operation - Crash Test +--echo # fresh insert with BLOBs +--echo # + +set global innodb_compression_level = 0; + +create table t3 (f1 bigint primary key, f2 longblob, f3 longblob, + index(f2(10), f3(10))) engine=innodb row_format=compressed; + +# The BLOB insert will fail, and should disappear. However no data committed +# up to this point should be lost. +connect (con1,localhost,root,,); +begin; +INSERT INTO t3 (f1, f2, f3) VALUES (6, repeat('/', 40000), repeat('<', 40000)); + +connection default; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1 WHERE a=2; + +let $shutdown_timeout=0; +--source include/restart_mysqld.inc + +disconnect con1; + +select f1, length(f2), length(f3) from t3; +select f1, right(f2, 30), right(f3, 20) from t3; +check table t3; + +# .......................................................................... + +--echo # +--echo # Compressed Table - Update Operation - Crash Test +--echo # update of a non-BLOB column so that BLOB is needed +--echo # + +set global innodb_compression_level = 0; +insert into t3 values (2, repeat('!', 30), repeat('+', 30)); + +# The BLOB update will fail, and should disappear. However no data committed +# up to this point should be lost. +connect (con1,localhost,root,,); +begin; +UPDATE t3 set f2 = repeat('>', 40000) where f1 = 2; + +connection default; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1 WHERE a=3; + +let $shutdown_timeout=0; +--source include/restart_mysqld.inc + +disconnect con1; + +select f1, length(f2), length(f3) from t3; +select f1, right(f2, 30), right(f3, 20) from t3; +check table t3; + +# .......................................................................... + +--echo # +--echo # Compressed Table - Update Operation - Crash Test +--echo # update blob to blob +--echo # + +set global innodb_compression_level = 0; +insert into t3 values (3, repeat('%', 40000), repeat('~', 40000)); + +# The BLOB update will fail, and should disappear. However no data committed +# up to this point should be lost. +connect (con1,localhost,root,,); +begin; +UPDATE t3 set f2 = concat(f2, repeat(',', 10)) where f1 = 3; + +connection default; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1 WHERE a=4; + +let $shutdown_timeout=0; +--source include/restart_mysqld.inc + +select f1, length(f2), length(f3) from t3; +select f1, right(f2, 30), right(f3, 20) from t3; +check table t3; + +DROP TABLE t1,t3; diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_dump_pct.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_dump_pct.test new file mode 100644 index 00000000000..a7a414d61da --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_dump_pct.test @@ -0,0 +1,99 @@ +# ************************************************************ +# wl6504: This testcase is to check the functionality of the +# innodb_buffer_pool_dump_pct flag +# step 1.Set innodb_buffer_pool_dump_pct=100 and take the dump +# step 2.Set innodb_buffer_pool_dump_pct=1 and take the dump +# step 3.Compare the size of both the dump files +#************************************************************* +--source include/have_innodb.inc +--source include/have_innodb_16k.inc + +let MYSQLD_DATADIR = `SELECT @@datadir`; + +CREATE TABLE tab5 (col1 int auto_increment primary key, +col2 VARCHAR(25), col3 varchar(25)) ENGINE=InnoDB; +CREATE INDEX idx1 ON tab5(col2(10)); +CREATE INDEX idx2 ON tab5(col3(10)); + +SET GLOBAL innodb_buffer_pool_filename=ib_buffer_pool100; +SET GLOBAL innodb_buffer_pool_dump_pct=100; + +#*********************************************************** +# SELECT * +# FROM information_schema.global_status +# WHERE variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS' +# gives +# a) VARIABLE_NAME VARIABLE_VALUE +# INNODB_BUFFER_POOL_DUMP_STATUS not started +# in case there was no innodb_buffer_pool_dump since server start. +# b) Something like +# VARIABLE_NAME VARIABLE_VALUE +# INNODB_BUFFER_POOL_DUMP_STATUS Buffer pool(s) dump completed at 130711 13:43:24 +# in case there was a innodb_buffer_pool_dump since server start. +# Attention: +# - There is no guarantee that the current test is the first test which +# made an innodb_buffer_pool_dump since server startup. +# - The granularity of the timestamp is one second. +# - There could have been some dump caused by some previous test +# just a few milliseconds before. +# In order to avoid conflict with previous tests, read the current value +# of INNODB_BUFFER_POOL_DUMP_STATUS +# and confirm that the timestamp is different after the dump +#*********************************************************** + +# Read the current value to compare with the new value. +SELECT variable_value INTO @IBPDS +FROM information_schema.global_status +WHERE variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS'; +SET GLOBAL innodb_buffer_pool_dump_now=ON; + +# Sleep one second in order to ensure that the time stamp is +# different at next dump +--sleep 1 + +let $wait_condition = SELECT count(*) = 1 +FROM information_schema.global_status +WHERE variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS' +AND variable_value != @IBPDS +AND variable_value like 'Buffer pool(s) dump completed at%'; +--source include/wait_condition.inc + +--file_exists $MYSQLD_DATADIR/ib_buffer_pool100 +SET GLOBAL innodb_buffer_pool_filename=ib_buffer_pool1; +SET GLOBAL innodb_buffer_pool_dump_pct=1; +SELECT @@global.innodb_buffer_pool_dump_pct; + +# Read the current value to compare with the new value. +--disable_warnings +SELECT variable_value INTO @IBPDS +FROM information_schema.global_status +WHERE variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS'; +--enable_warnings + +SET GLOBAL innodb_buffer_pool_dump_now=ON; + +# Sleep one second in order to ensure that the time stamp is +# different at next dump +--sleep 1 + +let $wait_condition = SELECT count(*) = 1 +FROM information_schema.global_status +WHERE variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS' +AND variable_value != @IBPDS +AND variable_value like 'Buffer pool(s) dump completed at%'; +--source include/wait_condition.inc + +--file_exists $MYSQLD_DATADIR/ib_buffer_pool1 + +perl; +my $size1 = -s "$ENV{MYSQLD_DATADIR}/ib_buffer_pool1"; +my $size100 = -s "$ENV{MYSQLD_DATADIR}/ib_buffer_pool100"; +die "$size100<=$size1\n" unless $size100 > $size1; +EOF + +SET GLOBAL innodb_buffer_pool_dump_pct=DEFAULT; +SET GLOBAL innodb_buffer_pool_filename=DEFAULT; + +--remove_file $MYSQLD_DATADIR/ib_buffer_pool100 +--remove_file $MYSQLD_DATADIR/ib_buffer_pool1 +DROP TABLE tab5; diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test index dc247a96468..23bba81c6bd 100644 --- a/mysql-test/suite/innodb/t/innodb_mysql.test +++ b/mysql-test/suite/innodb/t/innodb_mysql.test @@ -818,8 +818,52 @@ DROP TABLE t1; SET SQL_MODE=DEFAULT; --echo # ---echo # Bug#56862 Moved to innodb_16k.test +--echo # Bug#56862 Execution of a query that uses index merge returns a wrong result --echo # + +CREATE TABLE t1 ( + pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, + a int, + b int, + INDEX idx(a)) +ENGINE=INNODB; + +INSERT INTO t1(a,b) VALUES + (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), + (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), + (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), + (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); + +set @optimizer_switch_saved=@@optimizer_switch; +SET SESSION optimizer_switch='derived_merge=off'; +SET SESSION sort_buffer_size = 1024*36; + +EXPLAIN +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +set @@optimizer_switch=@optimizer_switch_saved; +SET SESSION sort_buffer_size = DEFAULT; + +DROP TABLE t1; + --echo # --echo # Test for bug #39932 "create table fails if column for FK is in different --echo # case than in corr index". diff --git a/mysql-test/suite/innodb/t/missing_tablespaces.test b/mysql-test/suite/innodb/t/missing_tablespaces.test new file mode 100644 index 00000000000..b4da9745ba4 --- /dev/null +++ b/mysql-test/suite/innodb/t/missing_tablespaces.test @@ -0,0 +1,37 @@ +--source include/have_innodb.inc + +#Restarting not supported in embedded +--source include/not_embedded.inc +#Windows has trouble creating files/directories with long names +--source include/not_windows.inc + +--echo # +--echo # Bug#19419026 WHEN A TABLESPACE IS NOT FOUND, DO NOT REPORT "TABLE NOT FOUND" +--echo # + +#Create database and tablename with all special characters + +CREATE DATABASE `..................................................`; +USE `..................................................`; +CREATE TABLE `..................................................` (ID INT) +ENGINE=INNODB; + +let $restart_noprint=2; +--source include/shutdown_mysqld.inc + +--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e/@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.ibd + +--source include/start_mysqld.inc + +--disable_query_log +call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number 2 in a file operation."); +call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified."); +call mtr.add_suppression("\\[ERROR\\] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them."); +call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot open datafile for read-only"); +call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace .* because it could not be opened"); +--enable_query_log + +--error ER_GET_ERRNO +select * from `..................................................`; +DROP TABLE `..................................................`; +DROP DATABASE `..................................................`; diff --git a/mysql-test/suite/innodb/t/page_id_innochecksum.test b/mysql-test/suite/innodb/t/page_id_innochecksum.test new file mode 100644 index 00000000000..807185437d5 --- /dev/null +++ b/mysql-test/suite/innodb/t/page_id_innochecksum.test @@ -0,0 +1,54 @@ +--source include/have_innodb.inc +--source include/not_embedded.inc +--echo # Set the environmental variables +let MYSQLD_BASEDIR= `SELECT @@basedir`; +let MYSQLD_DATADIR= `SELECT @@datadir`; +let INNODB_PAGE_SIZE=`select @@innodb_page_size`; + +create table t1(f1 int not null)engine=innodb; +insert into t1 values(1), (2), (3); +let $resultlog=$MYSQLTEST_VARDIR/tmp/result.log; + +let $restart_noprint=2; +--source include/shutdown_mysqld.inc +--echo # Change the page offset +perl; +use strict; +use warnings; +use Fcntl qw(:DEFAULT :seek); +do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl"; + +my $page_size = $ENV{INNODB_PAGE_SIZE}; + +sysopen IBD_FILE, "$ENV{MYSQLD_DATADIR}/test/t1.ibd", O_RDWR +|| die "Cannot open t1.ibd\n"; +sysread(IBD_FILE, $_, 38) || die "Cannot read t1.ibd\n"; +my $space = unpack("x[34]N", $_); +sysseek(IBD_FILE, $page_size * 3, SEEK_SET) || die "Cannot seek t1.ibd\n"; + +my $head = pack("Nx[18]", 4); # better to have a valid page number +my $body = chr(0) x ($page_size - 38 - 8); + +# Calculate innodb_checksum_algorithm=crc32 for the unencrypted page. +# The following bytes are excluded: +# bytes 0..3 (the checksum is stored there) +# bytes 26..37 (encryption key version, post-encryption checksum, tablespace id) +# bytes $page_size-8..$page_size-1 (checksum, LSB of FIL_PAGE_LSN) +my $polynomial = 0x82f63b78; # CRC-32C +my $ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial); + +my $page= pack("N",$ck).$head.pack("NNN",1,$ck,$space).$body.pack("Nx[4]",$ck); +die unless syswrite(IBD_FILE, $page, $page_size) == $page_size; +close IBD_FILE; +EOF + +--error 1 +exec $INNOCHECKSUM -C crc32 -l $resultlog $MYSQLD_DATADIR/test/t1.ibd; + +let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/result.log; +let SEARCH_PATTERN=page id mismatch; +--source include/search_pattern_in_file.inc + +--remove_file $resultlog +--source include/start_mysqld.inc +drop table t1; diff --git a/mysql-test/suite/innodb/t/purge.test b/mysql-test/suite/innodb/t/purge.test new file mode 100644 index 00000000000..63312e50fd8 --- /dev/null +++ b/mysql-test/suite/innodb/t/purge.test @@ -0,0 +1,117 @@ +--source include/have_innodb.inc +--source include/have_innodb_16k.inc + +SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; + +--echo # Bug #12429576 - Test an assertion failure on purge. +CREATE TABLE t1_purge ( +A int, +B blob, C blob, D blob, E blob, +F blob, G blob, H blob, +PRIMARY KEY (B(767), C(767), D(767), E(767), A), +INDEX (A) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + +INSERT INTO t1_purge VALUES (1, +REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766), +REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766)); + +CREATE TABLE t2_purge ( +A int PRIMARY KEY, +B blob, C blob, D blob, E blob, +F blob, G blob, H blob, I blob, +J blob, K blob, L blob, +INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + +INSERT INTO t2_purge VALUES (1, +REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766), +REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766), REPEAT('i', 766), +REPEAT('j', 766), REPEAT('k', 766), REPEAT('l', 766)); + +CREATE TABLE t3_purge ( +A int, +B varchar(800), C varchar(800), D varchar(800), E varchar(800), +F varchar(800), G varchar(800), H varchar(800), +PRIMARY KEY (B(767), C(767), D(767), E(767), A), +INDEX (A) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + +INSERT INTO t3_purge SELECT * FROM t1_purge; + +CREATE TABLE t4_purge ( +A int PRIMARY KEY, +B varchar(800), C varchar(800), D varchar(800), E varchar(800), +F varchar(800), G varchar(800), H varchar(800), I varchar(800), +J varchar(800), K varchar(800), L varchar(800), +INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; + +INSERT INTO t4_purge SELECT * FROM t2_purge; + +# This would trigger the failure (Bug #12429576) +# if purge gets a chance to run before DROP TABLE t1_purge, .... +DELETE FROM t1_purge; +DELETE FROM t2_purge; +DELETE FROM t3_purge; +DELETE FROM t4_purge; +# We need to activate the purge thread before DROP TABLE. + +# Bug#12637786 - Assertion hit; ut_ad(dict_index_is_clust(index)); +# A secondary index tuple is found to be too long to fit into a page. +# This test is not in innodb_8k or innodb_4k since the bug is not about +# page size. It just tests the condition that caused the assertion. +SET @r=REPEAT('a',500); +CREATE TABLE t12637786(a int, + v1 varchar(500), v2 varchar(500), v3 varchar(500), + v4 varchar(500), v5 varchar(500), v6 varchar(500), + v7 varchar(500), v8 varchar(500), v9 varchar(500), + v10 varchar(500), v11 varchar(500), v12 varchar(500), + v13 varchar(500), v14 varchar(500), v15 varchar(500), + v16 varchar(500), v17 varchar(500), v18 varchar(500) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +CREATE INDEX idx1 ON t12637786(a,v1); +INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +UPDATE t12637786 SET a=1000; +DELETE FROM t12637786; +# We need to activate the purge thread before DROP TABLE +# to make sure it is able to clean up the old versions. + +--echo # Bug#12963823 - Test that the purge thread does not crash when +# the number of indexes has changed since the UNDO record was logged. +# This test is not in innodb_8k or innodb_4k since the bug is not about +# page size. It just tests the condition that caused the crash. +CREATE TABLE t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob, + i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob) + ENGINE=innodb ROW_FORMAT=dynamic; +SET @r = REPEAT('a', 767); +INSERT INTO t12963823 VALUES (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r); +CREATE INDEX ndx_a ON t12963823 (a(500)); +CREATE INDEX ndx_b ON t12963823 (b(500)); +CREATE INDEX ndx_c ON t12963823 (c(500)); +CREATE INDEX ndx_d ON t12963823 (d(500)); +CREATE INDEX ndx_e ON t12963823 (e(500)); +CREATE INDEX ndx_f ON t12963823 (f(500)); +CREATE INDEX ndx_k ON t12963823 (k(500)); +CREATE INDEX ndx_l ON t12963823 (l(500)); + +SET @r = REPEAT('b', 500); +UPDATE t12963823 set a=@r,b=@r,c=@r,d=@r; +UPDATE t12963823 set e=@r,f=@r,g=@r,h=@r; +UPDATE t12963823 set i=@r,j=@r,k=@r,l=@r; +UPDATE t12963823 set m=@r,n=@r,o=@r,p=@r; +ALTER TABLE t12963823 DROP INDEX ndx_a; +ALTER TABLE t12963823 DROP INDEX ndx_b; +CREATE INDEX ndx_g ON t12963823 (g(500)); +CREATE INDEX ndx_h ON t12963823 (h(500)); +CREATE INDEX ndx_i ON t12963823 (i(500)); +CREATE INDEX ndx_j ON t12963823 (j(500)); +CREATE INDEX ndx_m ON t12963823 (m(500)); +CREATE INDEX ndx_n ON t12963823 (n(500)); +CREATE INDEX ndx_o ON t12963823 (o(500)); +CREATE INDEX ndx_p ON t12963823 (p(500)); +SHOW CREATE TABLE t12963823; +# We need to activate the purge thread before DROP TABLE. + +-- source include/wait_all_purged.inc +DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge, t12637786, t12963823; +SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency; diff --git a/mysql-test/suite/innodb/t/truncate_missing.test b/mysql-test/suite/innodb/t/truncate_missing.test index 832b94e3a19..c357f5bae72 100644 --- a/mysql-test/suite/innodb/t/truncate_missing.test +++ b/mysql-test/suite/innodb/t/truncate_missing.test @@ -15,8 +15,8 @@ let $datadir=`select @@datadir`; --remove_file $datadir/test/t.ibd --source include/start_mysqld.inc ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_GET_ERRNO SELECT * FROM t; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_GET_ERRNO TRUNCATE TABLE t; DROP TABLE t; diff --git a/mysql-test/suite/innodb_fts/r/fulltext2.result b/mysql-test/suite/innodb_fts/r/fulltext2.result index 9376d088244..b210b3bd874 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext2.result +++ b/mysql-test/suite/innodb_fts/r/fulltext2.result @@ -241,3 +241,34 @@ a „MySQL“ DROP TABLE t1; SET NAMES latin1; +CREATE TABLE t1 ( +FTS_DOC_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +id int(10) not null , +first_name varchar(50) NOT NULL, +last_name varchar(50) NOT NULL, +PRIMARY KEY (FTS_DOC_ID), +UNIQUE KEY idx_1 (first_name, last_name), +FULLTEXT KEY `idx_2` (first_name) +) ENGINE=InnoDB; +INSERT INTO t1 (id, first_name, last_name) VALUES +(10, 'Bart', 'Simpson'), +(11, 'Homer', 'Simpson'), +(12, 'Marge', 'Simpson'), +(13, 'Lisa', 'Simpson'), +(14, 'Maggie', 'Simpson'), +(15, 'Ned', 'Flanders'), +(16, 'Nelson', 'Muntz'); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT fts_doc_id, first_name, last_name, MATCH(first_name) AGAINST('Homer' IN BOOLEAN MODE) AS score FROM t1; +fts_doc_id first_name last_name score +1 Bart Simpson 0 +2 Homer Simpson 0.7141907215118408 +4 Lisa Simpson 0 +5 Maggie Simpson 0 +3 Marge Simpson 0 +6 Ned Flanders 0 +7 Nelson Muntz 0 +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/t/fulltext2.test b/mysql-test/suite/innodb_fts/t/fulltext2.test index 1c31bcd0319..4dd2c78827f 100644 --- a/mysql-test/suite/innodb_fts/t/fulltext2.test +++ b/mysql-test/suite/innodb_fts/t/fulltext2.test @@ -231,3 +231,29 @@ INSERT INTO t1 VALUES('„MySQL“'); SELECT a FROM t1 WHERE MATCH a AGAINST('“MySQL„' IN BOOLEAN MODE); DROP TABLE t1; SET NAMES latin1; + +# +# Bug #20597981 - WRONG RELEVANCE RANKING FOR FULL TEXT SEARCHES +# WHEN FTS_DOC_ID IS PRIMARY KEY +CREATE TABLE t1 ( + FTS_DOC_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, + id int(10) not null , + first_name varchar(50) NOT NULL, + last_name varchar(50) NOT NULL, + PRIMARY KEY (FTS_DOC_ID), + UNIQUE KEY idx_1 (first_name, last_name), + FULLTEXT KEY `idx_2` (first_name) +) ENGINE=InnoDB; + +INSERT INTO t1 (id, first_name, last_name) VALUES +(10, 'Bart', 'Simpson'), +(11, 'Homer', 'Simpson'), +(12, 'Marge', 'Simpson'), +(13, 'Lisa', 'Simpson'), +(14, 'Maggie', 'Simpson'), +(15, 'Ned', 'Flanders'), +(16, 'Nelson', 'Muntz'); + +analyze table t1; +SELECT fts_doc_id, first_name, last_name, MATCH(first_name) AGAINST('Homer' IN BOOLEAN MODE) AS score FROM t1; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_zip/r/4k.result b/mysql-test/suite/innodb_zip/r/4k.result deleted file mode 100644 index e7e0d65b487..00000000000 --- a/mysql-test/suite/innodb_zip/r/4k.result +++ /dev/null @@ -1,406 +0,0 @@ -SET default_storage_engine=InnoDB; -# Test 1) Show the page size from Information Schema -SELECT variable_value FROM information_schema.global_status -WHERE LOWER(variable_name) = 'innodb_page_size'; -variable_value -4096 -# Test 2) The number of buffer pool pages is dependent upon the page size. -SELECT variable_value FROM information_schema.global_status -WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; -variable_value -{checked_valid} -# Test 3) Query some information_shema tables that are dependent upon -# the page size. -SELECT t.name table_name, t.n_cols, t.flag table_flags, -i.name index_name, i.page_no root_page, i.type, -i.n_fields, i.merge_threshold -FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, -INFORMATION_SCHEMA.INNODB_SYS_INDEXES i -WHERE t.table_id = i.table_id -AND t.name LIKE 'mysql%' - ORDER BY t.name, i.index_id; -table_name n_cols table_flags index_name root_page type n_fields merge_threshold -mysql/innodb_index_stats 11 33 PRIMARY 3 3 4 50 -mysql/innodb_table_stats 9 33 PRIMARY 3 3 2 50 -mysql/transaction_registry 8 33 PRIMARY 3 3 1 50 -mysql/transaction_registry 8 33 commit_id 4 2 1 50 -mysql/transaction_registry 8 33 begin_timestamp 5 0 1 50 -mysql/transaction_registry 8 33 commit_timestamp 6 0 2 50 -CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb; -CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb; -CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb; -CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb; -SELECT t.name table_name, t.n_cols, t.flag table_flags, -i.name index_name, i.page_no root_page, i.type, -i.n_fields, i.merge_threshold -FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, -INFORMATION_SCHEMA.INNODB_SYS_INDEXES i -WHERE t.table_id = i.table_id -AND t.name LIKE 'test%' - ORDER BY t.name, i.name; -table_name n_cols table_flags index_name root_page type n_fields merge_threshold -test/t1 5 0 PRIMARY 3 3 1 50 -test/t2 5 1 PRIMARY 3 3 1 50 -test/t3 5 37 PRIMARY 3 3 1 50 -test/t4 5 33 PRIMARY 3 3 1 50 -=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd -test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd -test/t3 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3.ibd -test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd -DROP TABLE t1, t2, t3, t4; -# Test 4) The maximum row size is dependent upon the page size. -# Redundant: 1979, Compact: 1982. -# Compressed: 1982, Dynamic: 1982. -# Each row format has its own amount of overhead that -# varies depending on number of fields and other overhead. -SET SESSION innodb_strict_mode = ON; -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(127) -) ROW_FORMAT=redundant; -DROP TABLE t1; -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(128) -) ROW_FORMAT=redundant; -ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155) -) ROW_FORMAT=compact; -DROP TABLE t1; -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156) -) ROW_FORMAT=compact; -ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76) -) ROW_FORMAT=compressed; -DROP TABLE t1; -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(79) -) ROW_FORMAT=compressed; -ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155) -) ROW_FORMAT=dynamic; -DROP TABLE t1; -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156) -) ROW_FORMAT=dynamic; -ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -CREATE TABLE t1 (a varchar(64) character set utf8, -b varchar(64) character set utf8, -c varchar(64) character set utf8, -d varchar(64) character set utf8, -PRIMARY KEY (a,b,c,d)) -ENGINE=innodb; -DROP TABLE t1; -CREATE TABLE t1 (a varchar(64) character set utf8, -b varchar(64) character set utf8, -c varchar(64) character set utf8, -d varchar(65) character set utf8, -PRIMARY KEY (a,b,c,d)) -ENGINE=innodb; -ERROR 42000: Specified key was too long; max key length is 768 bytes -CREATE TABLE t1 (a varchar(64) character set utf8, -b varchar(64) character set utf8, -c varchar(64) character set utf8, -d varchar(64) character set utf8, -e varchar(64) character set utf8, -PRIMARY KEY (a), KEY (b,c,d,e)) -ENGINE=innodb; -DROP TABLE t1; -CREATE TABLE t1 (a varchar(64) character set utf8, -b varchar(64) character set utf8, -c varchar(64) character set utf8, -d varchar(64) character set utf8, -e varchar(65) character set utf8, -PRIMARY KEY (a), KEY (b,c,d,e)) -ENGINE=innodb; -ERROR 42000: Specified key was too long; max key length is 768 bytes -# Test 5) Make sure that KEY_BLOCK_SIZE=4, 2 & 1 are all -# accepted and that KEY_BLOCK_SIZE=16 & 8 are rejected -# in strict mode and converted to 4 in non-strict mode. -SET SESSION innodb_strict_mode = ON; -CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; -ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4. -Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4. -Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=4 -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=2 -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=1 -ALTER TABLE t1 KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED -DROP TABLE t1; -SET SESSION innodb_strict_mode = OFF; -CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=16 -DROP TABLE t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=8 -DROP TABLE t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=4 -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=2 -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=1 -ALTER TABLE t1 KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED -DROP TABLE t1; -# Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16 -# are both rejected when innodb_file_per_table=OFF -SET SESSION innodb_strict_mode = ON; -SET GLOBAL innodb_file_per_table = OFF; -SHOW VARIABLES LIKE 'innodb_file_per_table'; -Variable_name Value -innodb_file_per_table OFF -CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8; -ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options") -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4. -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB -CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16; -ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options") -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4. -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB -SET GLOBAL innodb_file_per_table = ON; -# Test 7) Not included here; 16k only -# Test 8) Test creating a table that could lead to undo log overflow. -CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, -h blob,i blob,j blob,k blob,l blob,m blob,n blob, -o blob,p blob,q blob,r blob,s blob,t blob,u blob) -ENGINE=InnoDB ROW_FORMAT=dynamic; -SET @a = repeat('a', 767); -SET @b = repeat('b', 767); -SET @c = repeat('c', 767); -SET @d = repeat('d', 767); -SET @e = repeat('e', 767); -INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a); -UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b, -k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b; -CREATE INDEX t1a ON t1 (a(767)); -UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, -k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c; -CREATE INDEX t1b ON t1 (b(767)); -BEGIN; -UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, -k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; -ROLLBACK; -BEGIN; -UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; -UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d, -n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; -COMMIT; -CREATE INDEX t1c ON t1 (c(767)); -UPDATE t1 SET c=@e; -CREATE INDEX t1d ON t1 (d(767)); -BEGIN; -UPDATE t1 SET d=@e; -ROLLBACK; -CREATE INDEX t1e ON t1 (e(767)); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` blob DEFAULT NULL, - `b` blob DEFAULT NULL, - `c` blob DEFAULT NULL, - `d` blob DEFAULT NULL, - `e` blob DEFAULT NULL, - `f` blob DEFAULT NULL, - `g` blob DEFAULT NULL, - `h` blob DEFAULT NULL, - `i` blob DEFAULT NULL, - `j` blob DEFAULT NULL, - `k` blob DEFAULT NULL, - `l` blob DEFAULT NULL, - `m` blob DEFAULT NULL, - `n` blob DEFAULT NULL, - `o` blob DEFAULT NULL, - `p` blob DEFAULT NULL, - `q` blob DEFAULT NULL, - `r` blob DEFAULT NULL, - `s` blob DEFAULT NULL, - `t` blob DEFAULT NULL, - `u` blob DEFAULT NULL, - KEY `t1a` (`a`(767)), - KEY `t1b` (`b`(767)), - KEY `t1c` (`c`(767)), - KEY `t1d` (`d`(767)), - KEY `t1e` (`e`(767)) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC -DROP TABLE t1; -SET SESSION innodb_strict_mode = OFF; -CREATE TABLE t1( -pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48), -pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48), -pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48), -pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48), -sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48), -sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48), -sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48), -sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48), -PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, -pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), -KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, -sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) -ROW_FORMAT=Redundant ENGINE=InnoDB; -SET @r = repeat('a', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('b', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('c', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('d', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('e', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -DELETE from t1; -DROP TABLE t1; -CREATE TABLE t1( -pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48), -pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48), -pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48), -pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48), -sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48), -sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48), -sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48), -sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48), -PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, -pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), -KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, -sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) -ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 ENGINE=InnoDB; -SET @r = repeat('a', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('b', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('c', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('d', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('e', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -DELETE from t1; -DROP TABLE t1; -SET SESSION innodb_strict_mode = off; -CREATE TABLE t1( -c text NOT NULL, d text NOT NULL, -PRIMARY KEY (c(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -Warnings: -Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -DROP TABLE t1; -CREATE TABLE t1( -c text NOT NULL, d text NOT NULL, -PRIMARY KEY (c(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; -drop table t1; -CREATE TABLE t1( -c text NOT NULL, d text NOT NULL, -PRIMARY KEY (c(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; -drop table t1; -CREATE TABLE t1(c text, PRIMARY KEY (c(440))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -Warnings: -Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -DROP TABLE t1; -CREATE TABLE t1(c text, PRIMARY KEY (c(438))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); -DROP TABLE t1; diff --git a/mysql-test/suite/innodb_zip/r/8k.result b/mysql-test/suite/innodb_zip/r/8k.result deleted file mode 100644 index 76cc9d59aba..00000000000 --- a/mysql-test/suite/innodb_zip/r/8k.result +++ /dev/null @@ -1,437 +0,0 @@ -SET default_storage_engine=InnoDB; -# Test 1) Show the page size from Information Schema -SELECT variable_value FROM information_schema.global_status -WHERE LOWER(variable_name) = 'innodb_page_size'; -variable_value -8192 -# Test 2) The number of buffer pool pages is dependent upon the page size. -SELECT variable_value FROM information_schema.global_status -WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; -variable_value -{checked_valid} -# Test 3) Query some information_shema tables that are dependent upon -# the page size. -SELECT t.name table_name, t.n_cols, t.flag table_flags, -i.name index_name, i.page_no root_page, i.type, -i.n_fields, i.merge_threshold -FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, -INFORMATION_SCHEMA.INNODB_SYS_INDEXES i -WHERE t.table_id = i.table_id -AND t.name LIKE 'mysql%' - ORDER BY t.name, i.index_id; -table_name n_cols table_flags index_name root_page type n_fields merge_threshold -mysql/innodb_index_stats 11 33 PRIMARY 3 3 4 50 -mysql/innodb_table_stats 9 33 PRIMARY 3 3 2 50 -mysql/transaction_registry 8 33 PRIMARY 3 3 1 50 -mysql/transaction_registry 8 33 commit_id 4 2 1 50 -mysql/transaction_registry 8 33 begin_timestamp 5 0 1 50 -mysql/transaction_registry 8 33 commit_timestamp 6 0 2 50 -CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb; -CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb; -CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb; -CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb; -SELECT t.name table_name, t.n_cols, t.flag table_flags, -i.name index_name, i.page_no root_page, i.type, -i.n_fields, i.merge_threshold -FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, -INFORMATION_SCHEMA.INNODB_SYS_INDEXES i -WHERE t.table_id = i.table_id -AND t.name LIKE 'test%' - ORDER BY t.name, i.name; -table_name n_cols table_flags index_name root_page type n_fields merge_threshold -test/t1 5 0 PRIMARY 3 3 1 50 -test/t2 5 1 PRIMARY 3 3 1 50 -test/t3 5 39 PRIMARY 3 3 1 50 -test/t4 5 33 PRIMARY 3 3 1 50 -=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd -test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd -test/t3 Single DEFAULT 4096 Compressed MYSQLD_DATADIR/test/t3.ibd -test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd -DROP TABLE t1, t2, t3, t4; -# Test 4) The maximum row size is dependent upon the page size. -# Redundant: 4027, Compact: 4030. -# Compressed: 4030, Dynamic: 4030. -# Each row format has its own amount of overhead that -# varies depending on number of fields and other overhead. -SET SESSION innodb_strict_mode = ON; -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(155) -) ROW_FORMAT=redundant; -DROP TABLE t1; -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(156) -) ROW_FORMAT=redundant; -ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202) -) ROW_FORMAT=compact; -DROP TABLE t1; -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203) -) ROW_FORMAT=compact; -ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103) -) ROW_FORMAT=compressed; -DROP TABLE t1; -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(106) -) ROW_FORMAT=compressed; -ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202) -) ROW_FORMAT=dynamic; -DROP TABLE t1; -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203) -) ROW_FORMAT=dynamic; -ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -CREATE TABLE t1 (a varchar(128) character set utf8, -b varchar(128) character set utf8, -c varchar(128) character set utf8, -d varchar(128) character set utf8, -PRIMARY KEY (a,b,c,d)) -ENGINE=innodb; -DROP TABLE t1; -CREATE TABLE t1 (a varchar(128) character set utf8, -b varchar(128) character set utf8, -c varchar(128) character set utf8, -d varchar(129) character set utf8, -PRIMARY KEY (a,b,c,d)) -ENGINE=innodb; -ERROR 42000: Specified key was too long; max key length is 1536 bytes -CREATE TABLE t1 (a varchar(128) character set utf8, -b varchar(128) character set utf8, -c varchar(128) character set utf8, -d varchar(128) character set utf8, -e varchar(128) character set utf8, -PRIMARY KEY (a), KEY (b,c,d,e)) -ENGINE=innodb; -DROP TABLE t1; -CREATE TABLE t1 (a varchar(128) character set utf8, -b varchar(128) character set utf8, -c varchar(128) character set utf8, -d varchar(128) character set utf8, -e varchar(129) character set utf8, -PRIMARY KEY (a), KEY (b,c,d,e)) -ENGINE=innodb; -ERROR 42000: Specified key was too long; max key length is 1536 bytes -# Test 5) Make sure that KEY_BLOCK_SIZE=8, 4, 2 & 1 are all -# accepted and that KEY_BLOCK_SIZE=16 is rejected in -# strict mode and converted to 8 in non-strict mode. -SET SESSION innodb_strict_mode = ON; -CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; -ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8. -Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=8 -ALTER TABLE t1 KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=4 -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=2 -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=1 -ALTER TABLE t1 KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED -DROP TABLE t1; -SET SESSION innodb_strict_mode = OFF; -CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=16 -DROP TABLE t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=8 -DROP TABLE t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=4 -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=2 -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED key_block_size=1 -ALTER TABLE t1 KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT table_name, row_format, create_options -FROM information_schema.tables WHERE table_name = 't1'; -table_name row_format create_options -t1 Compressed row_format=COMPRESSED -DROP TABLE t1; -# Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16 -# are rejected when innodb_file_per_table=OFF -SET SESSION innodb_strict_mode = ON; -SET GLOBAL innodb_file_per_table = OFF; -SHOW VARIABLES LIKE 'innodb_file_per_table'; -Variable_name Value -innodb_file_per_table OFF -CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8; -ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options") -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB -CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16; -ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options") -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8. -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options") -Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB -SET GLOBAL innodb_file_per_table = ON; -# Test 7) Not included here; 16k only -# Test 8) Test creating a table that could lead to undo log overflow. -CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, -h blob,i blob,j blob,k blob,l blob,m blob,n blob, -o blob,p blob,q blob,r blob,s blob,t blob,u blob) -ENGINE=InnoDB ROW_FORMAT=dynamic; -SET @a = repeat('a', 767); -SET @b = repeat('b', 767); -SET @c = repeat('c', 767); -SET @d = repeat('d', 767); -SET @e = repeat('e', 767); -INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a); -UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b, -k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b; -CREATE INDEX t1a ON t1 (a(767)); -CREATE INDEX t1b ON t1 (b(767)); -UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, -k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c; -CREATE INDEX t1c ON t1 (c(767)); -BEGIN; -UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, -k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; -ROLLBACK; -BEGIN; -UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; -UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d, -n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; -COMMIT; -CREATE INDEX t1d ON t1 (d(767)); -UPDATE t1 SET d=@e; -CREATE INDEX t1e ON t1 (e(767)); -UPDATE t1 SET e=@e; -CREATE INDEX t1f ON t1 (f(767)); -UPDATE t1 SET f=@e; -CREATE INDEX t1g ON t1 (g(767)); -UPDATE t1 SET g=@e; -CREATE INDEX t1h ON t1 (h(767)); -UPDATE t1 SET h=@e; -CREATE INDEX t1i ON t1 (i(767)); -UPDATE t1 SET i=@e; -CREATE INDEX t1k ON t1 (j(767)); -CREATE INDEX t1j ON t1 (j(500)); -BEGIN; -UPDATE t1 SET j=@e; -ROLLBACK; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` blob DEFAULT NULL, - `b` blob DEFAULT NULL, - `c` blob DEFAULT NULL, - `d` blob DEFAULT NULL, - `e` blob DEFAULT NULL, - `f` blob DEFAULT NULL, - `g` blob DEFAULT NULL, - `h` blob DEFAULT NULL, - `i` blob DEFAULT NULL, - `j` blob DEFAULT NULL, - `k` blob DEFAULT NULL, - `l` blob DEFAULT NULL, - `m` blob DEFAULT NULL, - `n` blob DEFAULT NULL, - `o` blob DEFAULT NULL, - `p` blob DEFAULT NULL, - `q` blob DEFAULT NULL, - `r` blob DEFAULT NULL, - `s` blob DEFAULT NULL, - `t` blob DEFAULT NULL, - `u` blob DEFAULT NULL, - KEY `t1a` (`a`(767)), - KEY `t1b` (`b`(767)), - KEY `t1c` (`c`(767)), - KEY `t1d` (`d`(767)), - KEY `t1e` (`e`(767)), - KEY `t1f` (`f`(767)), - KEY `t1g` (`g`(767)), - KEY `t1h` (`h`(767)), - KEY `t1i` (`i`(767)), - KEY `t1k` (`j`(767)), - KEY `t1j` (`j`(500)) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC -DROP TABLE t1; -SET SESSION innodb_strict_mode = OFF; -CREATE TABLE t1( -pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96), -pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96), -pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96), -pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96), -sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96), -sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96), -sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96), -sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96), -PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, -pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), -KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, -sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) -ROW_FORMAT=Redundant ENGINE=InnoDB; -SET @r = repeat('a', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('b', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('c', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('d', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('e', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -DELETE from t1; -DROP TABLE t1; -CREATE TABLE t1( -pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96), -pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96), -pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96), -pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96), -sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96), -sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96), -sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96), -sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96), -PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, -pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), -KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, -sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) -ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8 ENGINE=InnoDB; -SET @r = repeat('a', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('b', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('c', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('d', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('e', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, -@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -DELETE from t1; -DROP TABLE t1; -SET SESSION innodb_strict_mode = off; -CREATE TABLE t1( -c text NOT NULL, d text NOT NULL, -PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -Warnings: -Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -DROP TABLE t1; -CREATE TABLE t1( -c text NOT NULL, d text NOT NULL, -PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; -Warnings: -Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -DROP TABLE t1; -CREATE TABLE t1( -c text NOT NULL, d text NOT NULL, -PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; -drop table t1; -CREATE TABLE t1(c text, PRIMARY KEY (c(440))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -Warnings: -Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -DROP TABLE t1; -CREATE TABLE t1(c text, PRIMARY KEY (c(438))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); -DROP TABLE t1; diff --git a/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff b/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff new file mode 100644 index 00000000000..0423520455c --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/page_size,4k.rdiff @@ -0,0 +1,469 @@ +--- page_size.result ++++ page_size,4k.result +@@ -3,7 +3,7 @@ + SELECT variable_value FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_page_size'; + variable_value +-16384 ++4096 + # Test 3) Query some information_shema tables that are dependent upon + # the page size. + SELECT t.name table_name, t.n_cols, t.flag table_flags, +@@ -36,13 +36,13 @@ + table_name n_cols table_flags index_name root_page type n_fields merge_threshold + test/t1 5 0 PRIMARY 3 3 1 50 + test/t2 5 1 PRIMARY 3 3 1 50 +-test/t3 5 41 PRIMARY 3 3 1 50 ++test/t3 5 37 PRIMARY 3 3 1 50 + test/t4 5 33 PRIMARY 3 3 1 50 + === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === + Space_Name Space_Type Page_Size Zip_Size Path + test/t1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd + test/t2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd +-test/t3 Single DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd ++test/t3 Single DEFAULT 2048 MYSQLD_DATADIR/test/t3.ibd + test/t4 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd + DROP TABLE t1, t2, t3, t4; + # Test 4) The maximum row size is dependent upon the page size. +@@ -51,141 +51,90 @@ + SET SESSION innodb_strict_mode = ON; + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(211) ++c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(127) + ) ROW_FORMAT=redundant; + DROP TABLE t1; + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(212) ++c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(128) + ) ROW_FORMAT=redundant; +-ERROR 42000: Row size too large (> 8123). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. ++ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246) ++c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155) + ) ROW_FORMAT=compact; + DROP TABLE t1; + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247) ++c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156) + ) ROW_FORMAT=compact; +-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. ++ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157) ++c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76) + ) ROW_FORMAT=compressed; + DROP TABLE t1; + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(160) ++c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(79) + ) ROW_FORMAT=compressed; +-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. ++ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246) ++c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155) + ) ROW_FORMAT=dynamic; + DROP TABLE t1; + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247) ++c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156) + ) ROW_FORMAT=dynamic; +-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. +-CREATE TABLE t1 (a varchar(255) character set utf8, +-b varchar(255) character set utf8, +-c varchar(255) character set utf8, +-d varchar(255) character set utf8, +-e varchar(4) character set utf8, +-PRIMARY KEY (a,b,c,d,e)) ++ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. ++CREATE TABLE t1 (a varchar(98) character set utf8, ++b varchar(98) character set utf8, ++c varchar(98) character set utf8, ++d varchar(97) character set utf8, ++PRIMARY KEY (a,b,c,d)) + ENGINE=innodb; + DROP TABLE t1; +-CREATE TABLE t1 (a varchar(255) character set utf8, +-b varchar(255) character set utf8, +-c varchar(255) character set utf8, +-d varchar(255) character set utf8, +-e varchar(5) character set utf8, +-PRIMARY KEY (a,b,c,d,e)) ++CREATE TABLE t1 (a varchar(98) character set utf8, ++b varchar(98) character set utf8, ++c varchar(98) character set utf8, ++d varchar(98) character set utf8, ++PRIMARY KEY (a,b,c,d)) + ENGINE=innodb; +-ERROR 42000: Specified key was too long; max key length is 3072 bytes +-CREATE TABLE t1 (a varchar(255) character set utf8, +-b varchar(255) character set utf8, +-c varchar(255) character set utf8, +-d varchar(255) character set utf8, +-e varchar(255) character set utf8, +-f varchar(4) character set utf8, +-PRIMARY KEY (a), KEY (b,c,d,e,f)) ++ERROR 42000: Specified key was too long; max key length is 1173 bytes ++CREATE TABLE t1 (a varchar(98) character set utf8, ++b varchar(98) character set utf8, ++c varchar(98) character set utf8, ++d varchar(98) character set utf8, ++e varchar(97) character set utf8, ++PRIMARY KEY (a), KEY (b,c,d,e)) + ENGINE=innodb; + DROP TABLE t1; +-CREATE TABLE t1 (a varchar(255) character set utf8, +-b varchar(255) character set utf8, +-c varchar(255) character set utf8, +-d varchar(255) character set utf8, +-e varchar(255) character set utf8, +-f varchar(5) character set utf8, +-PRIMARY KEY (a), KEY (b,c,d,e,f)) ++CREATE TABLE t1 (a varchar(98) character set utf8, ++b varchar(98) character set utf8, ++c varchar(98) character set utf8, ++d varchar(98) character set utf8, ++e varchar(98) character set utf8, ++PRIMARY KEY (a), KEY (b,c,d,e)) + ENGINE=innodb; +-ERROR 42000: Specified key was too long; max key length is 3072 bytes ++ERROR 42000: Specified key was too long; max key length is 1173 bytes + # Test 5) KEY_BLOCK_SIZE validation + CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; ++ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") + SHOW WARNINGS; + Level Code Message +-SELECT table_name, row_format, create_options +-FROM information_schema.tables WHERE table_name = 't1'; +-table_name row_format create_options +-t1 Compressed row_format=COMPRESSED key_block_size=16 +-ALTER TABLE t1 KEY_BLOCK_SIZE=8; ++Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4. ++Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") ++Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB ++CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; ++ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") + SHOW WARNINGS; + Level Code Message +-SELECT table_name, row_format, create_options +-FROM information_schema.tables WHERE table_name = 't1'; +-table_name row_format create_options +-t1 Compressed row_format=COMPRESSED key_block_size=8 ++Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4. ++Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") ++Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB ++CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; + ALTER TABLE t1 KEY_BLOCK_SIZE=4; + SHOW WARNINGS; + Level Code Message +@@ -217,15 +166,21 @@ + DROP TABLE t1; + SET SESSION innodb_strict_mode = OFF; + CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; ++Warnings: ++Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. + SHOW WARNINGS; + Level Code Message ++Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. + SELECT table_name, row_format, create_options + FROM information_schema.tables WHERE table_name = 't1'; + table_name row_format create_options + t1 Compressed row_format=COMPRESSED key_block_size=16 + ALTER TABLE t1 KEY_BLOCK_SIZE=8; ++Warnings: ++Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. + SHOW WARNINGS; + Level Code Message ++Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8. + SELECT table_name, row_format, create_options + FROM information_schema.tables WHERE table_name = 't1'; + table_name row_format create_options +@@ -269,6 +224,7 @@ + ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options") + SHOW WARNINGS; + Level Code Message ++Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4. + Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. + Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options") + Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +@@ -276,105 +232,11 @@ + ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options") + SHOW WARNINGS; + Level Code Message ++Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4. + Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. + Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options") + Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB + SET GLOBAL innodb_file_per_table = ON; +-# Test 7) This series of tests were moved from innodb-index to here +-# because the second alter table t1 assumes a 16k page size. +-# Moving the test allows the rest of innodb-index to be run on all +-# page sizes. The previously disabled portions of this test were +-# moved as well. +-CREATE TABLE t2(d varchar(17) PRIMARY KEY) ENGINE=innodb DEFAULT CHARSET=utf8; +-CREATE TABLE t3(a int PRIMARY KEY) ENGINE=innodb; +-INSERT INTO t3 VALUES (22),(44),(33),(55),(66); +-INSERT INTO t2 VALUES ('jejdkrun87'),('adfd72nh9k'), +-('adfdpplkeock'),('adfdijnmnb78k'),('adfdijn0loKNHJik'); +-CREATE TABLE t1(a int, b blob, c text, d text NOT NULL) +-ENGINE=innodb DEFAULT CHARSET=utf8 STATS_PERSISTENT=0; +-INSERT INTO t1 +-SELECT a,LEFT(REPEAT(d,100*a),65535),REPEAT(d,20*a),d FROM t2,t3 order by a, d; +-DROP TABLE t2, t3; +-SELECT COUNT(*) FROM t1 WHERE a=44; +-COUNT(*) +-5 +-SELECT a, +-LENGTH(b),b=LEFT(REPEAT(d,100*a),65535),LENGTH(c),c=REPEAT(d,20*a),d FROM t1 +-ORDER BY 1, 2, 3, 4, 5, 6; +-a LENGTH(b) b=LEFT(REPEAT(d,100*a),65535) LENGTH(c) c=REPEAT(d,20*a) d +-22 22000 1 4400 1 adfd72nh9k +-22 22000 1 4400 1 jejdkrun87 +-22 26400 1 5280 1 adfdpplkeock +-22 28600 1 5720 1 adfdijnmnb78k +-22 35200 1 7040 1 adfdijn0loKNHJik +-33 33000 1 6600 1 adfd72nh9k +-33 33000 1 6600 1 jejdkrun87 +-33 39600 1 7920 1 adfdpplkeock +-33 42900 1 8580 1 adfdijnmnb78k +-33 52800 1 10560 1 adfdijn0loKNHJik +-44 44000 1 8800 1 adfd72nh9k +-44 44000 1 8800 1 jejdkrun87 +-44 52800 1 10560 1 adfdpplkeock +-44 57200 1 11440 1 adfdijnmnb78k +-44 65535 1 14080 1 adfdijn0loKNHJik +-55 55000 1 11000 1 adfd72nh9k +-55 55000 1 11000 1 jejdkrun87 +-55 65535 1 13200 1 adfdpplkeock +-55 65535 1 14300 1 adfdijnmnb78k +-55 65535 1 17600 1 adfdijn0loKNHJik +-66 65535 1 13200 1 adfd72nh9k +-66 65535 1 13200 1 jejdkrun87 +-66 65535 1 15840 1 adfdpplkeock +-66 65535 1 17160 1 adfdijnmnb78k +-66 65535 1 21120 1 adfdijn0loKNHJik +-ALTER TABLE t1 ADD PRIMARY KEY (a), ADD KEY (b(20)); +-ERROR 23000: Duplicate entry '22' for key 'PRIMARY' +-DELETE FROM t1 WHERE d='null'; +-ALTER TABLE t1 ADD PRIMARY KEY (a), ADD KEY (b(20)); +-ERROR 23000: Duplicate entry '22' for key 'PRIMARY' +-DELETE FROM t1 WHERE a%2; +-CHECK TABLE t1; +-Table Op Msg_type Msg_text +-test.t1 check status OK +-ALTER TABLE t1 ADD PRIMARY KEY (a,b(255),c(255)), ADD KEY (b(767)); +-SELECT COUNT(*) FROM t1 WHERE a=44; +-COUNT(*) +-5 +-SELECT a, +-LENGTH(b), b=LEFT(REPEAT(d,100*a), 65535),LENGTH(c), c=REPEAT(d,20*a), d FROM t1; +-a LENGTH(b) b=LEFT(REPEAT(d,100*a), 65535) LENGTH(c) c=REPEAT(d,20*a) d +-22 22000 1 4400 1 adfd72nh9k +-22 35200 1 7040 1 adfdijn0loKNHJik +-22 28600 1 5720 1 adfdijnmnb78k +-22 26400 1 5280 1 adfdpplkeock +-22 22000 1 4400 1 jejdkrun87 +-44 44000 1 8800 1 adfd72nh9k +-44 65535 1 14080 1 adfdijn0loKNHJik +-44 57200 1 11440 1 adfdijnmnb78k +-44 52800 1 10560 1 adfdpplkeock +-44 44000 1 8800 1 jejdkrun87 +-66 65535 1 13200 1 adfd72nh9k +-66 65535 1 21120 1 adfdijn0loKNHJik +-66 65535 1 17160 1 adfdijnmnb78k +-66 65535 1 15840 1 adfdpplkeock +-66 65535 1 13200 1 jejdkrun87 +-SHOW CREATE TABLE t1; +-Table Create Table +-t1 CREATE TABLE `t1` ( +- `a` int(11) NOT NULL, +- `b` blob NOT NULL, +- `c` text NOT NULL, +- `d` text NOT NULL, +- PRIMARY KEY (`a`,`b`(255),`c`(255)), +- KEY `b` (`b`(767)) +-) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 +-CHECK TABLE t1; +-Table Op Msg_type Msg_text +-test.t1 check status OK +-EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%'; +-id select_type table type possible_keys key key_len ref rows Extra +-1 SIMPLE t1 range b b 769 NULL # Using where +-DROP TABLE t1; + # Test 8) Test creating a table that could lead to undo log overflow. + CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, + h blob,i blob,j blob,k blob,l blob,m blob,n blob, +@@ -389,10 +251,6 @@ + UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b, + k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b; + CREATE INDEX t1a ON t1 (a(767)); +-CREATE INDEX t1b ON t1 (b(767)); +-CREATE INDEX t1c ON t1 (c(767)); +-CREATE INDEX t1d ON t1 (d(767)); +-CREATE INDEX t1e ON t1 (e(767)); + UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, + k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c; + CREATE INDEX t1f ON t1 (f(767)); +@@ -407,37 +265,15 @@ + COMMIT; + CREATE INDEX t1g ON t1 (g(767)); + UPDATE t1 SET g=@e; +-CREATE INDEX t1h ON t1 (h(767)); +-UPDATE t1 SET h=@e; +-CREATE INDEX t1i ON t1 (i(767)); +-UPDATE t1 SET i=@e; +-CREATE INDEX t1j ON t1 (j(767)); +-UPDATE t1 SET j=@e; +-CREATE INDEX t1k ON t1 (k(767)); +-UPDATE t1 SET k=@e; +-CREATE INDEX t1l ON t1 (l(767)); +-UPDATE t1 SET l=@e; +-CREATE INDEX t1m ON t1 (m(767)); +-UPDATE t1 SET m=@e; +-CREATE INDEX t1n ON t1 (n(767)); +-UPDATE t1 SET n=@e; +-CREATE INDEX t1o ON t1 (o(767)); +-UPDATE t1 SET o=@e; +-CREATE INDEX t1p ON t1 (p(767)); +-UPDATE t1 SET p=@e; +-CREATE INDEX t1q ON t1 (q(767)); +-UPDATE t1 SET q=@e; +-CREATE INDEX t1r ON t1 (r(767)); +-UPDATE t1 SET r=@e; +-CREATE INDEX t1s ON t1 (s(767)); +-UPDATE t1 SET s=@e; + CREATE INDEX t1t ON t1 (t(767)); + BEGIN; + UPDATE t1 SET t=@e; + ROLLBACK; + CREATE INDEX t1u ON t1 (u(767)); +-CREATE INDEX t1ut ON t1 (u(767), t(767)); +-CREATE INDEX t1st ON t1 (s(767), t(767)); ++CREATE INDEX t1ut ON t1 (u(767)); ++Warnings: ++Note 1831 Duplicate index `t1ut`. This is deprecated and will be disallowed in a future release ++CREATE INDEX t1st ON t1 (s(767)); + SHOW CREATE TABLE t1; + Table Create Table + t1 CREATE TABLE `t1` ( +@@ -463,28 +299,12 @@ + `t` blob DEFAULT NULL, + `u` blob DEFAULT NULL, + KEY `t1a` (`a`(767)), +- KEY `t1b` (`b`(767)), +- KEY `t1c` (`c`(767)), +- KEY `t1d` (`d`(767)), +- KEY `t1e` (`e`(767)), + KEY `t1f` (`f`(767)), + KEY `t1g` (`g`(767)), +- KEY `t1h` (`h`(767)), +- KEY `t1i` (`i`(767)), +- KEY `t1j` (`j`(767)), +- KEY `t1k` (`k`(767)), +- KEY `t1l` (`l`(767)), +- KEY `t1m` (`m`(767)), +- KEY `t1n` (`n`(767)), +- KEY `t1o` (`o`(767)), +- KEY `t1p` (`p`(767)), +- KEY `t1q` (`q`(767)), +- KEY `t1r` (`r`(767)), +- KEY `t1s` (`s`(767)), + KEY `t1t` (`t`(767)), + KEY `t1u` (`u`(767)), +- KEY `t1ut` (`u`(767),`t`(767)), +- KEY `t1st` (`s`(767),`t`(767)) ++ KEY `t1ut` (`u`(767)), ++ KEY `t1st` (`s`(767)) + ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC + DROP TABLE t1; + # Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE +@@ -565,27 +385,25 @@ + DROP TABLE t1; + CREATE TABLE t1( + c text NOT NULL, d text NOT NULL, +-PRIMARY KEY (c(767),d(767))) ++PRIMARY KEY (c(767))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; + Warnings: +-Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. ++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. + DROP TABLE t1; + CREATE TABLE t1( + c text NOT NULL, d text NOT NULL, +-PRIMARY KEY (c(767),d(767))) ++PRIMARY KEY (c(767))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; +-Warnings: +-Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. + DROP TABLE t1; + CREATE TABLE t1( + c text NOT NULL, d text NOT NULL, +-PRIMARY KEY (c(767),d(767))) ++PRIMARY KEY (c(767))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; + DROP TABLE t1; + CREATE TABLE t1(c text, PRIMARY KEY (c(440))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; + Warnings: +-Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. ++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. + DROP TABLE t1; + CREATE TABLE t1(c text, PRIMARY KEY (c(438))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; diff --git a/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff b/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff new file mode 100644 index 00000000000..173b20a3fcf --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/page_size,8k.rdiff @@ -0,0 +1,415 @@ +--- page_size.result ++++ page_size,8k.result +@@ -3,7 +3,7 @@ + SELECT variable_value FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_page_size'; + variable_value +-16384 ++8192 + # Test 3) Query some information_shema tables that are dependent upon + # the page size. + SELECT t.name table_name, t.n_cols, t.flag table_flags, +@@ -36,13 +36,13 @@ + table_name n_cols table_flags index_name root_page type n_fields merge_threshold + test/t1 5 0 PRIMARY 3 3 1 50 + test/t2 5 1 PRIMARY 3 3 1 50 +-test/t3 5 41 PRIMARY 3 3 1 50 ++test/t3 5 39 PRIMARY 3 3 1 50 + test/t4 5 33 PRIMARY 3 3 1 50 + === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === + Space_Name Space_Type Page_Size Zip_Size Path + test/t1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd + test/t2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd +-test/t3 Single DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd ++test/t3 Single DEFAULT 4096 MYSQLD_DATADIR/test/t3.ibd + test/t4 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd + DROP TABLE t1, t2, t3, t4; + # Test 4) The maximum row size is dependent upon the page size. +@@ -53,133 +53,97 @@ + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), + c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), + c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(211) ++c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(155) + ) ROW_FORMAT=redundant; + DROP TABLE t1; + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), + c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), + c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(212) ++c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(156) + ) ROW_FORMAT=redundant; +-ERROR 42000: Row size too large (> 8123). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. ++ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), + c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), + c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246) ++c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202) + ) ROW_FORMAT=compact; + DROP TABLE t1; + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), + c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), + c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247) ++c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203) + ) ROW_FORMAT=compact; +-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. ++ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), + c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), + c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157) ++c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103) + ) ROW_FORMAT=compressed; + DROP TABLE t1; + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), + c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), + c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(160) ++c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(106) + ) ROW_FORMAT=compressed; +-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. ++ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), + c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), + c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246) ++c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202) + ) ROW_FORMAT=dynamic; + DROP TABLE t1; + CREATE TABLE t1 ( + c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), + c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), + c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200), +-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200), +-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200), +-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200), +-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247) ++c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203) + ) ROW_FORMAT=dynamic; +-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. +-CREATE TABLE t1 (a varchar(255) character set utf8, +-b varchar(255) character set utf8, +-c varchar(255) character set utf8, +-d varchar(255) character set utf8, +-e varchar(4) character set utf8, +-PRIMARY KEY (a,b,c,d,e)) ++ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. ++CREATE TABLE t1 (a varchar(128) character set utf8, ++b varchar(128) character set utf8, ++c varchar(128) character set utf8, ++d varchar(128) character set utf8, ++PRIMARY KEY (a,b,c,d)) + ENGINE=innodb; + DROP TABLE t1; +-CREATE TABLE t1 (a varchar(255) character set utf8, +-b varchar(255) character set utf8, +-c varchar(255) character set utf8, +-d varchar(255) character set utf8, +-e varchar(5) character set utf8, +-PRIMARY KEY (a,b,c,d,e)) ++CREATE TABLE t1 (a varchar(128) character set utf8, ++b varchar(128) character set utf8, ++c varchar(128) character set utf8, ++d varchar(129) character set utf8, ++PRIMARY KEY (a,b,c,d)) + ENGINE=innodb; +-ERROR 42000: Specified key was too long; max key length is 3072 bytes +-CREATE TABLE t1 (a varchar(255) character set utf8, +-b varchar(255) character set utf8, +-c varchar(255) character set utf8, +-d varchar(255) character set utf8, +-e varchar(255) character set utf8, +-f varchar(4) character set utf8, +-PRIMARY KEY (a), KEY (b,c,d,e,f)) ++ERROR 42000: Specified key was too long; max key length is 1536 bytes ++CREATE TABLE t1 (a varchar(128) character set utf8, ++b varchar(128) character set utf8, ++c varchar(128) character set utf8, ++d varchar(128) character set utf8, ++e varchar(128) character set utf8, ++PRIMARY KEY (a), KEY (b,c,d,e)) + ENGINE=innodb; + DROP TABLE t1; +-CREATE TABLE t1 (a varchar(255) character set utf8, +-b varchar(255) character set utf8, +-c varchar(255) character set utf8, +-d varchar(255) character set utf8, +-e varchar(255) character set utf8, +-f varchar(5) character set utf8, +-PRIMARY KEY (a), KEY (b,c,d,e,f)) ++CREATE TABLE t1 (a varchar(128) character set utf8, ++b varchar(128) character set utf8, ++c varchar(128) character set utf8, ++d varchar(128) character set utf8, ++e varchar(129) character set utf8, ++PRIMARY KEY (a), KEY (b,c,d,e)) + ENGINE=innodb; +-ERROR 42000: Specified key was too long; max key length is 3072 bytes ++ERROR 42000: Specified key was too long; max key length is 1536 bytes + # Test 5) KEY_BLOCK_SIZE validation +-CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; ++CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; ++ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options") + SHOW WARNINGS; + Level Code Message +-SELECT table_name, row_format, create_options +-FROM information_schema.tables WHERE table_name = 't1'; +-table_name row_format create_options +-t1 Compressed row_format=COMPRESSED key_block_size=16 +-ALTER TABLE t1 KEY_BLOCK_SIZE=8; ++Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8. ++Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options") ++Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB ++CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; + SHOW WARNINGS; + Level Code Message + SELECT table_name, row_format, create_options +@@ -217,8 +181,11 @@ + DROP TABLE t1; + SET SESSION innodb_strict_mode = OFF; + CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; ++Warnings: ++Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. + SHOW WARNINGS; + Level Code Message ++Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. + SELECT table_name, row_format, create_options + FROM information_schema.tables WHERE table_name = 't1'; + table_name row_format create_options +@@ -276,105 +243,11 @@ + ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options") + SHOW WARNINGS; + Level Code Message ++Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8. + Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. + Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options") + Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB + SET GLOBAL innodb_file_per_table = ON; +-# Test 7) This series of tests were moved from innodb-index to here +-# because the second alter table t1 assumes a 16k page size. +-# Moving the test allows the rest of innodb-index to be run on all +-# page sizes. The previously disabled portions of this test were +-# moved as well. +-CREATE TABLE t2(d varchar(17) PRIMARY KEY) ENGINE=innodb DEFAULT CHARSET=utf8; +-CREATE TABLE t3(a int PRIMARY KEY) ENGINE=innodb; +-INSERT INTO t3 VALUES (22),(44),(33),(55),(66); +-INSERT INTO t2 VALUES ('jejdkrun87'),('adfd72nh9k'), +-('adfdpplkeock'),('adfdijnmnb78k'),('adfdijn0loKNHJik'); +-CREATE TABLE t1(a int, b blob, c text, d text NOT NULL) +-ENGINE=innodb DEFAULT CHARSET=utf8 STATS_PERSISTENT=0; +-INSERT INTO t1 +-SELECT a,LEFT(REPEAT(d,100*a),65535),REPEAT(d,20*a),d FROM t2,t3 order by a, d; +-DROP TABLE t2, t3; +-SELECT COUNT(*) FROM t1 WHERE a=44; +-COUNT(*) +-5 +-SELECT a, +-LENGTH(b),b=LEFT(REPEAT(d,100*a),65535),LENGTH(c),c=REPEAT(d,20*a),d FROM t1 +-ORDER BY 1, 2, 3, 4, 5, 6; +-a LENGTH(b) b=LEFT(REPEAT(d,100*a),65535) LENGTH(c) c=REPEAT(d,20*a) d +-22 22000 1 4400 1 adfd72nh9k +-22 22000 1 4400 1 jejdkrun87 +-22 26400 1 5280 1 adfdpplkeock +-22 28600 1 5720 1 adfdijnmnb78k +-22 35200 1 7040 1 adfdijn0loKNHJik +-33 33000 1 6600 1 adfd72nh9k +-33 33000 1 6600 1 jejdkrun87 +-33 39600 1 7920 1 adfdpplkeock +-33 42900 1 8580 1 adfdijnmnb78k +-33 52800 1 10560 1 adfdijn0loKNHJik +-44 44000 1 8800 1 adfd72nh9k +-44 44000 1 8800 1 jejdkrun87 +-44 52800 1 10560 1 adfdpplkeock +-44 57200 1 11440 1 adfdijnmnb78k +-44 65535 1 14080 1 adfdijn0loKNHJik +-55 55000 1 11000 1 adfd72nh9k +-55 55000 1 11000 1 jejdkrun87 +-55 65535 1 13200 1 adfdpplkeock +-55 65535 1 14300 1 adfdijnmnb78k +-55 65535 1 17600 1 adfdijn0loKNHJik +-66 65535 1 13200 1 adfd72nh9k +-66 65535 1 13200 1 jejdkrun87 +-66 65535 1 15840 1 adfdpplkeock +-66 65535 1 17160 1 adfdijnmnb78k +-66 65535 1 21120 1 adfdijn0loKNHJik +-ALTER TABLE t1 ADD PRIMARY KEY (a), ADD KEY (b(20)); +-ERROR 23000: Duplicate entry '22' for key 'PRIMARY' +-DELETE FROM t1 WHERE d='null'; +-ALTER TABLE t1 ADD PRIMARY KEY (a), ADD KEY (b(20)); +-ERROR 23000: Duplicate entry '22' for key 'PRIMARY' +-DELETE FROM t1 WHERE a%2; +-CHECK TABLE t1; +-Table Op Msg_type Msg_text +-test.t1 check status OK +-ALTER TABLE t1 ADD PRIMARY KEY (a,b(255),c(255)), ADD KEY (b(767)); +-SELECT COUNT(*) FROM t1 WHERE a=44; +-COUNT(*) +-5 +-SELECT a, +-LENGTH(b), b=LEFT(REPEAT(d,100*a), 65535),LENGTH(c), c=REPEAT(d,20*a), d FROM t1; +-a LENGTH(b) b=LEFT(REPEAT(d,100*a), 65535) LENGTH(c) c=REPEAT(d,20*a) d +-22 22000 1 4400 1 adfd72nh9k +-22 35200 1 7040 1 adfdijn0loKNHJik +-22 28600 1 5720 1 adfdijnmnb78k +-22 26400 1 5280 1 adfdpplkeock +-22 22000 1 4400 1 jejdkrun87 +-44 44000 1 8800 1 adfd72nh9k +-44 65535 1 14080 1 adfdijn0loKNHJik +-44 57200 1 11440 1 adfdijnmnb78k +-44 52800 1 10560 1 adfdpplkeock +-44 44000 1 8800 1 jejdkrun87 +-66 65535 1 13200 1 adfd72nh9k +-66 65535 1 21120 1 adfdijn0loKNHJik +-66 65535 1 17160 1 adfdijnmnb78k +-66 65535 1 15840 1 adfdpplkeock +-66 65535 1 13200 1 jejdkrun87 +-SHOW CREATE TABLE t1; +-Table Create Table +-t1 CREATE TABLE `t1` ( +- `a` int(11) NOT NULL, +- `b` blob NOT NULL, +- `c` text NOT NULL, +- `d` text NOT NULL, +- PRIMARY KEY (`a`,`b`(255),`c`(255)), +- KEY `b` (`b`(767)) +-) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 +-CHECK TABLE t1; +-Table Op Msg_type Msg_text +-test.t1 check status OK +-EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%'; +-id select_type table type possible_keys key key_len ref rows Extra +-1 SIMPLE t1 range b b 769 NULL # Using where +-DROP TABLE t1; + # Test 8) Test creating a table that could lead to undo log overflow. + CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, + h blob,i blob,j blob,k blob,l blob,m blob,n blob, +@@ -389,10 +262,6 @@ + UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b, + k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b; + CREATE INDEX t1a ON t1 (a(767)); +-CREATE INDEX t1b ON t1 (b(767)); +-CREATE INDEX t1c ON t1 (c(767)); +-CREATE INDEX t1d ON t1 (d(767)); +-CREATE INDEX t1e ON t1 (e(767)); + UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, + k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c; + CREATE INDEX t1f ON t1 (f(767)); +@@ -407,30 +276,6 @@ + COMMIT; + CREATE INDEX t1g ON t1 (g(767)); + UPDATE t1 SET g=@e; +-CREATE INDEX t1h ON t1 (h(767)); +-UPDATE t1 SET h=@e; +-CREATE INDEX t1i ON t1 (i(767)); +-UPDATE t1 SET i=@e; +-CREATE INDEX t1j ON t1 (j(767)); +-UPDATE t1 SET j=@e; +-CREATE INDEX t1k ON t1 (k(767)); +-UPDATE t1 SET k=@e; +-CREATE INDEX t1l ON t1 (l(767)); +-UPDATE t1 SET l=@e; +-CREATE INDEX t1m ON t1 (m(767)); +-UPDATE t1 SET m=@e; +-CREATE INDEX t1n ON t1 (n(767)); +-UPDATE t1 SET n=@e; +-CREATE INDEX t1o ON t1 (o(767)); +-UPDATE t1 SET o=@e; +-CREATE INDEX t1p ON t1 (p(767)); +-UPDATE t1 SET p=@e; +-CREATE INDEX t1q ON t1 (q(767)); +-UPDATE t1 SET q=@e; +-CREATE INDEX t1r ON t1 (r(767)); +-UPDATE t1 SET r=@e; +-CREATE INDEX t1s ON t1 (s(767)); +-UPDATE t1 SET s=@e; + CREATE INDEX t1t ON t1 (t(767)); + BEGIN; + UPDATE t1 SET t=@e; +@@ -463,24 +308,8 @@ + `t` blob DEFAULT NULL, + `u` blob DEFAULT NULL, + KEY `t1a` (`a`(767)), +- KEY `t1b` (`b`(767)), +- KEY `t1c` (`c`(767)), +- KEY `t1d` (`d`(767)), +- KEY `t1e` (`e`(767)), + KEY `t1f` (`f`(767)), + KEY `t1g` (`g`(767)), +- KEY `t1h` (`h`(767)), +- KEY `t1i` (`i`(767)), +- KEY `t1j` (`j`(767)), +- KEY `t1k` (`k`(767)), +- KEY `t1l` (`l`(767)), +- KEY `t1m` (`m`(767)), +- KEY `t1n` (`n`(767)), +- KEY `t1o` (`o`(767)), +- KEY `t1p` (`p`(767)), +- KEY `t1q` (`q`(767)), +- KEY `t1r` (`r`(767)), +- KEY `t1s` (`s`(767)), + KEY `t1t` (`t`(767)), + KEY `t1u` (`u`(767)), + KEY `t1ut` (`u`(767),`t`(767)), +@@ -568,14 +397,14 @@ + PRIMARY KEY (c(767),d(767))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; + Warnings: +-Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. ++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. + DROP TABLE t1; + CREATE TABLE t1( + c text NOT NULL, d text NOT NULL, + PRIMARY KEY (c(767),d(767))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; + Warnings: +-Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. ++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. + DROP TABLE t1; + CREATE TABLE t1( + c text NOT NULL, d text NOT NULL, +@@ -585,7 +414,7 @@ + CREATE TABLE t1(c text, PRIMARY KEY (c(440))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; + Warnings: +-Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. ++Warning 139 Row size too large (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. + DROP TABLE t1; + CREATE TABLE t1(c text, PRIMARY KEY (c(438))) + ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; diff --git a/mysql-test/suite/innodb_zip/r/16k.result b/mysql-test/suite/innodb_zip/r/page_size.result index 49ad5609705..6355b5e76b6 100644 --- a/mysql-test/suite/innodb_zip/r/16k.result +++ b/mysql-test/suite/innodb_zip/r/page_size.result @@ -4,7 +4,6 @@ SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; variable_value 16384 -# Test 2) The number of buffer pool pages is dependent upon the page size. # Test 3) Query some information_shema tables that are dependent upon # the page size. SELECT t.name table_name, t.n_cols, t.flag table_flags, @@ -40,15 +39,13 @@ test/t2 5 1 PRIMARY 3 3 1 50 test/t3 5 41 PRIMARY 3 3 1 50 test/t4 5 33 PRIMARY 3 3 1 50 === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t1 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1.ibd -test/t2 Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2.ibd -test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd -test/t4 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4.ibd +Space_Name Space_Type Page_Size Zip_Size Path +test/t1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1.ibd +test/t2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2.ibd +test/t3 Single DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd +test/t4 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd DROP TABLE t1, t2, t3, t4; # Test 4) The maximum row size is dependent upon the page size. -# Redundant: 8123, Compact: 8126. -# Compressed: 8126, Dynamic: 8126. # Each row format has its own amount of overhead that # varies depending on number of fields and other overhead. SET SESSION innodb_strict_mode = ON; @@ -174,9 +171,7 @@ f varchar(5) character set utf8, PRIMARY KEY (a), KEY (b,c,d,e,f)) ENGINE=innodb; ERROR 42000: Specified key was too long; max key length is 3072 bytes -# Test 5) Make sure that KEY_BLOCK_SIZE=16, 8, 4, 2 & 1 -# are all accepted. -SET SESSION innodb_strict_mode = ON; +# Test 5) KEY_BLOCK_SIZE validation CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; SHOW WARNINGS; Level Code Message @@ -264,22 +259,21 @@ FROM information_schema.tables WHERE table_name = 't1'; table_name row_format create_options t1 Compressed row_format=COMPRESSED DROP TABLE t1; -# Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16 -# are rejected when innodb_file_per_table=OFF +# Test 6) KEY_BLOCK_SIZE with innodb_file_per_table=OFF SET SESSION innodb_strict_mode = ON; SET GLOBAL innodb_file_per_table = OFF; SHOW VARIABLES LIKE 'innodb_file_per_table'; Variable_name Value innodb_file_per_table OFF CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8; -Got one of the listed errors +ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options") SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options") Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16; -Got one of the listed errors +ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options") SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. @@ -493,124 +487,7 @@ t1 CREATE TABLE `t1` ( KEY `t1st` (`s`(767),`t`(767)) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DROP TABLE t1; -# Bug #12429576 - Test an assertion failure on purge. -CREATE TABLE t1_purge ( -A int, -B blob, C blob, D blob, E blob, -F blob, G blob, H blob, -PRIMARY KEY (B(767), C(767), D(767), E(767), A), -INDEX (A) -) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -INSERT INTO t1_purge VALUES (1, -REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766), -REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766)); -CREATE TABLE t2_purge ( -A int PRIMARY KEY, -B blob, C blob, D blob, E blob, -F blob, G blob, H blob, I blob, -J blob, K blob, L blob, -INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -INSERT INTO t2_purge VALUES (1, -REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766), -REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766), REPEAT('i', 766), -REPEAT('j', 766), REPEAT('k', 766), REPEAT('l', 766)); -CREATE TABLE t3_purge ( -A int, -B varchar(800), C varchar(800), D varchar(800), E varchar(800), -F varchar(800), G varchar(800), H varchar(800), -PRIMARY KEY (B(767), C(767), D(767), E(767), A), -INDEX (A) -) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -INSERT INTO t3_purge SELECT * FROM t1_purge; -CREATE TABLE t4_purge ( -A int PRIMARY KEY, -B varchar(800), C varchar(800), D varchar(800), E varchar(800), -F varchar(800), G varchar(800), H varchar(800), I varchar(800), -J varchar(800), K varchar(800), L varchar(800), -INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -INSERT INTO t4_purge SELECT * FROM t2_purge; -DELETE FROM t1_purge; -DELETE FROM t2_purge; -DELETE FROM t3_purge; -DELETE FROM t4_purge; -SET @r=REPEAT('a',500); -CREATE TABLE t12637786(a int, -v1 varchar(500), v2 varchar(500), v3 varchar(500), -v4 varchar(500), v5 varchar(500), v6 varchar(500), -v7 varchar(500), v8 varchar(500), v9 varchar(500), -v10 varchar(500), v11 varchar(500), v12 varchar(500), -v13 varchar(500), v14 varchar(500), v15 varchar(500), -v16 varchar(500), v17 varchar(500), v18 varchar(500) -) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -CREATE INDEX idx1 ON t12637786(a,v1); -INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -UPDATE t12637786 SET a=1000; -DELETE FROM t12637786; -# Bug#12963823 - Test that the purge thread does not crash when -CREATE TABLE t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob, -i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob) -ENGINE=innodb ROW_FORMAT=dynamic; -SET @r = REPEAT('a', 767); -INSERT INTO t12963823 VALUES (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r); -CREATE INDEX ndx_a ON t12963823 (a(500)); -CREATE INDEX ndx_b ON t12963823 (b(500)); -CREATE INDEX ndx_c ON t12963823 (c(500)); -CREATE INDEX ndx_d ON t12963823 (d(500)); -CREATE INDEX ndx_e ON t12963823 (e(500)); -CREATE INDEX ndx_f ON t12963823 (f(500)); -CREATE INDEX ndx_k ON t12963823 (k(500)); -CREATE INDEX ndx_l ON t12963823 (l(500)); -SET @r = REPEAT('b', 500); -UPDATE t12963823 set a=@r,b=@r,c=@r,d=@r; -UPDATE t12963823 set e=@r,f=@r,g=@r,h=@r; -UPDATE t12963823 set i=@r,j=@r,k=@r,l=@r; -UPDATE t12963823 set m=@r,n=@r,o=@r,p=@r; -ALTER TABLE t12963823 DROP INDEX ndx_a; -ALTER TABLE t12963823 DROP INDEX ndx_b; -CREATE INDEX ndx_g ON t12963823 (g(500)); -CREATE INDEX ndx_h ON t12963823 (h(500)); -CREATE INDEX ndx_i ON t12963823 (i(500)); -CREATE INDEX ndx_j ON t12963823 (j(500)); -CREATE INDEX ndx_m ON t12963823 (m(500)); -CREATE INDEX ndx_n ON t12963823 (n(500)); -CREATE INDEX ndx_o ON t12963823 (o(500)); -CREATE INDEX ndx_p ON t12963823 (p(500)); -SHOW CREATE TABLE t12963823; -Table Create Table -t12963823 CREATE TABLE `t12963823` ( - `a` blob DEFAULT NULL, - `b` blob DEFAULT NULL, - `c` blob DEFAULT NULL, - `d` blob DEFAULT NULL, - `e` blob DEFAULT NULL, - `f` blob DEFAULT NULL, - `g` blob DEFAULT NULL, - `h` blob DEFAULT NULL, - `i` blob DEFAULT NULL, - `j` blob DEFAULT NULL, - `k` blob DEFAULT NULL, - `l` blob DEFAULT NULL, - `m` blob DEFAULT NULL, - `n` blob DEFAULT NULL, - `o` blob DEFAULT NULL, - `p` blob DEFAULT NULL, - KEY `ndx_c` (`c`(500)), - KEY `ndx_d` (`d`(500)), - KEY `ndx_e` (`e`(500)), - KEY `ndx_f` (`f`(500)), - KEY `ndx_k` (`k`(500)), - KEY `ndx_l` (`l`(500)), - KEY `ndx_g` (`g`(500)), - KEY `ndx_h` (`h`(500)), - KEY `ndx_i` (`i`(500)), - KEY `ndx_j` (`j`(500)), - KEY `ndx_m` (`m`(500)), - KEY `ndx_n` (`n`(500)), - KEY `ndx_o` (`o`(500)), - KEY `ndx_p` (`p`(500)) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC # Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE -SET SESSION innodb_strict_mode = ON; CREATE TABLE bug12547647( a int NOT NULL, b blob NOT NULL, c text, PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767)) @@ -623,7 +500,69 @@ SHOW WARNINGS; Level Code Message ROLLBACK; DROP TABLE bug12547647; -SET SESSION innodb_strict_mode = off; +SET SESSION innodb_strict_mode = OFF; +CREATE TABLE t1( +pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48), +pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48), +pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48), +pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48), +sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48), +sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48), +sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48), +sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48), +PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, +pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), +KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, +sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) +ROW_FORMAT=Redundant ENGINE=InnoDB; +SET @r = repeat('a', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, +@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('b', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, +@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('c', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, +@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('d', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, +@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('e', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, +@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +DELETE from t1; +DROP TABLE t1; +CREATE TABLE t1( +pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48), +pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48), +pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48), +pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48), +sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48), +sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48), +sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48), +sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48), +PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, +pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), +KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, +sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) +ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 ENGINE=InnoDB; +SET @r = repeat('a', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, +@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('b', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, +@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('c', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, +@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('d', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, +@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('e', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, +@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +DELETE from t1; +DROP TABLE t1; CREATE TABLE t1( c text NOT NULL, d text NOT NULL, PRIMARY KEY (c(767),d(767))) @@ -642,7 +581,7 @@ CREATE TABLE t1( c text NOT NULL, d text NOT NULL, PRIMARY KEY (c(767),d(767))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; -drop table t1; +DROP TABLE t1; CREATE TABLE t1(c text, PRIMARY KEY (c(440))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; Warnings: @@ -652,50 +591,3 @@ CREATE TABLE t1(c text, PRIMARY KEY (c(438))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); DROP TABLE t1; -# -# Bug#56862 Execution of a query that uses index merge returns a wrong result -# -CREATE TABLE t1 ( -pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, -a int, -b int, -INDEX idx(a)) -ENGINE=INNODB; -INSERT INTO t1(a,b) VALUES -(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), -(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), -(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), -(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); -INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; -INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; -INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1 VALUES (1000000, 0, 0); -set @optimizer_switch_saved=@@optimizer_switch; -SET SESSION optimizer_switch='derived_merge=off'; -SET SESSION sort_buffer_size = 1024*36; -EXPLAIN -SELECT COUNT(*) FROM -(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) -WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL # -2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL # Using sort_union(idx,PRIMARY); Using where -SELECT COUNT(*) FROM -(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) -WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; -COUNT(*) -1537 -set @@optimizer_switch=@optimizer_switch_saved; -SET SESSION sort_buffer_size = DEFAULT; -DROP TABLE t1; -DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge; -DROP TABLE t12637786; -DROP TABLE t12963823; diff --git a/mysql-test/suite/innodb_zip/r/restart,full_crc32.rdiff b/mysql-test/suite/innodb_zip/r/restart,full_crc32.rdiff deleted file mode 100644 index c2260f68d42..00000000000 --- a/mysql-test/suite/innodb_zip/r/restart,full_crc32.rdiff +++ /dev/null @@ -1,188 +0,0 @@ ---- restart.result -+++ restart.reject -@@ -211,18 +211,18 @@ - test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t1_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd --test/t2_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd -+test/t1_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1_restart.ibd -+test/t2_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2_restart.ibd - test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd --test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd -+test/t5_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd - test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd - test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd - test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd --test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd --test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd --test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd --test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd -+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd - # - # Shutdown the server and list the tablespace OS files - # -@@ -395,18 +395,18 @@ - test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t1_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd --test/t2_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd -+test/t1_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1_restart.ibd -+test/t2_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2_restart.ibd - test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd --test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd -+test/t5_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd - test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd - test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd - test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd --test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd --test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd --test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd --test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd -+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd - DROP TABLE t1_restart; - DROP TABLE t2_restart; - DROP TABLE t3_restart; -@@ -418,15 +418,15 @@ - ALTER TABLE t7_restart TRUNCATE PARTITION p1; - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd - test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd - test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd --test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd --test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd --test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -+test/t5_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd - test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd --test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd --test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd -+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd - INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot'); - INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart); - INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart); -@@ -522,15 +522,15 @@ - innodb_file_per_table ON - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd - test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd - test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd --test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd --test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd --test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -+test/t5_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd - test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd --test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd --test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd -+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd - SELECT count(*) FROM t5_restart; - count(*) - 8 -@@ -623,15 +623,15 @@ - RENAME TABLE t7_restart TO t77_restart; - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd - test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd - test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd --test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd --test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd --test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd -+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd -+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd -+test/t55_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd - test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd --test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd --test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd -+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd -+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd - INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart); - SELECT count(*) FROM t55_restart; - count(*) -@@ -720,15 +720,15 @@ - innodb_file_per_table ON - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd - test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd - test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd --test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd --test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd --test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd -+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd -+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd -+test/t55_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd - test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd --test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd --test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd -+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd -+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd - INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart); - SELECT count(*) FROM t55_restart; - count(*) -@@ -853,15 +853,15 @@ - # - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd - test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd - test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd --test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd --test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd --test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd -+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd -+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd -+test/t55_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd - test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd --test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd --test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd -+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd -+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd - INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart); - SELECT count(*) FROM t4_restart; - count(*) -@@ -990,15 +990,15 @@ - # - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd - test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p0.ibd - test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p1.ibd --test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd --test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd --test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t55_restart.ibd -+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd -+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd -+test/t55_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t55_restart.ibd - test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p2.ibd --test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd --test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd -+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd -+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd - INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart); - SELECT count(*) FROM t4_restart; - count(*) diff --git a/mysql-test/suite/innodb_zip/r/restart,strict_full_crc32.rdiff b/mysql-test/suite/innodb_zip/r/restart,strict_full_crc32.rdiff deleted file mode 100644 index c2260f68d42..00000000000 --- a/mysql-test/suite/innodb_zip/r/restart,strict_full_crc32.rdiff +++ /dev/null @@ -1,188 +0,0 @@ ---- restart.result -+++ restart.reject -@@ -211,18 +211,18 @@ - test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t1_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd --test/t2_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd -+test/t1_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1_restart.ibd -+test/t2_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2_restart.ibd - test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd --test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd -+test/t5_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd - test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd - test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd - test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd --test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd --test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd --test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd --test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd -+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd - # - # Shutdown the server and list the tablespace OS files - # -@@ -395,18 +395,18 @@ - test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t1_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd --test/t2_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd -+test/t1_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t1_restart.ibd -+test/t2_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t2_restart.ibd - test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd --test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd -+test/t5_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd - test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd - test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd - test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd --test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd --test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd --test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd --test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd -+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd - DROP TABLE t1_restart; - DROP TABLE t2_restart; - DROP TABLE t3_restart; -@@ -418,15 +418,15 @@ - ALTER TABLE t7_restart TRUNCATE PARTITION p1; - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd - test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd - test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd --test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd --test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd --test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -+test/t5_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd - test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd --test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd --test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd -+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd - INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot'); - INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart); - INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart); -@@ -522,15 +522,15 @@ - innodb_file_per_table ON - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd - test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd - test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd --test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd --test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd --test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -+test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -+test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -+test/t5_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd - test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd --test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd --test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd -+test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -+test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd - SELECT count(*) FROM t5_restart; - count(*) - 8 -@@ -623,15 +623,15 @@ - RENAME TABLE t7_restart TO t77_restart; - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd - test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd - test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd --test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd --test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd --test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd -+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd -+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd -+test/t55_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd - test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd --test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd --test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd -+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd -+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd - INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart); - SELECT count(*) FROM t55_restart; - count(*) -@@ -720,15 +720,15 @@ - innodb_file_per_table ON - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd - test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd - test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd --test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd --test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd --test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd -+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd -+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd -+test/t55_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd - test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd --test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd --test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd -+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd -+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd - INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart); - SELECT count(*) FROM t55_restart; - count(*) -@@ -853,15 +853,15 @@ - # - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd - test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd - test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd --test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd --test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd --test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd -+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd -+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd -+test/t55_restart Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd - test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd --test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd --test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd -+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd -+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd - INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart); - SELECT count(*) FROM t4_restart; - count(*) -@@ -990,15 +990,15 @@ - # - === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === - Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path --test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -+test/t4_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t4_restart.ibd - test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p0.ibd - test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p1.ibd --test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd --test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd --test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t55_restart.ibd -+test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd -+test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd -+test/t55_restart Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t55_restart.ibd - test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p2.ibd --test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd --test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd -+test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd -+test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT NULL MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd - INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart); - SELECT count(*) FROM t4_restart; - count(*) diff --git a/mysql-test/suite/innodb_zip/r/restart.result b/mysql-test/suite/innodb_zip/r/restart.result index cba587e0c58..5b488c277aa 100644 --- a/mysql-test/suite/innodb_zip/r/restart.result +++ b/mysql-test/suite/innodb_zip/r/restart.result @@ -210,19 +210,19 @@ test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0 Single test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0 Single test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t1_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd -test/t2_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd -test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd -test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd -test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd -test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd -test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd +Space_Name Space_Type Page_Size Zip_Size Path +test/t1_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1_restart.ibd +test/t2_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2_restart.ibd +test/t3_restart Single DEFAULT 2048 MYSQLD_DATADIR/test/t3_restart.ibd +test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd +test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd +test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd +test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd +test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd +test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd +test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd +test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd +test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd # # Shutdown the server and list the tablespace OS files # @@ -395,19 +395,19 @@ test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0 Single test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0 Single test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t1_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd -test/t2_restart Single DEFAULT DEFAULT Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd -test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd -test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd -test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd -test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd -test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd +Space_Name Space_Type Page_Size Zip_Size Path +test/t1_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t1_restart.ibd +test/t2_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t2_restart.ibd +test/t3_restart Single DEFAULT 2048 MYSQLD_DATADIR/test/t3_restart.ibd +test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd +test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd +test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd +test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd +test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd +test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd +test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd +test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd +test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd DROP TABLE t1_restart; DROP TABLE t2_restart; DROP TABLE t3_restart; @@ -418,16 +418,16 @@ TRUNCATE TABLE t5_restart; ALTER TABLE t6_restart TRUNCATE PARTITION p2; ALTER TABLE t7_restart TRUNCATE PARTITION p1; === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd -test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd -test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd -test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd +Space_Name Space_Type Page_Size Zip_Size Path +test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd +test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd +test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd +test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd +test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd +test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd +test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd +test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd +test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot'); INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart); INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart); @@ -523,16 +523,16 @@ SHOW VARIABLES LIKE 'innodb_file_per_table'; Variable_name Value innodb_file_per_table ON === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd -test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd -test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd -test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd -test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd -test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd -test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd -test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd +Space_Name Space_Type Page_Size Zip_Size Path +test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd +test/t6_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd +test/t6_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd +test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd +test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd +test/t5_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd +test/t6_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd +test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd +test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd SELECT count(*) FROM t5_restart; count(*) 8 @@ -624,16 +624,16 @@ RENAME TABLE t5_restart TO t55_restart; RENAME TABLE t6_restart TO t66_restart; RENAME TABLE t7_restart TO t77_restart; === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd -test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd -test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd -test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd -test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd -test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd +Space_Name Space_Type Page_Size Zip_Size Path +test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd +test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd +test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd +test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd +test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd +test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd +test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart); SELECT count(*) FROM t55_restart; count(*) @@ -722,16 +722,16 @@ SHOW VARIABLES LIKE 'innodb_file_per_table'; Variable_name Value innodb_file_per_table ON === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd -test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd -test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd -test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd -test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd -test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd +Space_Name Space_Type Page_Size Zip_Size Path +test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd +test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd +test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd +test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd +test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd +test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd +test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart); SELECT count(*) FROM t55_restart; count(*) @@ -856,16 +856,16 @@ t77_restart#p#p1#sp#s3.ibd # # restart === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd -test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd -test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd -test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd -test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd -test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd -test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd +Space_Name Space_Type Page_Size Zip_Size Path +test/t4_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd +test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd +test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd +test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd +test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd +test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd +test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart); SELECT count(*) FROM t4_restart; count(*) @@ -994,16 +994,16 @@ t77_restart.par # # restart === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === -Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path -test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p0.ibd -test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p1.ibd -test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd -test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t55_restart.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p2.ibd -test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd -test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd +Space_Name Space_Type Page_Size Zip_Size Path +test/t4_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t4_restart.ibd +test/t66_restart#p#p0 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p0.ibd +test/t66_restart#p#p1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p1.ibd +test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd +test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t66_restart#p#p2.ibd +test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd +test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart); SELECT count(*) FROM t4_restart; count(*) diff --git a/mysql-test/suite/innodb_zip/t/4k-master.opt b/mysql-test/suite/innodb_zip/t/4k-master.opt deleted file mode 100644 index 82f574a8039..00000000000 --- a/mysql-test/suite/innodb_zip/t/4k-master.opt +++ /dev/null @@ -1,3 +0,0 @@ ---loose-innodb-sys-indexes ---loose-innodb-sys-tablespaces ---loose-innodb-sys-datafiles diff --git a/mysql-test/suite/innodb_zip/t/4k.test b/mysql-test/suite/innodb_zip/t/4k.test deleted file mode 100644 index 3b8c1771a96..00000000000 --- a/mysql-test/suite/innodb_zip/t/4k.test +++ /dev/null @@ -1,433 +0,0 @@ -# Tests for setting innodb-page-size=4k - ---source include/have_innodb.inc ---source include/have_innodb_4k.inc -SET default_storage_engine=InnoDB; - ---disable_query_log -let $MYSQLD_DATADIR = `select @@datadir`; -let $INNODB_PAGE_SIZE = `select @@innodb_page_size`; - -call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is"); ---enable_query_log - ---echo # Test 1) Show the page size from Information Schema ---disable_warnings -SELECT variable_value FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_page_size'; ---enable_warnings - ---echo # Test 2) The number of buffer pool pages is dependent upon the page size. ---disable_warnings ---replace_result 2048 {checked_valid} -SELECT variable_value FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; ---enable_warnings - ---echo # Test 3) Query some information_shema tables that are dependent upon ---echo # the page size. -# Show the metadata for tables in schema 'mysql'. -# Pulled from innodb-system-table-view.test -# The IDs of mysql.innodb_table_stats and mysql.innodb_index_stats are -# unpredictable. They depend on whether mtr has created the database for -# this test from scratch or is using a previously created database where -# those tables have been dropped and recreated. Since we cannot force mtr -# to use a freshly created database for this test we do not return the -# table or index IDs. We can return the space IS of mysql schema tables -# since they are created consistently during bootstrap. -SELECT t.name table_name, t.n_cols, t.flag table_flags, - i.name index_name, i.page_no root_page, i.type, - i.n_fields, i.merge_threshold - FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, - INFORMATION_SCHEMA.INNODB_SYS_INDEXES i - WHERE t.table_id = i.table_id - AND t.name LIKE 'mysql%' - ORDER BY t.name, i.index_id; - -CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb; -CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb; -CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb; -CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb; - -# Show the metadata for tables in schema 'test'. -# Do not return the space ID since this tablespace may have existed before -# this test runs. The root page number of each index should be consistent -# within a file-per-table tablespace. -SELECT t.name table_name, t.n_cols, t.flag table_flags, - i.name index_name, i.page_no root_page, i.type, - i.n_fields, i.merge_threshold - FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, - INFORMATION_SCHEMA.INNODB_SYS_INDEXES i - WHERE t.table_id = i.table_id - AND t.name LIKE 'test%' - ORDER BY t.name, i.name; ---source suite/innodb/include/show_i_s_tablespaces.inc -DROP TABLE t1, t2, t3, t4; - ---echo # Test 4) The maximum row size is dependent upon the page size. ---echo # Redundant: 1979, Compact: 1982. ---echo # Compressed: 1982, Dynamic: 1982. ---echo # Each row format has its own amount of overhead that ---echo # varies depending on number of fields and other overhead. - -SET SESSION innodb_strict_mode = ON; - -# Redundant table; 1927 bytes with 10 CHAR fields -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(127) -) ROW_FORMAT=redundant; -DROP TABLE t1; ---replace_regex /> [0-9]*/> max_row_size/ ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(128) -) ROW_FORMAT=redundant; - -# Compact table; 1955 bytes with 10 CHAR fields -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155) -) ROW_FORMAT=compact; -DROP TABLE t1; ---replace_regex /> [0-9]*/> max_row_size/ ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156) -) ROW_FORMAT=compact; - -# Compressed table; 1878 bytes with 10 CHAR fields -# Bug#13391353 Limit is 1876 on 32-Linux only -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76) -) ROW_FORMAT=compressed; -DROP TABLE t1; ---replace_regex /> [0-9]*/> max_row_size/ ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(79) -) ROW_FORMAT=compressed; - -# Dynamic table; 1955 bytes with 10 CHAR fields -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155) -) ROW_FORMAT=dynamic; -DROP TABLE t1; ---replace_regex /> [0-9]*/> max_row_size/ ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156) -) ROW_FORMAT=dynamic; - -# -# Test the maximum key length -# Moved from innodb-index.test since each page size has its own max key length. -# Max Key Length is 768 for 4k pages. -# -# InnoDB assumes 3 bytes for each UTF8 character. -# -CREATE TABLE t1 (a varchar(64) character set utf8, - b varchar(64) character set utf8, - c varchar(64) character set utf8, - d varchar(64) character set utf8, - PRIMARY KEY (a,b,c,d)) - ENGINE=innodb; -DROP TABLE t1; ---error ER_TOO_LONG_KEY -CREATE TABLE t1 (a varchar(64) character set utf8, - b varchar(64) character set utf8, - c varchar(64) character set utf8, - d varchar(65) character set utf8, - PRIMARY KEY (a,b,c,d)) - ENGINE=innodb; -CREATE TABLE t1 (a varchar(64) character set utf8, - b varchar(64) character set utf8, - c varchar(64) character set utf8, - d varchar(64) character set utf8, - e varchar(64) character set utf8, - PRIMARY KEY (a), KEY (b,c,d,e)) - ENGINE=innodb; -DROP TABLE t1; ---error ER_TOO_LONG_KEY -CREATE TABLE t1 (a varchar(64) character set utf8, - b varchar(64) character set utf8, - c varchar(64) character set utf8, - d varchar(64) character set utf8, - e varchar(65) character set utf8, - PRIMARY KEY (a), KEY (b,c,d,e)) - ENGINE=innodb; - ---echo # Test 5) Make sure that KEY_BLOCK_SIZE=4, 2 & 1 are all ---echo # accepted and that KEY_BLOCK_SIZE=16 & 8 are rejected ---echo # in strict mode and converted to 4 in non-strict mode. - -SET SESSION innodb_strict_mode = ON; - ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; -SHOW WARNINGS; - ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SHOW WARNINGS; - -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; -DROP TABLE t1; - -SET SESSION innodb_strict_mode = OFF; - -CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; -DROP TABLE t1; - -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; -DROP TABLE t1; - -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; -DROP TABLE t1; - - ---echo # Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16 ---echo # are both rejected when innodb_file_per_table=OFF -# Moved from innodb-zip.test -SET SESSION innodb_strict_mode = ON; -SET GLOBAL innodb_file_per_table = OFF; -SHOW VARIABLES LIKE 'innodb_file_per_table'; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8; -SHOW WARNINGS; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -SET GLOBAL innodb_file_per_table = ON; - ---echo # Test 7) Not included here; 16k only - - ---echo # Test 8) Test creating a table that could lead to undo log overflow. -CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, - h blob,i blob,j blob,k blob,l blob,m blob,n blob, - o blob,p blob,q blob,r blob,s blob,t blob,u blob) - ENGINE=InnoDB ROW_FORMAT=dynamic; -SET @a = repeat('a', 767); -SET @b = repeat('b', 767); -SET @c = repeat('c', 767); -SET @d = repeat('d', 767); -SET @e = repeat('e', 767); - -# With no indexes defined, we can update all columns to max key part length. -INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a); -UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b, - k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b; - -# With one index defined, we can still update all fields. -CREATE INDEX t1a ON t1 (a(767)); -UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, - k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c; - -# Add one more index and the UNDO record becomes too big to update all columns. -# But a single transaction can update the columns in separate statements. -# because the UNDO records will be smaller. -CREATE INDEX t1b ON t1 (b(767)); -BEGIN; -UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, - k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; -ROLLBACK; -BEGIN; -UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; -UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d, - n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; -COMMIT; - -# Another index can still be added and a single field can still be updated -CREATE INDEX t1c ON t1 (c(767)); -UPDATE t1 SET c=@e; - -# Add one more index and we cannot update a column to its defined index length. -# This is a problem. It means that the DDL is allowed to create a table -# that CANNOT be updated. See bug#12953735. -CREATE INDEX t1d ON t1 (d(767)); -BEGIN; -UPDATE t1 SET d=@e; -ROLLBACK; - ---replace_regex /> [0-9]*/> max_row_size/ -CREATE INDEX t1e ON t1 (e(767)); - -SHOW CREATE TABLE t1; -DROP TABLE t1; - -# -# Bug #13336585 - INNODB: CHANGE BUFFERING WITH 4K PAGES CAN ASSERT -# IF SECONDARY KEY IS NEAR MAX -# If the secondary index tuple is close to half the page size, -# ibuf_insert_low() could return DB_TOO_BIG_RECORD, which is not expected -# in ibuf_insert(). In order to insure this does not happen, WL5756 -# imposes a maximum key length of 768 for 4k pages and 1536 for 8k pages. -# The existing max key Size for 16k pages is 3072. -# - -#-- disable_query_log -# The flag innodb_change_buffering_debug is only available in debug builds. -# It instructs InnoDB to try to evict pages from the buffer pool when -# change buffering is possible, so that the change buffer will be used -# whenever possible. -# This flag is not used currently since it exposes valgrind error in ibuf -# code with the following SQL -#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE -#SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug; -#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE -#SET GLOBAL innodb_change_buffering_debug = 1; -#-- enable_query_log - -# make sure the largest possible key entry can be added to the insert buffer. -# Make enough records so that the root page is not a leaf page. -SET SESSION innodb_strict_mode = OFF; -CREATE TABLE t1( - pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48), - pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48), - pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48), - pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48), - sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48), - sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48), - sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48), - sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48), - PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, - pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), - KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, - sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) - ROW_FORMAT=Redundant ENGINE=InnoDB; -SET @r = repeat('a', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('b', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('c', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('d', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('e', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -DELETE from t1; -DROP TABLE t1; - -# Compressed tables do not compress parent pages. So the whole uncompressed -# secondary tuple including the primary key must be able to fit in half the -# compressed page size. This record length is enforced at index creation. -# So the only way to get an ibuf tuple too big is to make the KEY_BLOCK_SIZE -# the same as the page size. -CREATE TABLE t1( - pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48), - pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48), - pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48), - pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48), - sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48), - sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48), - sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48), - sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48), - PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, - pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), - KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, - sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) - ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 ENGINE=InnoDB; -SET @r = repeat('a', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('b', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('c', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('d', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('e', 48); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -DELETE from t1; -DROP TABLE t1; - -#-- disable_query_log -#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE -#SET GLOBAL innodb_change_buffering_debug = 0; -#-- enable_query_log - -# The following should fail in non-strict mode too. -# (The fix of Bug #50945 only affects REDUNDANT and COMPACT tables.) -SET SESSION innodb_strict_mode = off; ---replace_regex /> [0-9]*/> max_row_size/ -CREATE TABLE t1( - c text NOT NULL, d text NOT NULL, - PRIMARY KEY (c(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -DROP TABLE t1; -CREATE TABLE t1( - c text NOT NULL, d text NOT NULL, - PRIMARY KEY (c(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; -drop table t1; -CREATE TABLE t1( - c text NOT NULL, d text NOT NULL, - PRIMARY KEY (c(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; -drop table t1; ---replace_regex /> [0-9]*/> max_row_size/ -CREATE TABLE t1(c text, PRIMARY KEY (c(440))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -DROP TABLE t1; -CREATE TABLE t1(c text, PRIMARY KEY (c(438))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); -DROP TABLE t1; diff --git a/mysql-test/suite/innodb_zip/t/8k-master.opt b/mysql-test/suite/innodb_zip/t/8k-master.opt deleted file mode 100644 index 82f574a8039..00000000000 --- a/mysql-test/suite/innodb_zip/t/8k-master.opt +++ /dev/null @@ -1,3 +0,0 @@ ---loose-innodb-sys-indexes ---loose-innodb-sys-tablespaces ---loose-innodb-sys-datafiles diff --git a/mysql-test/suite/innodb_zip/t/8k.test b/mysql-test/suite/innodb_zip/t/8k.test deleted file mode 100644 index 711eb594d4a..00000000000 --- a/mysql-test/suite/innodb_zip/t/8k.test +++ /dev/null @@ -1,463 +0,0 @@ -# Tests for setting innodb-page-size=8k - ---source include/have_innodb.inc ---source include/have_innodb_8k.inc ---source include/innodb_checksum_algorithm.inc - -SET default_storage_engine=InnoDB; - ---disable_query_log -let $MYSQLD_DATADIR = `select @@datadir`; -let $INNODB_PAGE_SIZE = `select @@innodb_page_size`; - -call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is"); ---enable_query_log - ---echo # Test 1) Show the page size from Information Schema ---disable_warnings -SELECT variable_value FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_page_size'; ---enable_warnings - ---echo # Test 2) The number of buffer pool pages is dependent upon the page size. ---disable_warnings ---replace_result 1023 {checked_valid} 1024 {checked_valid} -SELECT variable_value FROM information_schema.global_status - WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; ---enable_warnings - ---echo # Test 3) Query some information_shema tables that are dependent upon ---echo # the page size. -# Show the metadata for tables in schema 'mysql'. -# Pulled from innodb-system-table-view.test -# The IDs of mysql.innodb_table_stats and mysql.innodb_index_stats are -# unpredictable. They depend on whether mtr has created the database for -# this test from scratch or is using a previously created database where -# those tables have been dropped and recreated. Since we cannot force mtr -# to use a freshly created database for this test we do not return the -# table or index IDs. We can return the space IS of mysql schema tables -# since they are created consistently during bootstrap. -SELECT t.name table_name, t.n_cols, t.flag table_flags, - i.name index_name, i.page_no root_page, i.type, - i.n_fields, i.merge_threshold - FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, - INFORMATION_SCHEMA.INNODB_SYS_INDEXES i - WHERE t.table_id = i.table_id - AND t.name LIKE 'mysql%' - ORDER BY t.name, i.index_id; - -CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb; -CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb; -CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb; -CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb; - -# Show the metadata for tables in schema 'test'. -# Do not return the space ID since this tablespace may have existed before -# this test runs. The root page number of each index should be consistent -# within a file-per-table tablespace. -SELECT t.name table_name, t.n_cols, t.flag table_flags, - i.name index_name, i.page_no root_page, i.type, - i.n_fields, i.merge_threshold - FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t, - INFORMATION_SCHEMA.INNODB_SYS_INDEXES i - WHERE t.table_id = i.table_id - AND t.name LIKE 'test%' - ORDER BY t.name, i.name; ---source suite/innodb/include/show_i_s_tablespaces.inc -DROP TABLE t1, t2, t3, t4; - ---echo # Test 4) The maximum row size is dependent upon the page size. ---echo # Redundant: 4027, Compact: 4030. ---echo # Compressed: 4030, Dynamic: 4030. ---echo # Each row format has its own amount of overhead that ---echo # varies depending on number of fields and other overhead. - -SET SESSION innodb_strict_mode = ON; - -# Redundant table; 3955 bytes with 20 CHAR fields -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(155) -) ROW_FORMAT=redundant; -DROP TABLE t1; ---replace_regex /> [0-9]*/> max_row_size/ ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(156) -) ROW_FORMAT=redundant; - -# Compact table; 4002 bytes with 20 CHAR fields -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202) -) ROW_FORMAT=compact; -DROP TABLE t1; ---replace_regex /> [0-9]*/> max_row_size/ ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203) -) ROW_FORMAT=compact; - -# Compressed table; 3905 bytes with 20 CHAR fields -# Bug#13391353 Limit is 3903 on 32-Linux only -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103) -) ROW_FORMAT=compressed; -DROP TABLE t1; ---replace_regex /> [0-9]*/> max_row_size/ ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(106) -) ROW_FORMAT=compressed; - -# Dynamic table; 4002 bytes with 20 CHAR fields -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202) -) ROW_FORMAT=dynamic; -DROP TABLE t1; ---replace_regex /> [0-9]*/> max_row_size/ ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1 ( -c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), -c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), -c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), -c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203) -) ROW_FORMAT=dynamic; - -# -# Test the maximum key length -# Moved from innodb-index.test since each page size has its own max key length. -# Max Key Length is 1536 for 8k pages. -# -# InnoDB assumes 3 bytes for each UTF8 character. -# -CREATE TABLE t1 (a varchar(128) character set utf8, - b varchar(128) character set utf8, - c varchar(128) character set utf8, - d varchar(128) character set utf8, - PRIMARY KEY (a,b,c,d)) - ENGINE=innodb; -DROP TABLE t1; ---error ER_TOO_LONG_KEY -CREATE TABLE t1 (a varchar(128) character set utf8, - b varchar(128) character set utf8, - c varchar(128) character set utf8, - d varchar(129) character set utf8, - PRIMARY KEY (a,b,c,d)) - ENGINE=innodb; -CREATE TABLE t1 (a varchar(128) character set utf8, - b varchar(128) character set utf8, - c varchar(128) character set utf8, - d varchar(128) character set utf8, - e varchar(128) character set utf8, - PRIMARY KEY (a), KEY (b,c,d,e)) - ENGINE=innodb; -DROP TABLE t1; ---error ER_TOO_LONG_KEY -CREATE TABLE t1 (a varchar(128) character set utf8, - b varchar(128) character set utf8, - c varchar(128) character set utf8, - d varchar(128) character set utf8, - e varchar(129) character set utf8, - PRIMARY KEY (a), KEY (b,c,d,e)) - ENGINE=innodb; - ---echo # Test 5) Make sure that KEY_BLOCK_SIZE=8, 4, 2 & 1 are all ---echo # accepted and that KEY_BLOCK_SIZE=16 is rejected in ---echo # strict mode and converted to 8 in non-strict mode. - -SET SESSION innodb_strict_mode = ON; - ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; -SHOW WARNINGS; - -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; -DROP TABLE t1; - -SET SESSION innodb_strict_mode = OFF; - -CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; -DROP TABLE t1; - -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; -DROP TABLE t1; - -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; - -ALTER TABLE t1 KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT table_name, row_format, create_options - FROM information_schema.tables WHERE table_name = 't1'; -DROP TABLE t1; - - ---echo # Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16 ---echo # are rejected when innodb_file_per_table=OFF -# Moved from innodb-zip.test -SET SESSION innodb_strict_mode = ON; -SET GLOBAL innodb_file_per_table = OFF; -SHOW VARIABLES LIKE 'innodb_file_per_table'; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8; -SHOW WARNINGS; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -SET GLOBAL innodb_file_per_table = ON; - ---echo # Test 7) Not included here; 16k only - - ---echo # Test 8) Test creating a table that could lead to undo log overflow. -CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, - h blob,i blob,j blob,k blob,l blob,m blob,n blob, - o blob,p blob,q blob,r blob,s blob,t blob,u blob) - ENGINE=InnoDB ROW_FORMAT=dynamic; -SET @a = repeat('a', 767); -SET @b = repeat('b', 767); -SET @c = repeat('c', 767); -SET @d = repeat('d', 767); -SET @e = repeat('e', 767); - -# With no indexes defined, we can update all columns to max key part length. -INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a); -UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b, - k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b; - -# With this many indexes defined, we can still update all fields. -CREATE INDEX t1a ON t1 (a(767)); -CREATE INDEX t1b ON t1 (b(767)); -UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, - k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c; - -# Add one more index and the UNDO record becomes too big to update all columns. -# But a single transaction can update the columns in separate statements. -# because the UNDO records will be smaller. -CREATE INDEX t1c ON t1 (c(767)); -BEGIN; -UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d, - k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; -ROLLBACK; -BEGIN; -UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d; -UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d, - n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d; -COMMIT; - -# More indexes can still be added and a single field can still be updated -CREATE INDEX t1d ON t1 (d(767)); -UPDATE t1 SET d=@e; -CREATE INDEX t1e ON t1 (e(767)); -UPDATE t1 SET e=@e; -CREATE INDEX t1f ON t1 (f(767)); -UPDATE t1 SET f=@e; -CREATE INDEX t1g ON t1 (g(767)); -UPDATE t1 SET g=@e; -CREATE INDEX t1h ON t1 (h(767)); -UPDATE t1 SET h=@e; -CREATE INDEX t1i ON t1 (i(767)); -UPDATE t1 SET i=@e; - ---replace_regex /> [0-9]*/> max_row_size/ -CREATE INDEX t1k ON t1 (j(767)); - -# But it does allow a 500 byte index. And with this, we cannot -# update the record. This is a problem. It means that the DDL is -# allowed to create a table and a record that CANNOT be updated. -# See bug#12953735 ---replace_regex /> [0-9]*/> max_row_size/ -CREATE INDEX t1j ON t1 (j(500)); -BEGIN; -UPDATE t1 SET j=@e; -ROLLBACK; -SHOW CREATE TABLE t1; -DROP TABLE t1; - -# -# Bug #13336585 - INNODB: CHANGE BUFFERING WITH 4K PAGES CAN ASSERT -# IF SECONDARY KEY IS NEAR MAX -# If the secondary index tuple is close to half the page size, -# ibuf_insert_low() could return DB_TOO_BIG_RECORD, which is not expected -# in ibuf_insert(). In order to insure this does not happen, WL5756 -# imposes a maximum key length of 768 for 4k pages and 1536 for 8k pages. -# The existing max key Size for 16k pages is 3072. -# - -#-- disable_query_log -# The flag innodb_change_buffering_debug is only available in debug builds. -# It instructs InnoDB to try to evict pages from the buffer pool when -# change buffering is possible, so that the change buffer will be used -# whenever possible. -#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE -#SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug; -#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE -#SET GLOBAL innodb_change_buffering_debug = 1; -#-- enable_query_log - -# make sure the largest possible key entry can be added to the insert buffer. -# Make enough records so that the root page is not a leaf page. -SET SESSION innodb_strict_mode = OFF; -CREATE TABLE t1( - pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96), - pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96), - pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96), - pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96), - sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96), - sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96), - sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96), - sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96), - PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, - pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), - KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, - sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) - ROW_FORMAT=Redundant ENGINE=InnoDB; -SET @r = repeat('a', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('b', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('c', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('d', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('e', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -DELETE from t1; -DROP TABLE t1; - -# Compressed tables do not compress parent pages. So the whole uncompressed -# secondary tuple including the primary key must be able to fit in half the -# compressed page size. This record length is enforced at index creation. -# So the only way to get an ibuf tuple too big is to make the KEY_BLOCK_SIZE -# the same as the page size. -CREATE TABLE t1( - pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96), - pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96), - pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96), - pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96), - sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96), - sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96), - sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96), - sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96), - PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, - pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), - KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, - sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) - ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8 ENGINE=InnoDB; -SET @r = repeat('a', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('b', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('c', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('d', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -SET @r = repeat('e', 96); -INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, - @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -DELETE from t1; -DROP TABLE t1; - -#-- disable_query_log -#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE -#SET GLOBAL innodb_change_buffering_debug = 0; -#-- enable_query_log - -# The following should fail in non-strict mode too. -# (The fix of Bug #50945 only affects REDUNDANT and COMPACT tables.) -SET SESSION innodb_strict_mode = off; ---replace_regex /> [0-9]*/> max_row_size/ -CREATE TABLE t1( - c text NOT NULL, d text NOT NULL, - PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -DROP TABLE t1; ---replace_regex /> [0-9]*/> max_row_size/ -CREATE TABLE t1( - c text NOT NULL, d text NOT NULL, - PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; -DROP TABLE t1; -CREATE TABLE t1( - c text NOT NULL, d text NOT NULL, - PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; -drop table t1; ---replace_regex /> [0-9]*/> max_row_size/ -CREATE TABLE t1(c text, PRIMARY KEY (c(440))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -DROP TABLE t1; -CREATE TABLE t1(c text, PRIMARY KEY (c(438))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); -DROP TABLE t1; diff --git a/mysql-test/suite/innodb_zip/t/16k-master.opt b/mysql-test/suite/innodb_zip/t/page_size.opt index 82f574a8039..82f574a8039 100644 --- a/mysql-test/suite/innodb_zip/t/16k-master.opt +++ b/mysql-test/suite/innodb_zip/t/page_size.opt diff --git a/mysql-test/suite/innodb_zip/t/16k.test b/mysql-test/suite/innodb_zip/t/page_size.test index c3da0de3acc..0faf4428f62 100644 --- a/mysql-test/suite/innodb_zip/t/16k.test +++ b/mysql-test/suite/innodb_zip/t/page_size.test @@ -1,9 +1,5 @@ -# Tests for setting innodb-page-size=16k; default value ---source include/big_test.inc ---source include/have_innodb.inc ---source include/have_innodb_16k.inc +--source include/innodb_page_size_small.inc --source include/innodb_checksum_algorithm.inc - SET default_storage_engine=InnoDB; --disable_query_log @@ -11,24 +7,11 @@ let $MYSQLD_DATADIR = `select @@datadir`; let $INNODB_PAGE_SIZE = `select @@innodb_page_size`; call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is"); -# These values can change during the test --enable_query_log --echo # Test 1) Show the page size from Information Schema ---disable_warnings SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; ---enable_warnings - ---echo # Test 2) The number of buffer pool pages is dependent upon the page size. -# -# buffer pool pages is dependent upon buffer pool size and what other -# tests are run concurrently -#--disable_warnings -#--replace_result 1535 {checked_valid} 1536 {checked_valid} -#SELECT variable_value FROM information_schema.global_status -# WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; -#--enable_warnings --echo # Test 3) Query some information_shema tables that are dependent upon --echo # the page size. @@ -71,13 +54,212 @@ SELECT t.name table_name, t.n_cols, t.flag table_flags, DROP TABLE t1, t2, t3, t4; --echo # Test 4) The maximum row size is dependent upon the page size. ---echo # Redundant: 8123, Compact: 8126. ---echo # Compressed: 8126, Dynamic: 8126. --echo # Each row format has its own amount of overhead that --echo # varies depending on number of fields and other overhead. SET SESSION innodb_strict_mode = ON; +if ($INNODB_PAGE_SIZE == 4096) { +# Redundant table; 1927 bytes with 10 CHAR fields +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(127) +) ROW_FORMAT=redundant; +DROP TABLE t1; +--replace_regex /> [0-9]*/> max_row_size/ +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(128) +) ROW_FORMAT=redundant; + +# Compact table; 1955 bytes with 10 CHAR fields +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155) +) ROW_FORMAT=compact; +DROP TABLE t1; +--replace_regex /> [0-9]*/> max_row_size/ +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156) +) ROW_FORMAT=compact; + +# Compressed table; 1878 bytes with 10 CHAR fields +# Bug#13391353 Limit is 1876 on 32-Linux only +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76) +) ROW_FORMAT=compressed; +DROP TABLE t1; +--replace_regex /> [0-9]*/> max_row_size/ +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(79) +) ROW_FORMAT=compressed; + +# Dynamic table; 1955 bytes with 10 CHAR fields +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155) +) ROW_FORMAT=dynamic; +DROP TABLE t1; +--replace_regex /> [0-9]*/> max_row_size/ +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156) +) ROW_FORMAT=dynamic; + +# +# Test the maximum key length +# Moved from innodb-index.test since each page size has its own max key length. +# Max Key Length is 1173 for 4k pages. +# +# InnoDB assumes 3 bytes for each UTF8 character. +# +CREATE TABLE t1 (a varchar(98) character set utf8, + b varchar(98) character set utf8, + c varchar(98) character set utf8, + d varchar(97) character set utf8, + PRIMARY KEY (a,b,c,d)) + ENGINE=innodb; +DROP TABLE t1; +--error ER_TOO_LONG_KEY +CREATE TABLE t1 (a varchar(98) character set utf8, + b varchar(98) character set utf8, + c varchar(98) character set utf8, + d varchar(98) character set utf8, + PRIMARY KEY (a,b,c,d)) + ENGINE=innodb; +CREATE TABLE t1 (a varchar(98) character set utf8, + b varchar(98) character set utf8, + c varchar(98) character set utf8, + d varchar(98) character set utf8, + e varchar(97) character set utf8, + PRIMARY KEY (a), KEY (b,c,d,e)) + ENGINE=innodb; +DROP TABLE t1; +--error ER_TOO_LONG_KEY +CREATE TABLE t1 (a varchar(98) character set utf8, + b varchar(98) character set utf8, + c varchar(98) character set utf8, + d varchar(98) character set utf8, + e varchar(98) character set utf8, + PRIMARY KEY (a), KEY (b,c,d,e)) + ENGINE=innodb; +} +if ($INNODB_PAGE_SIZE == 8192) { +# Redundant table; 3955 bytes with 20 CHAR fields +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(155) +) ROW_FORMAT=redundant; +DROP TABLE t1; +--replace_regex /> [0-9]*/> max_row_size/ +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(156) +) ROW_FORMAT=redundant; + +# Compact table; 4002 bytes with 20 CHAR fields +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202) +) ROW_FORMAT=compact; +DROP TABLE t1; +--replace_regex /> [0-9]*/> max_row_size/ +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203) +) ROW_FORMAT=compact; + +# Compressed table; 3905 bytes with 20 CHAR fields +# Bug#13391353 Limit is 3903 on 32-Linux only +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103) +) ROW_FORMAT=compressed; +DROP TABLE t1; +--replace_regex /> [0-9]*/> max_row_size/ +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(106) +) ROW_FORMAT=compressed; + +# Dynamic table; 4002 bytes with 20 CHAR fields +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202) +) ROW_FORMAT=dynamic; +DROP TABLE t1; +--replace_regex /> [0-9]*/> max_row_size/ +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1 ( +c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), +c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200), +c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200), +c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203) +) ROW_FORMAT=dynamic; + +# +# Test the maximum key length +# Moved from innodb-index.test since each page size has its own max key length. +# Max Key Length is 1536 for 8k pages. +# +# InnoDB assumes 3 bytes for each UTF8 character. +# +CREATE TABLE t1 (a varchar(128) character set utf8, + b varchar(128) character set utf8, + c varchar(128) character set utf8, + d varchar(128) character set utf8, + PRIMARY KEY (a,b,c,d)) + ENGINE=innodb; +DROP TABLE t1; +--error ER_TOO_LONG_KEY +CREATE TABLE t1 (a varchar(128) character set utf8, + b varchar(128) character set utf8, + c varchar(128) character set utf8, + d varchar(129) character set utf8, + PRIMARY KEY (a,b,c,d)) + ENGINE=innodb; +CREATE TABLE t1 (a varchar(128) character set utf8, + b varchar(128) character set utf8, + c varchar(128) character set utf8, + d varchar(128) character set utf8, + e varchar(128) character set utf8, + PRIMARY KEY (a), KEY (b,c,d,e)) + ENGINE=innodb; +DROP TABLE t1; +--error ER_TOO_LONG_KEY +CREATE TABLE t1 (a varchar(128) character set utf8, + b varchar(128) character set utf8, + c varchar(128) character set utf8, + d varchar(128) character set utf8, + e varchar(129) character set utf8, + PRIMARY KEY (a), KEY (b,c,d,e)) + ENGINE=innodb; +} +if ($INNODB_PAGE_SIZE == 16384) { # Redundant table; 8011 bytes with 40 char fields CREATE TABLE t1 ( c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200), @@ -216,12 +398,32 @@ CREATE TABLE t1 (a varchar(255) character set utf8, f varchar(5) character set utf8, PRIMARY KEY (a), KEY (b,c,d,e,f)) ENGINE=innodb; +} ---echo # Test 5) Make sure that KEY_BLOCK_SIZE=16, 8, 4, 2 & 1 ---echo # are all accepted. +--echo # Test 5) KEY_BLOCK_SIZE validation -SET SESSION innodb_strict_mode = ON; +if ($INNODB_PAGE_SIZE == 4096) { +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; +SHOW WARNINGS; + +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SHOW WARNINGS; + +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; +} +if ($INNODB_PAGE_SIZE == 8192) { +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +SELECT table_name, row_format, create_options + FROM information_schema.tables WHERE table_name = 't1'; +} +if ($INNODB_PAGE_SIZE == 16384) { CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; SHOW WARNINGS; SELECT table_name, row_format, create_options @@ -231,7 +433,7 @@ ALTER TABLE t1 KEY_BLOCK_SIZE=8; SHOW WARNINGS; SELECT table_name, row_format, create_options FROM information_schema.tables WHERE table_name = 't1'; - +} ALTER TABLE t1 KEY_BLOCK_SIZE=4; SHOW WARNINGS; SELECT table_name, row_format, create_options @@ -287,20 +489,20 @@ SELECT table_name, row_format, create_options DROP TABLE t1; ---echo # Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16 ---echo # are rejected when innodb_file_per_table=OFF +--echo # Test 6) KEY_BLOCK_SIZE with innodb_file_per_table=OFF # Moved from innodb-zip.test SET SESSION innodb_strict_mode = ON; SET GLOBAL innodb_file_per_table = OFF; SHOW VARIABLES LIKE 'innodb_file_per_table'; ---error ER_ILLEGAL_HA,1005 +--error ER_CANT_CREATE_TABLE CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8; SHOW WARNINGS; ---error ER_ILLEGAL_HA,1005 +--error ER_CANT_CREATE_TABLE CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16; SHOW WARNINGS; SET GLOBAL innodb_file_per_table = ON; +if ($INNODB_PAGE_SIZE == 16384) { --echo # Test 7) This series of tests were moved from innodb-index to here --echo # because the second alter table t1 assumes a 16k page size. --echo # Moving the test allows the rest of innodb-index to be run on all @@ -412,6 +614,7 @@ EXPLAIN SELECT * FROM t1 WHERE b LIKE 'adfd%'; # # end disabled45225_1 DROP TABLE t1; +} --echo # Test 8) Test creating a table that could lead to undo log overflow. CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, @@ -431,10 +634,12 @@ UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b, # With this many indexes defined, we can still update all fields. CREATE INDEX t1a ON t1 (a(767)); +if ($INNODB_PAGE_SIZE == 16384) { CREATE INDEX t1b ON t1 (b(767)); CREATE INDEX t1c ON t1 (c(767)); CREATE INDEX t1d ON t1 (d(767)); CREATE INDEX t1e ON t1 (e(767)); +} UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c, k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c; @@ -455,6 +660,7 @@ COMMIT; # More indexes can still be added and a single field can still be updated CREATE INDEX t1g ON t1 (g(767)); UPDATE t1 SET g=@e; +if ($INNODB_PAGE_SIZE == 16384) { CREATE INDEX t1h ON t1 (h(767)); UPDATE t1 SET h=@e; CREATE INDEX t1i ON t1 (i(767)); @@ -479,6 +685,7 @@ CREATE INDEX t1r ON t1 (r(767)); UPDATE t1 SET r=@e; CREATE INDEX t1s ON t1 (s(767)); UPDATE t1 SET s=@e; +} # Add one more index and we cannot update a column to its defined index length. # This is a problem. It means that the DDL is allowed to create a table @@ -489,133 +696,25 @@ UPDATE t1 SET t=@e; ROLLBACK; CREATE INDEX t1u ON t1 (u(767)); +if ($INNODB_PAGE_SIZE == 4096) +{ +CREATE INDEX t1ut ON t1 (u(767)); +CREATE INDEX t1st ON t1 (s(767)); +} +if ($INNODB_PAGE_SIZE != 4096) +{ CREATE INDEX t1ut ON t1 (u(767), t(767)); CREATE INDEX t1st ON t1 (s(767), t(767)); +} SHOW CREATE TABLE t1; DROP TABLE t1; ---echo # Bug #12429576 - Test an assertion failure on purge. -# This test is not in innodb_8k or innodb_4k since the bug is not about -# page size. It just tests the condition that caused the assertion. -CREATE TABLE t1_purge ( -A int, -B blob, C blob, D blob, E blob, -F blob, G blob, H blob, -PRIMARY KEY (B(767), C(767), D(767), E(767), A), -INDEX (A) -) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; - -INSERT INTO t1_purge VALUES (1, -REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766), -REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766)); - -CREATE TABLE t2_purge ( -A int PRIMARY KEY, -B blob, C blob, D blob, E blob, -F blob, G blob, H blob, I blob, -J blob, K blob, L blob, -INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; - -INSERT INTO t2_purge VALUES (1, -REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766), -REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766), REPEAT('i', 766), -REPEAT('j', 766), REPEAT('k', 766), REPEAT('l', 766)); - -CREATE TABLE t3_purge ( -A int, -B varchar(800), C varchar(800), D varchar(800), E varchar(800), -F varchar(800), G varchar(800), H varchar(800), -PRIMARY KEY (B(767), C(767), D(767), E(767), A), -INDEX (A) -) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; - -INSERT INTO t3_purge SELECT * FROM t1_purge; - -CREATE TABLE t4_purge ( -A int PRIMARY KEY, -B varchar(800), C varchar(800), D varchar(800), E varchar(800), -F varchar(800), G varchar(800), H varchar(800), I varchar(800), -J varchar(800), K varchar(800), L varchar(800), -INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; - -INSERT INTO t4_purge SELECT * FROM t2_purge; - -# This would trigger the failure (Bug #12429576) -# if purge gets a chance to run before DROP TABLE t1_purge, .... -DELETE FROM t1_purge; -DELETE FROM t2_purge; -DELETE FROM t3_purge; -DELETE FROM t4_purge; -# We need to activate the purge thread. -# Instead of doing a --sleep 10 now, do it once at the end. - -# Bug#12637786 - Assertion hit; ut_ad(dict_index_is_clust(index)); -# A secondary index tuple is found to be too long to fit into a page. -# This test is not in innodb_8k or innodb_4k since the bug is not about -# page size. It just tests the condition that caused the assertion. -SET @r=REPEAT('a',500); -CREATE TABLE t12637786(a int, - v1 varchar(500), v2 varchar(500), v3 varchar(500), - v4 varchar(500), v5 varchar(500), v6 varchar(500), - v7 varchar(500), v8 varchar(500), v9 varchar(500), - v10 varchar(500), v11 varchar(500), v12 varchar(500), - v13 varchar(500), v14 varchar(500), v15 varchar(500), - v16 varchar(500), v17 varchar(500), v18 varchar(500) -) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -CREATE INDEX idx1 ON t12637786(a,v1); -INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -UPDATE t12637786 SET a=1000; -DELETE FROM t12637786; -# We need to activate the purge thread to make sure it does not assert and -# is able to clean up the old versions of secondary index entries. -# Instead of doing a --sleep 10 now for each test, do it once at the end. - ---echo # Bug#12963823 - Test that the purge thread does not crash when -# the number of indexes has changed since the UNDO record was logged. -# This test is not in innodb_8k or innodb_4k since the bug is not about -# page size. It just tests the condition that caused the crash. -CREATE TABLE t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob, - i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob) - ENGINE=innodb ROW_FORMAT=dynamic; -SET @r = REPEAT('a', 767); -INSERT INTO t12963823 VALUES (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r); -CREATE INDEX ndx_a ON t12963823 (a(500)); -CREATE INDEX ndx_b ON t12963823 (b(500)); -CREATE INDEX ndx_c ON t12963823 (c(500)); -CREATE INDEX ndx_d ON t12963823 (d(500)); -CREATE INDEX ndx_e ON t12963823 (e(500)); -CREATE INDEX ndx_f ON t12963823 (f(500)); -CREATE INDEX ndx_k ON t12963823 (k(500)); -CREATE INDEX ndx_l ON t12963823 (l(500)); - -SET @r = REPEAT('b', 500); -UPDATE t12963823 set a=@r,b=@r,c=@r,d=@r; -UPDATE t12963823 set e=@r,f=@r,g=@r,h=@r; -UPDATE t12963823 set i=@r,j=@r,k=@r,l=@r; -UPDATE t12963823 set m=@r,n=@r,o=@r,p=@r; -ALTER TABLE t12963823 DROP INDEX ndx_a; -ALTER TABLE t12963823 DROP INDEX ndx_b; -CREATE INDEX ndx_g ON t12963823 (g(500)); -CREATE INDEX ndx_h ON t12963823 (h(500)); -CREATE INDEX ndx_i ON t12963823 (i(500)); -CREATE INDEX ndx_j ON t12963823 (j(500)); -CREATE INDEX ndx_m ON t12963823 (m(500)); -CREATE INDEX ndx_n ON t12963823 (n(500)); -CREATE INDEX ndx_o ON t12963823 (o(500)); -CREATE INDEX ndx_p ON t12963823 (p(500)); -SHOW CREATE TABLE t12963823; -# We need to activate the purge thread at this point to see if it crashes. -# Instead of doing a --sleep 10 now for each test, do it once at the end. - --echo # Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE # InnoDB cannot know that this undo record would be too big for the undo # page. Too much of text field is stored in the clustered record in this # DYNAMIC row formatted record. -# This test is not in innodb_8k or innodb_4k since the bug is not about -# page size. It just tests the condition that caused the hang. -SET SESSION innodb_strict_mode = ON; CREATE TABLE bug12547647( a int NOT NULL, b blob NOT NULL, c text, PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767)) @@ -629,9 +728,127 @@ SHOW WARNINGS; ROLLBACK; DROP TABLE bug12547647; +# +# Bug #13336585 - INNODB: CHANGE BUFFERING WITH 4K PAGES CAN ASSERT +# IF SECONDARY KEY IS NEAR MAX +# If the secondary index tuple is close to half the page size, +# ibuf_insert_low() could return DB_TOO_BIG_RECORD, which is not expected +# in ibuf_insert(). In order to insure this does not happen, WL5756 +# imposes a maximum key length of 768 for 4k pages and 1536 for 8k pages. +# The existing max key Size for 16k pages is 3072. +# + +#-- disable_query_log +# The flag innodb_change_buffering_debug is only available in debug builds. +# It instructs InnoDB to try to evict pages from the buffer pool when +# change buffering is possible, so that the change buffer will be used +# whenever possible. +# This flag is not used currently since it exposes valgrind error in ibuf +# code with the following SQL +#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE +#SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug; +#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE +#SET GLOBAL innodb_change_buffering_debug = 1; +#-- enable_query_log + +# make sure the largest possible key entry can be added to the insert buffer. +# Make enough records so that the root page is not a leaf page. +SET SESSION innodb_strict_mode = OFF; +CREATE TABLE t1( + pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48), + pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48), + pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48), + pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48), + sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48), + sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48), + sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48), + sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48), + PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, + pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), + KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, + sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) + ROW_FORMAT=Redundant ENGINE=InnoDB; +SET @r = repeat('a', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, + @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('b', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, + @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('c', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, + @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('d', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, + @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('e', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, + @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +DELETE from t1; +DROP TABLE t1; + +# Compressed tables do not compress parent pages. So the whole uncompressed +# secondary tuple including the primary key must be able to fit in half the +# compressed page size. This record length is enforced at index creation. +# So the only way to get an ibuf tuple too big is to make the KEY_BLOCK_SIZE +# the same as the page size. +CREATE TABLE t1( + pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48), + pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48), + pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48), + pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48), + sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48), + sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48), + sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48), + sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48), + PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08, + pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16), + KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08, + sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16)) + ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 ENGINE=InnoDB; +SET @r = repeat('a', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, + @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('b', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, + @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('c', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, + @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('d', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, + @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +SET @r = repeat('e', 48); +INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r, + @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +DELETE from t1; +DROP TABLE t1; + +#-- disable_query_log +#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE +#SET GLOBAL innodb_change_buffering_debug = 0; +#-- enable_query_log + # The following should fail in non-strict mode too. # (The fix of Bug #50945 only affects REDUNDANT and COMPACT tables.) -SET SESSION innodb_strict_mode = off; +if ($INNODB_PAGE_SIZE == 4096) +{ +CREATE TABLE t1( + c text NOT NULL, d text NOT NULL, + PRIMARY KEY (c(767))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; +DROP TABLE t1; +CREATE TABLE t1( + c text NOT NULL, d text NOT NULL, + PRIMARY KEY (c(767))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; +DROP TABLE t1; +CREATE TABLE t1( + c text NOT NULL, d text NOT NULL, + PRIMARY KEY (c(767))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; +} +if ($INNODB_PAGE_SIZE != 4096) +{ CREATE TABLE t1( c text NOT NULL, d text NOT NULL, PRIMARY KEY (c(767),d(767))) @@ -646,7 +863,8 @@ CREATE TABLE t1( c text NOT NULL, d text NOT NULL, PRIMARY KEY (c(767),d(767))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; -drop table t1; +} +DROP TABLE t1; CREATE TABLE t1(c text, PRIMARY KEY (c(440))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; DROP TABLE t1; @@ -654,63 +872,3 @@ CREATE TABLE t1(c text, PRIMARY KEY (c(438))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); DROP TABLE t1; - - ---echo # ---echo # Bug#56862 Execution of a query that uses index merge returns a wrong result ---echo # - -# Moved to here from innodb_mysql.test. Some PB3 systems sporadically -# had timeouts doing this with smaller page sizes. - -CREATE TABLE t1 ( - pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, - a int, - b int, - INDEX idx(a)) -ENGINE=INNODB; - -INSERT INTO t1(a,b) VALUES - (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), - (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), - (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), - (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); -INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; -INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; -INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1 VALUES (1000000, 0, 0); - -set @optimizer_switch_saved=@@optimizer_switch; -SET SESSION optimizer_switch='derived_merge=off'; -SET SESSION sort_buffer_size = 1024*36; - ---replace_column 9 # -EXPLAIN -SELECT COUNT(*) FROM - (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) - WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; - -SELECT COUNT(*) FROM - (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) - WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; - -set @@optimizer_switch=@optimizer_switch_saved; -SET SESSION sort_buffer_size = DEFAULT; - -DROP TABLE t1; - - -# The tests that uses these tables required the purge thread to run. -# Just in case it has not by now, provide a 10 second wait. ---sleep 10 -DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge; -DROP TABLE t12637786; -DROP TABLE t12963823; diff --git a/mysql-test/suite/maria/alter.result b/mysql-test/suite/maria/alter.result index c2ddc813cdc..4e6f21b70a7 100644 --- a/mysql-test/suite/maria/alter.result +++ b/mysql-test/suite/maria/alter.result @@ -90,3 +90,17 @@ check table t2; Table Op Msg_type Msg_text test.t2 check status OK DROP TABLE t1,t2; +# +# MDEV-17576 +# Assertion `share->reopen == 1' failed in maria_extra upon ALTER on +# Aria table with triggers and locks +# +CREATE TABLE t1 (a INT) ENGINE=Aria; +CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t1 SELECT * FROM t1; +LOCK TABLE t1 WRITE; +ALTER TABLE t1 FORCE, LOCK=EXCLUSIVE; +DROP TRIGGER tr; +DROP TABLE t1; +# +# End of 10.2 test +# diff --git a/mysql-test/suite/maria/alter.test b/mysql-test/suite/maria/alter.test index ef21ab2e5d2..31eeac1df87 100644 --- a/mysql-test/suite/maria/alter.test +++ b/mysql-test/suite/maria/alter.test @@ -11,7 +11,7 @@ drop table if exists t1; CREATE TABLE t1 (pk INT, d DATETIME, PRIMARY KEY(pk), KEY(d)) ENGINE=Aria; ALTER TABLE t1 DISABLE KEYS; INSERT INTO t1 VALUES (1,'2000-01-01 22:22:22'),(2,'2012-12-21 12:12:12'); -INSERT INTO t1 VALUES (3, '2008-07-24'); +INSERT INTO t1 VALUES (3, '2008-07-24'); ALTER TABLE t1 ENABLE KEYS; SELECT t1a.pk FROM t1 AS t1a LEFT JOIN t1 AS t1b ON t1a.pk = t1b.pk; @@ -74,6 +74,19 @@ check table t1; check table t2; DROP TABLE t1,t2; -# -# End of 10.2 tests -# +--echo # +--echo # MDEV-17576 +--echo # Assertion `share->reopen == 1' failed in maria_extra upon ALTER on +--echo # Aria table with triggers and locks +--echo # + +CREATE TABLE t1 (a INT) ENGINE=Aria; +CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t1 SELECT * FROM t1; +LOCK TABLE t1 WRITE; +ALTER TABLE t1 FORCE, LOCK=EXCLUSIVE; +DROP TRIGGER tr; +DROP TABLE t1; + +--echo # +--echo # End of 10.2 test +--echo # diff --git a/mysql-test/suite/maria/kill.result b/mysql-test/suite/maria/kill.result new file mode 100644 index 00000000000..5e75e75a41a --- /dev/null +++ b/mysql-test/suite/maria/kill.result @@ -0,0 +1,13 @@ +# +# MDEV-14996 +# Assertion `!thd->get_stmt_da()->is_sent() || +# thd->killed == KILL_CONNECTION' failed in ha_maria::external_lock +# +CREATE TABLE t1 (a INT) ENGINE=Aria; +connect con1,localhost,root,,; +FLUSH TABLE t1 FOR EXPORT; +KILL CONNECTION_ID(); +ERROR 70100: Connection was killed +disconnect con1; +connection default; +DROP TABLE t1; diff --git a/mysql-test/suite/maria/kill.test b/mysql-test/suite/maria/kill.test new file mode 100644 index 00000000000..98a588a6698 --- /dev/null +++ b/mysql-test/suite/maria/kill.test @@ -0,0 +1,14 @@ +--echo # +--echo # MDEV-14996 +--echo # Assertion `!thd->get_stmt_da()->is_sent() || +--echo # thd->killed == KILL_CONNECTION' failed in ha_maria::external_lock +--echo # + +CREATE TABLE t1 (a INT) ENGINE=Aria; +--connect (con1,localhost,root,,) +FLUSH TABLE t1 FOR EXPORT; +--error ER_CONNECTION_KILLED +KILL CONNECTION_ID(); +--disconnect con1 +--connection default +DROP TABLE t1; diff --git a/mysql-test/suite/mariabackup/missing_ibd.result b/mysql-test/suite/mariabackup/missing_ibd.result index 40caedf6492..1ad18e8b14d 100644 --- a/mysql-test/suite/mariabackup/missing_ibd.result +++ b/mysql-test/suite/mariabackup/missing_ibd.result @@ -3,5 +3,5 @@ INSERT INTO t1 VALUES(1); # restart # xtrabackup backup select * from t1; -ERROR 42S02: Table 'test.t1' doesn't exist in engine +ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB drop table t1; diff --git a/mysql-test/suite/mariabackup/missing_ibd.test b/mysql-test/suite/mariabackup/missing_ibd.test index 22044e59841..ce22616e25d 100644 --- a/mysql-test/suite/mariabackup/missing_ibd.test +++ b/mysql-test/suite/mariabackup/missing_ibd.test @@ -30,7 +30,6 @@ exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir rmdir $targetdir; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_GET_ERRNO select * from t1; drop table t1; - diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 159d8ca7ae1..6a377eb2a1d 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -876,6 +876,20 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST OFF,ON,FORCE READ_ONLY NO COMMAND_LINE_ARGUMENT OPTIONAL +VARIABLE_NAME INNODB_ENCRYPT_TEMPORARY_TABLES +SESSION_VALUE NULL +GLOBAL_VALUE OFF +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE OFF +VARIABLE_SCOPE GLOBAL +VARIABLE_TYPE BOOLEAN +VARIABLE_COMMENT Enrypt the temporary table data. +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST OFF,ON +READ_ONLY YES +COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME INNODB_FAST_SHUTDOWN SESSION_VALUE NULL GLOBAL_VALUE 1 |