summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_crash.result22
-rw-r--r--mysql-test/suite/innodb/r/lock_delete_updated.result4
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_crash.test26
-rw-r--r--mysql-test/suite/innodb/t/lock_delete_updated.test12
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug2.result8
-rw-r--r--mysql-test/suite/innodb_fts/t/misc_debug2.test8
6 files changed, 62 insertions, 18 deletions
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;