summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/stress/r
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/stress/r
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/stress/r')
-rw-r--r--mysql-test/suite/stress/r/ddl_archive.result82
-rw-r--r--mysql-test/suite/stress/r/ddl_csv.result58
-rw-r--r--mysql-test/suite/stress/r/ddl_innodb.result254
-rw-r--r--mysql-test/suite/stress/r/ddl_memory.result254
-rw-r--r--mysql-test/suite/stress/r/ddl_myisam.result254
-rw-r--r--mysql-test/suite/stress/r/deadlock_drop_table.result33
-rw-r--r--mysql-test/suite/stress/r/misc.result9
7 files changed, 944 insertions, 0 deletions
diff --git a/mysql-test/suite/stress/r/ddl_archive.result b/mysql-test/suite/stress/r/ddl_archive.result
new file mode 100644
index 00000000..f11610b6
--- /dev/null
+++ b/mysql-test/suite/stress/r/ddl_archive.result
@@ -0,0 +1,82 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
+SET @runtime = <intended_runtime>;
+PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
+connect con2,localhost,root,,;
+connection default;
+DROP TABLE IF EXISTS t1;
+# Subtest 2A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 3A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE
+# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE
+# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 5A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
+# default: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# default: DROP TABLE t1
+# Subtest 5B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
+# default: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# default: DROP TABLE t1
+# Subtest 5C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
+# con2: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# con2: DROP TABLE t1
+# Subtest 5D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
+# con2: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# con2: DROP TABLE t1
+disconnect con2;
+DEALLOCATE PREPARE stmt_start;
+DEALLOCATE PREPARE stmt_break;
diff --git a/mysql-test/suite/stress/r/ddl_csv.result b/mysql-test/suite/stress/r/ddl_csv.result
new file mode 100644
index 00000000..ed6fafe3
--- /dev/null
+++ b/mysql-test/suite/stress/r/ddl_csv.result
@@ -0,0 +1,58 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
+SET @runtime = <intended_runtime>;
+PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
+connect con2,localhost,root,,;
+connection default;
+DROP TABLE IF EXISTS t1;
+# Subtest 2A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 3A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV
+# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV
+# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+disconnect con2;
+DEALLOCATE PREPARE stmt_start;
+DEALLOCATE PREPARE stmt_break;
diff --git a/mysql-test/suite/stress/r/ddl_innodb.result b/mysql-test/suite/stress/r/ddl_innodb.result
new file mode 100644
index 00000000..479f11eb
--- /dev/null
+++ b/mysql-test/suite/stress/r/ddl_innodb.result
@@ -0,0 +1,254 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
+SET @runtime = <intended_runtime>;
+PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
+connect con2,localhost,root,,;
+connection default;
+DROP TABLE IF EXISTS t1;
+# Subtest 1A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = InnoDB
+# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# default: DROP TABLE t1
+# Subtest 1B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = InnoDB
+# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# default: DROP TABLE t1
+# Subtest 1C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = InnoDB
+# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# con2: DROP TABLE t1
+# Subtest 1D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = InnoDB
+# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# con2: DROP TABLE t1
+# Subtest 2A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 3A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB
+# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB
+# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB;
+DROP TABLE t1;
+# Subtest 4A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 4B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 4C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 4D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 5A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB
+# default: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# default: DROP TABLE t1
+# Subtest 5B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB
+# default: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# default: DROP TABLE t1
+# Subtest 5C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB
+# con2: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# con2: DROP TABLE t1
+# Subtest 5D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB
+# con2: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# con2: DROP TABLE t1
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=InnoDB;
+# Subtest 6A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: DROP INDEX IDX1 ON t1
+# Subtest 6B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: DROP INDEX IDX1 ON t1
+# Subtest 6C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: DROP INDEX IDX1 ON t1
+# Subtest 6D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: DROP INDEX IDX1 ON t1
+DROP TABLE t1;
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(0,1);
+# Subtest 7A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# default: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# default: DELETE FROM t1 WHERE f1 = 1
+# Subtest 7B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# default: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# default: DELETE FROM t1 WHERE f1 = 1
+# Subtest 7C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# con2: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# con2: DELETE FROM t1 WHERE f1 = 1
+# Subtest 7D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# con2: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# con2: DELETE FROM t1 WHERE f1 = 1
+DROP TABLE t1;
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1,1);
+CREATE INDEX IDX ON t1 (f2);
+DROP INDEX IDX ON t1;
+CREATE UNIQUE INDEX IDX ON t1 (f2);
+DROP INDEX IDX ON t1;
+# Subtest 8A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# Subtest 8B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# Subtest 8C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# Subtest 8D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+DROP TABLE t1;
+disconnect con2;
+DEALLOCATE PREPARE stmt_start;
+DEALLOCATE PREPARE stmt_break;
diff --git a/mysql-test/suite/stress/r/ddl_memory.result b/mysql-test/suite/stress/r/ddl_memory.result
new file mode 100644
index 00000000..8f206369
--- /dev/null
+++ b/mysql-test/suite/stress/r/ddl_memory.result
@@ -0,0 +1,254 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
+SET @runtime = <intended_runtime>;
+PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
+connect con2,localhost,root,,;
+connection default;
+DROP TABLE IF EXISTS t1;
+# Subtest 1A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = MEMORY
+# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# default: DROP TABLE t1
+# Subtest 1B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = MEMORY
+# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# default: DROP TABLE t1
+# Subtest 1C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = MEMORY
+# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# con2: DROP TABLE t1
+# Subtest 1D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = MEMORY
+# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# con2: DROP TABLE t1
+# Subtest 2A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 3A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY
+# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY
+# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY;
+DROP TABLE t1;
+# Subtest 4A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 4B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 4C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 4D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 5A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY
+# default: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# default: DROP TABLE t1
+# Subtest 5B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY
+# default: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# default: DROP TABLE t1
+# Subtest 5C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY
+# con2: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# con2: DROP TABLE t1
+# Subtest 5D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY
+# con2: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# con2: DROP TABLE t1
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MEMORY;
+# Subtest 6A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: DROP INDEX IDX1 ON t1
+# Subtest 6B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: DROP INDEX IDX1 ON t1
+# Subtest 6C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: DROP INDEX IDX1 ON t1
+# Subtest 6D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: DROP INDEX IDX1 ON t1
+DROP TABLE t1;
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=MEMORY;
+INSERT INTO t1 VALUES(0,1);
+# Subtest 7A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# default: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# default: DELETE FROM t1 WHERE f1 = 1
+# Subtest 7B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# default: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# default: DELETE FROM t1 WHERE f1 = 1
+# Subtest 7C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# con2: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# con2: DELETE FROM t1 WHERE f1 = 1
+# Subtest 7D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# con2: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# con2: DELETE FROM t1 WHERE f1 = 1
+DROP TABLE t1;
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MEMORY;
+INSERT INTO t1 VALUES(1,1);
+CREATE INDEX IDX ON t1 (f2);
+DROP INDEX IDX ON t1;
+CREATE UNIQUE INDEX IDX ON t1 (f2);
+DROP INDEX IDX ON t1;
+# Subtest 8A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# Subtest 8B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# Subtest 8C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# Subtest 8D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+DROP TABLE t1;
+disconnect con2;
+DEALLOCATE PREPARE stmt_start;
+DEALLOCATE PREPARE stmt_break;
diff --git a/mysql-test/suite/stress/r/ddl_myisam.result b/mysql-test/suite/stress/r/ddl_myisam.result
new file mode 100644
index 00000000..c441d0dd
--- /dev/null
+++ b/mysql-test/suite/stress/r/ddl_myisam.result
@@ -0,0 +1,254 @@
+SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
+PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
+SET @runtime = <intended_runtime>;
+PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
+connect con2,localhost,root,,;
+connection default;
+DROP TABLE IF EXISTS t1;
+# Subtest 1A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = MyISAM
+# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# default: DROP TABLE t1
+# Subtest 1B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = MyISAM
+# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# default: DROP TABLE t1
+# Subtest 1C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = MyISAM
+# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# con2: DROP TABLE t1
+# Subtest 1D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
+ENGINE = MyISAM
+# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
+# con2: DROP TABLE t1
+# Subtest 2A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 2D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
+# default: DROP TABLE t1
+# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
+# Subtest 3A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM
+# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+# Subtest 3D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM
+# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR)
+# default: DROP TABLE t1
+# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM;
+DROP TABLE t1;
+CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM;
+DROP TABLE t1;
+# Subtest 4A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 4B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
+# default: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 4C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 4D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
+# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
+# con2: SHOW CREATE TABLE t1
+# default: DROP TABLE t1
+# Subtest 5A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM
+# default: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# default: DROP TABLE t1
+# Subtest 5B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM
+# default: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# default: DROP TABLE t1
+# Subtest 5C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM
+# con2: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# con2: DROP TABLE t1
+# Subtest 5D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM
+# con2: INSERT INTO t1 SET f2 = 9
+# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
+# con2: DROP TABLE t1
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MyISAM;
+# Subtest 6A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: DROP INDEX IDX1 ON t1
+# Subtest 6B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# default: DROP INDEX IDX1 ON t1
+# Subtest 6C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: DROP INDEX IDX1 ON t1
+# Subtest 6D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
+# default: DROP INDEX IDX1 ON t1
+# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
+# default: CREATE INDEX IDX1 ON t1 (f2)
+# con2: DROP INDEX IDX1 ON t1
+DROP TABLE t1;
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES(0,1);
+# Subtest 7A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# default: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# default: DELETE FROM t1 WHERE f1 = 1
+# Subtest 7B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# default: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# default: DELETE FROM t1 WHERE f1 = 1
+# Subtest 7C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# con2: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# con2: DELETE FROM t1 WHERE f1 = 1
+# Subtest 7D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
+# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
+# con2: DROP INDEX IDX1 ON t1
+# default: INSERT INTO t1 VALUES(1,1)
+# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
+# con2: DELETE FROM t1 WHERE f1 = 1
+DROP TABLE t1;
+CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES(1,1);
+CREATE INDEX IDX ON t1 (f2);
+DROP INDEX IDX ON t1;
+CREATE UNIQUE INDEX IDX ON t1 (f2);
+DROP INDEX IDX ON t1;
+# Subtest 8A (one connection, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# Subtest 8B (one connection, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# default: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# Subtest 8C (two connections, no PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# Subtest 8D (two connections, use PREPARE/EXECUTE)
+# connection action
+# default: CREATE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
+# con2: SHOW CREATE TABLE t1
+# default: DROP INDEX IDX ON t1
+DROP TABLE t1;
+disconnect con2;
+DEALLOCATE PREPARE stmt_start;
+DEALLOCATE PREPARE stmt_break;
diff --git a/mysql-test/suite/stress/r/deadlock_drop_table.result b/mysql-test/suite/stress/r/deadlock_drop_table.result
new file mode 100644
index 00000000..7e549157
--- /dev/null
+++ b/mysql-test/suite/stress/r/deadlock_drop_table.result
@@ -0,0 +1,33 @@
+create or replace table t1 (a int primary key, b int, c int, key(b),key(c)) engine=myisam;
+insert into t1 (a) values(1);
+set debug_sync='RESET';
+connect con1, localhost, root,,;
+connect con2, localhost, root,,;
+connection default;
+backup stage start;
+backup stage flush;
+select * from t1;
+a b c
+1 NULL NULL
+set debug_sync='after_purge_tables SIGNAL parked WAIT_FOR go';
+set debug_sync='before_tc_release_table SIGNAL parked2 WAIT_FOR go2';
+backup stage BLOCK_DDL;
+connection con1;
+set debug_sync='now WAIT_FOR parked';
+select * from t1;
+a b c
+1 NULL NULL
+set debug_sync='now SIGNAL go';
+set debug_sync='now WAIT_FOR parked2';
+set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go3';
+drop table t1;;
+connection con2;
+set debug_sync='now WAIT_FOR waiting';
+set debug_sync='now SIGNAL go2';
+set debug_sync='now SIGNAL go3';
+connection default;
+connection con1;
+connection default;
+disconnect con1;
+disconnect con2;
+set debug_sync='RESET';
diff --git a/mysql-test/suite/stress/r/misc.result b/mysql-test/suite/stress/r/misc.result
new file mode 100644
index 00000000..6d0a3ea5
--- /dev/null
+++ b/mysql-test/suite/stress/r/misc.result
@@ -0,0 +1,9 @@
+#
+# MDEV-22339 - Assertion `str_length < len' failed in
+# Binary_string::realloc_raw
+#
+CREATE TABLE t1(a INT) ENGINE=MyISAM;
+connect con1, localhost, root;
+disconnect con1;
+connection default;
+DROP TABLE t1;