summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/temp_table.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/temp_table.test')
-rw-r--r--mysql-test/main/temp_table.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/main/temp_table.test b/mysql-test/main/temp_table.test
index 6ed5dbd8..11a66743 100644
--- a/mysql-test/main/temp_table.test
+++ b/mysql-test/main/temp_table.test
@@ -657,6 +657,22 @@ DROP TEMPORARY TABLE t1;
--echo # End of 10.2 tests
--echo #
+--echo #
+--echo # MDEV-31523: Using two temporary tables in OPTIMIZE TABLE lead to crash
+--echo #
+
+CREATE TEMPORARY TABLE t1 (c INT) ENGINE=MyISAM;
+CREATE TEMPORARY TABLE t2 (c INT) ENGINE=MyISAM;
+optimize TABLE t1,t2;
+SHOW TABLES;
+--echo # in 11.2 and above here should be listed above used temporary tables
+
+DROP TEMPORARY TABLE t1, t2;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
+
#
# DROP TEMPORARY TABLE fails in the middle
#