diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-01 18:37:15 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-01 18:37:15 +0300 |
commit | 9c16460e63a5002d5949f67f57dce71e666547ec (patch) | |
tree | bb29fe94f869d828ed5768dbc72021d1911e2831 /mysql-test/suite | |
parent | 747dccfe23e46b928b005669124e7ad94a1fdefb (diff) | |
parent | 0e1ba364a12b6569c75a7dadc38b7ef2b4910d34 (diff) | |
download | mariadb-git-9c16460e63a5002d5949f67f57dce71e666547ec.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/innodb/r/foreign-keys.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/instant_alter_debug.result | 29 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/foreign-keys.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/instant_alter_debug.test | 25 |
4 files changed, 55 insertions, 3 deletions
diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result index 9dee6efcb04..f64e84fe429 100644 --- a/mysql-test/suite/innodb/r/foreign-keys.result +++ b/mysql-test/suite/innodb/r/foreign-keys.result @@ -110,7 +110,7 @@ SET debug_sync='alter_table_intermediate_table_created SIGNAL ready WAIT_FOR go' ALTER TABLE t1 ADD FOREIGN KEY(pk) REFERENCES t2(pk) ON UPDATE CASCADE; connect con1, localhost, root; SET debug_sync='now WAIT_FOR ready'; -SET lock_wait_timeout=1; +SET lock_wait_timeout=0; UPDATE t2 SET pk=10 WHERE pk=1; ERROR HY000: Lock wait timeout exceeded; try restarting transaction PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1'; diff --git a/mysql-test/suite/innodb/r/instant_alter_debug.result b/mysql-test/suite/innodb/r/instant_alter_debug.result index 866aeb48f67..7ab24a7671b 100644 --- a/mysql-test/suite/innodb/r/instant_alter_debug.result +++ b/mysql-test/suite/innodb/r/instant_alter_debug.result @@ -264,6 +264,33 @@ a b c d 2 3 4 1 DROP TABLE t1; # +# MDEV-19916 Corruption after instant ADD/DROP and shrinking the tree +# +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +SET @old_limit = @@innodb_limit_optimistic_insert_debug; +SET GLOBAL innodb_limit_optimistic_insert_debug = 2; +INSERT INTO t1 VALUES (1),(5),(4),(3),(2); +SET GLOBAL innodb_limit_optimistic_insert_debug = @old_limit; +ALTER TABLE t1 ADD COLUMN b INT, ALGORITHM=INSTANT; +SET @old_defragment = @@innodb_defragment; +SET GLOBAL innodb_defragment = 1; +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +SET GLOBAL innodb_defragment = @old_defragment; +ALTER TABLE t1 ADD vb INT AS (b) VIRTUAL; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SELECT * FROM t1; +a b vb +1 NULL NULL +2 NULL NULL +3 NULL NULL +4 NULL NULL +5 NULL NULL +DROP TABLE t1; +# # MDEV-17899 Assertion failures on rollback of instant ADD/DROP # MDEV-18098 Crash after rollback of instant DROP COLUMN # @@ -299,5 +326,5 @@ SELECT variable_value-@old_instant instants FROM information_schema.global_status WHERE variable_name = 'innodb_instant_alter_column'; instants -21 +22 SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency; diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test index e5950e01a11..d16ae9ed826 100644 --- a/mysql-test/suite/innodb/t/foreign-keys.test +++ b/mysql-test/suite/innodb/t/foreign-keys.test @@ -140,7 +140,7 @@ send ALTER TABLE t1 ADD FOREIGN KEY(pk) REFERENCES t2(pk) ON UPDATE CASCADE; connect con1, localhost, root; SET debug_sync='now WAIT_FOR ready'; -SET lock_wait_timeout=1; # change to 0 in 10.3 +SET lock_wait_timeout=0; --error ER_LOCK_WAIT_TIMEOUT UPDATE t2 SET pk=10 WHERE pk=1; PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1'; diff --git a/mysql-test/suite/innodb/t/instant_alter_debug.test b/mysql-test/suite/innodb/t/instant_alter_debug.test index 73a222cb23c..267e2a2c22d 100644 --- a/mysql-test/suite/innodb/t/instant_alter_debug.test +++ b/mysql-test/suite/innodb/t/instant_alter_debug.test @@ -301,6 +301,31 @@ SELECT * FROM t1; DROP TABLE t1; --echo # +--echo # MDEV-19916 Corruption after instant ADD/DROP and shrinking the tree +--echo # +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; + +# Create an index tree with 2 levels of node pointer pages. + +SET @old_limit = @@innodb_limit_optimistic_insert_debug; +SET GLOBAL innodb_limit_optimistic_insert_debug = 2; +INSERT INTO t1 VALUES (1),(5),(4),(3),(2); +SET GLOBAL innodb_limit_optimistic_insert_debug = @old_limit; + +ALTER TABLE t1 ADD COLUMN b INT, ALGORITHM=INSTANT; + +SET @old_defragment = @@innodb_defragment; +SET GLOBAL innodb_defragment = 1; +OPTIMIZE TABLE t1; +SET GLOBAL innodb_defragment = @old_defragment; + +# Exploit MDEV-17468 to force the table definition to be reloaded +ALTER TABLE t1 ADD vb INT AS (b) VIRTUAL; +CHECK TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; + +--echo # --echo # MDEV-17899 Assertion failures on rollback of instant ADD/DROP --echo # MDEV-18098 Crash after rollback of instant DROP COLUMN --echo # |