1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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:
Jon Olav Hauglid
2010-02-05 15:52:17 +01:00
parent a9e22b5896
commit 82f4494125
4 changed files with 56 additions and 3 deletions

View File

@ -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;