diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/main/range_innodb.result | 6 | ||||
-rw-r--r-- | mysql-test/main/range_innodb.test | 6 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/instant_alter_crash.result | 22 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/lock_delete_updated.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/instant_alter_crash.test | 26 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/lock_delete_updated.test | 12 | ||||
-rw-r--r-- | mysql-test/suite/innodb_fts/r/misc_debug2.result | 8 | ||||
-rw-r--r-- | mysql-test/suite/innodb_fts/t/misc_debug2.test | 8 |
8 files changed, 68 insertions, 24 deletions
diff --git a/mysql-test/main/range_innodb.result b/mysql-test/main/range_innodb.result index 1d98fad0295..6cd1c133b93 100644 --- a/mysql-test/main/range_innodb.result +++ b/mysql-test/main/range_innodb.result @@ -44,13 +44,13 @@ drop table t0,t1,t2; create table t1 ( pk int, a int, b int, primary key (pk), index idx1(b), index idx2(b) -) engine=innodb; +) engine=innodb STATS_AUTO_RECALC=0; Warnings: Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release insert into t1 values (1,6,0),(2,1,0),(3,5,2),(4,8,0); -create table t2 (c int) engine=innodb; +create table t2 (c int) engine=innodb STATS_AUTO_RECALC=0; insert into t2 values (1),(2); -create table t3 (d int) engine=innodb; +create table t3 (d int) engine=innodb STATS_AUTO_RECALC=0; insert into t3 values (3),(-1),(4); set @save_optimizer_switch=@@optimizer_switch; set optimizer_switch='extended_keys=on'; diff --git a/mysql-test/main/range_innodb.test b/mysql-test/main/range_innodb.test index 8b9771d1d1e..df0fff403a8 100644 --- a/mysql-test/main/range_innodb.test +++ b/mysql-test/main/range_innodb.test @@ -54,11 +54,11 @@ drop table t0,t1,t2; create table t1 ( pk int, a int, b int, primary key (pk), index idx1(b), index idx2(b) -) engine=innodb; +) engine=innodb STATS_AUTO_RECALC=0; insert into t1 values (1,6,0),(2,1,0),(3,5,2),(4,8,0); -create table t2 (c int) engine=innodb; +create table t2 (c int) engine=innodb STATS_AUTO_RECALC=0; insert into t2 values (1),(2); -create table t3 (d int) engine=innodb; +create table t3 (d int) engine=innodb STATS_AUTO_RECALC=0; insert into t3 values (3),(-1),(4); set @save_optimizer_switch=@@optimizer_switch; diff --git a/mysql-test/suite/innodb/r/instant_alter_crash.result b/mysql-test/suite/innodb/r/instant_alter_crash.result index 556e8d415f4..f017f860301 100644 --- a/mysql-test/suite/innodb/r/instant_alter_crash.result +++ b/mysql-test/suite/innodb/r/instant_alter_crash.result @@ -176,5 +176,25 @@ t3 CREATE TABLE `t3` ( PRIMARY KEY (`id`), UNIQUE KEY `v2` (`v2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -DROP TABLE t1,t2,t3; +DROP TABLE t2,t3; +# +# MDEV-29440 InnoDB instant ALTER TABLE recovery wrongly uses +# READ COMMITTED isolation level instead of READ UNCOMMITTED +# +CREATE TABLE t2(a INT UNSIGNED PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5),(6); +connect ddl, localhost, root; +SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever'; +ALTER TABLE t2 ADD COLUMN b TINYINT UNSIGNED NOT NULL DEFAULT 42 FIRST; +connection default; +SET DEBUG_SYNC='now WAIT_FOR ddl'; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1; +# Kill the server +disconnect ddl; +# restart +CHECK TABLE t2; +Table Op Msg_type Msg_text +test.t2 check status OK +DROP TABLE t1,t2; db.opt diff --git a/mysql-test/suite/innodb/r/lock_delete_updated.result b/mysql-test/suite/innodb/r/lock_delete_updated.result index c2cd47b5dd9..3ce63be36ab 100644 --- a/mysql-test/suite/innodb/r/lock_delete_updated.result +++ b/mysql-test/suite/innodb/r/lock_delete_updated.result @@ -1,11 +1,12 @@ CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t VALUES (3); BEGIN; -connection default; UPDATE t SET a = 2; connect con1,localhost,root; +SET DEBUG_SYNC="lock_wait_start SIGNAL del_locked"; DELETE FROM t; connection default; +SET DEBUG_SYNC="now WAIT_FOR del_locked"; UPDATE t SET a = 1; COMMIT; connection con1; @@ -17,4 +18,5 @@ connection default; SELECT count(*) FROM t; count(*) 1 +SET DEBUG_SYNC="reset"; DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/instant_alter_crash.test b/mysql-test/suite/innodb/t/instant_alter_crash.test index ddeaa6885e6..4d211ece106 100644 --- a/mysql-test/suite/innodb/t/instant_alter_crash.test +++ b/mysql-test/suite/innodb/t/instant_alter_crash.test @@ -198,6 +198,30 @@ disconnect ddl; SHOW CREATE TABLE t1; SHOW CREATE TABLE t2; SHOW CREATE TABLE t3; -DROP TABLE t1,t2,t3; +DROP TABLE t2,t3; + +--echo # +--echo # MDEV-29440 InnoDB instant ALTER TABLE recovery wrongly uses +--echo # READ COMMITTED isolation level instead of READ UNCOMMITTED +--echo # +CREATE TABLE t2(a INT UNSIGNED PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5),(6); + +connect ddl, localhost, root; +SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever'; +--send +ALTER TABLE t2 ADD COLUMN b TINYINT UNSIGNED NOT NULL DEFAULT 42 FIRST; + +connection default; +SET DEBUG_SYNC='now WAIT_FOR ddl'; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1; + +--source include/kill_mysqld.inc +disconnect ddl; +--source include/start_mysqld.inc + +CHECK TABLE t2; +DROP TABLE t1,t2; --list_files $MYSQLD_DATADIR/test diff --git a/mysql-test/suite/innodb/t/lock_delete_updated.test b/mysql-test/suite/innodb/t/lock_delete_updated.test index 4621d5fcd2b..1f7b13144e4 100644 --- a/mysql-test/suite/innodb/t/lock_delete_updated.test +++ b/mysql-test/suite/innodb/t/lock_delete_updated.test @@ -1,23 +1,20 @@ --source include/have_innodb.inc --source include/count_sessions.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t VALUES (3); BEGIN; - -connection default; UPDATE t SET a = 2; connect con1,localhost,root; +SET DEBUG_SYNC="lock_wait_start SIGNAL del_locked"; send DELETE FROM t; connection default; -let $wait_condition= - select count(*) = 1 from information_schema.processlist - where state = "Updating" and info = "DELETE FROM t"; ---source include/wait_condition.inc - +SET DEBUG_SYNC="now WAIT_FOR del_locked"; UPDATE t SET a = 1; COMMIT; @@ -30,5 +27,6 @@ connection default; --echo # The above DELETE must delete all the rows in the table, so the --echo # following SELECT must show 0 rows. SELECT count(*) FROM t; +SET DEBUG_SYNC="reset"; DROP TABLE t; --source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb_fts/r/misc_debug2.result b/mysql-test/suite/innodb_fts/r/misc_debug2.result index f1ebef6175f..2587b1c74b0 100644 --- a/mysql-test/suite/innodb_fts/r/misc_debug2.result +++ b/mysql-test/suite/innodb_fts/r/misc_debug2.result @@ -11,12 +11,12 @@ DROP TABLE mdev21563; # CREATE TABLE t1(f1 CHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB; INSERT INTO t1 VALUES('mysql'), ('innodb'); -set debug_dbug="+d,fts_instrument_sync_debug"; +set debug_dbug="+d,fts_instrument_sync_request"; INSERT INTO t1 VALUES('test'); -set debug_dbug="-d,fts_instrument_sync_debug"; +set debug_dbug="-d,fts_instrument_sync_request"; INSERT INTO t1 VALUES('This is a fts issue'); # restart -set debug_dbug="+d,fts_instrument_sync_debug"; +set debug_dbug="+d,fts_instrument_sync_request"; UPDATE t1 SET f1="mariadb"; -set debug_dbug="-d,fts_instrument_sync_debug"; +set debug_dbug="-d,fts_instrument_sync_request"; DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/t/misc_debug2.test b/mysql-test/suite/innodb_fts/t/misc_debug2.test index 1ba77f2481e..eb2f80ed24a 100644 --- a/mysql-test/suite/innodb_fts/t/misc_debug2.test +++ b/mysql-test/suite/innodb_fts/t/misc_debug2.test @@ -16,12 +16,12 @@ DROP TABLE mdev21563; --echo # CREATE TABLE t1(f1 CHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB; INSERT INTO t1 VALUES('mysql'), ('innodb'); -set debug_dbug="+d,fts_instrument_sync_debug"; +set debug_dbug="+d,fts_instrument_sync_request"; INSERT INTO t1 VALUES('test'); -set debug_dbug="-d,fts_instrument_sync_debug"; +set debug_dbug="-d,fts_instrument_sync_request"; INSERT INTO t1 VALUES('This is a fts issue'); --source include/restart_mysqld.inc -set debug_dbug="+d,fts_instrument_sync_debug"; +set debug_dbug="+d,fts_instrument_sync_request"; UPDATE t1 SET f1="mariadb"; -set debug_dbug="-d,fts_instrument_sync_debug"; +set debug_dbug="-d,fts_instrument_sync_request"; DROP TABLE t1; |