diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/include/handler.inc | 22 | ||||
-rw-r--r-- | mysql-test/r/handler_innodb.result | 12 | ||||
-rw-r--r-- | mysql-test/r/handler_myisam.result | 12 |
3 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/include/handler.inc b/mysql-test/include/handler.inc index 715b2c74bf2..a5ab97996bb 100644 --- a/mysql-test/include/handler.inc +++ b/mysql-test/include/handler.inc @@ -1500,3 +1500,25 @@ connection default; handler no_such_table read no_such_index first; --error ER_UNKNOWN_TABLE handler no_such_table close; + + +--echo # +--echo # Bug#50907 Assertion `hash_tables->table->next == __null' on +--echo # HANDLER OPEN +--echo # + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +CREATE TEMPORARY TABLE t1 (i INT); +CREATE TEMPORARY TABLE t2 (i INT); + +# This used to trigger the assert +HANDLER t2 OPEN; + +# This also used to trigger the assert +HANDLER t2 READ FIRST; + +HANDLER t2 CLOSE; +DROP TABLE t1, t2; diff --git a/mysql-test/r/handler_innodb.result b/mysql-test/r/handler_innodb.result index 4def5c82df8..90b0d0bb8fe 100644 --- a/mysql-test/r/handler_innodb.result +++ b/mysql-test/r/handler_innodb.result @@ -1464,3 +1464,15 @@ handler no_such_table read no_such_index first; ERROR 42S02: Unknown table 'no_such_table' in HANDLER handler no_such_table close; ERROR 42S02: Unknown table 'no_such_table' in HANDLER +# +# Bug#50907 Assertion `hash_tables->table->next == __null' on +# HANDLER OPEN +# +DROP TABLE IF EXISTS t1, t2; +CREATE TEMPORARY TABLE t1 (i INT); +CREATE TEMPORARY TABLE t2 (i INT); +HANDLER t2 OPEN; +HANDLER t2 READ FIRST; +i +HANDLER t2 CLOSE; +DROP TABLE t1, t2; diff --git a/mysql-test/r/handler_myisam.result b/mysql-test/r/handler_myisam.result index 80f728a4dcd..e52d559a197 100644 --- a/mysql-test/r/handler_myisam.result +++ b/mysql-test/r/handler_myisam.result @@ -1462,6 +1462,18 @@ ERROR 42S02: Unknown table 'no_such_table' in HANDLER handler no_such_table close; ERROR 42S02: Unknown table 'no_such_table' in HANDLER # +# Bug#50907 Assertion `hash_tables->table->next == __null' on +# HANDLER OPEN +# +DROP TABLE IF EXISTS t1, t2; +CREATE TEMPORARY TABLE t1 (i INT); +CREATE TEMPORARY TABLE t2 (i INT); +HANDLER t2 OPEN; +HANDLER t2 READ FIRST; +i +HANDLER t2 CLOSE; +DROP TABLE t1, t2; +# # BUG #46456: HANDLER OPEN + TRUNCATE + DROP (temporary) TABLE, crash # CREATE TABLE t1 AS SELECT 1 AS f1; |