Bug #50907 | Assertion `hash_tables->table->next == __null' on HANDLER OPEN | ||
---|---|---|---|
Submitted: | 4 Feb 2010 10:35 | Modified: | 7 Mar 2010 1:02 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S2 (Serious) |
Version: | mysql-next-4284 | OS: | Any |
Assigned to: | Jon Olav Hauglid | CPU Architecture: | Any |
[4 Feb 2010 10:35]
Philip Stoev
[4 Feb 2010 10:41]
Philip Stoev
Core and binary: http://mysql-systemqa.s3.amazonaws.com/var-bug50907.zip Source: revision-id: dlenev@mysql.com-20100204062532-ptky4sdbl040e583 date: 2010-02-04 09:25:32 +0300 build-date: 2010-02-04 12:35:43 +0200 revno: 3072 branch-nick: mysql-next-4284
[4 Feb 2010 11:07]
Philip Stoev
not reproducible on mysql-next-mr
[4 Feb 2010 11:34]
Philip Stoev
Non-concurrent simplified test case: --disable_abort_on_error CREATE TABLE `table0_int_autoinc` ( f1 integer ); CREATE TABLE `table1_int_autoinc` ( f1 integer ); CREATE TEMPORARY TABLE IF NOT EXISTS t1_temp1_N LIKE test.table1_int_autoinc; CREATE TEMPORARY TABLE IF NOT EXISTS testdb_S . t1_temp1_N LIKE test.table0_int_autoinc; HANDLER testdb_S . t1_temp1_N OPEN; Note that Mysqld seems to allow you to create a temporary table in a database that does not exist. next-mr is not affected.
[4 Feb 2010 16:39]
Jon Olav Hauglid
Even simpler test case: CREATE TEMPORARY TABLE t1 (id int); CREATE TEMPORARY TABLE t2 (id int); HANDLER t2 OPEN; Not present in next-mr simply because the assert is not there. The reason the assert is triggered is that temporary tables for one connection are linked together using table->next So if you have two temporary tables and then try to open a HANDLER on the last one (which has ->next set to point to the first), the assert is triggered.
[5 Feb 2010 12:36]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/99408 3076 Jon Olav Hauglid 2010-02-05 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.
[5 Feb 2010 14:52]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/99433 3076 Jon Olav Hauglid 2010-02-05 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.
[5 Feb 2010 15:40]
Jon Olav Hauglid
Pushed to mysql-next-4284. Setting the bug to closed since the assert was only present in next-4284 and this is an internal tree. No documentation changes needed. Note that the above commit message by mistake refers to handler_myisam.test. It should be include/handler.inc.
[16 Feb 2010 16:47]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100216101445-2ofzkh48aq2e0e8o) (version source revid:kostja@sun.com-20100210211106-nq8ztcq2z9o4csit) (merge vers: 6.0.14-alpha) (pib:16)
[16 Feb 2010 16:56]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100216101208-33qkfwdr0tep3pf2) (version source revid:kostja@sun.com-20100205174100-d6kq4y5ujt6jcopc) (pib:16)
[6 Mar 2010 11:02]
Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20100216221947-luyhph0txl2c5tc8) (merge vers: 5.5.99-m3) (pib:16)
[7 Mar 2010 1:02]
Paul DuBois
No changelog entry needed.