summaryrefslogtreecommitdiff
path: root/mysql-test/r/handler_myisam.result
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@sun.com>2010-02-05 15:52:17 +0100
committerJon Olav Hauglid <jon.hauglid@sun.com>2010-02-05 15:52:17 +0100
commit82f4494125728f6d4f10c80338d37f0e561a5cf8 (patch)
tree1305dc194ec8b02a56b3a927e76878558587d8bb /mysql-test/r/handler_myisam.result
parenta9e22b589677df9035c73e61b80be0fc54d175a5 (diff)
downloadmariadb-git-82f4494125728f6d4f10c80338d37f0e561a5cf8.tar.gz
Bug #50907 Assertion `hash_tables->table->next == __null' on
HANDLER OPEN The problem was a too restrictive assert in the code for HANDLER ... OPEN and HANDLER ... READ that checked table->next to verify that we didn't open views or merge tables. This pointer is also used to link temporary tables together (see thd->temporary_tables). In this case TABLE::next can be set even if we're trying to open a single table. This patch adjust the two asserts to also check for the presence of temporary tables. Test case added to handler_myisam.test.
Diffstat (limited to 'mysql-test/r/handler_myisam.result')
-rw-r--r--mysql-test/r/handler_myisam.result12
1 files changed, 12 insertions, 0 deletions
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;