mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user