Details
-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Description
Even after the fix for 609045, the following EXPLAIN query asserts as follows:
mysqld: sql_base.cc:1386: bool close_thread_table(THD*, TABLE**): Assertion `table->key_read == 0' failed.
#8 0x00133d98 in __assert_fail () from /lib/libc.so.6
#9 0x082e0ebf in close_thread_table (thd=0xb35e0e8, table_ptr=0xb35e134) at sql_base.cc:1386
#10 0x082e09d2 in close_open_tables (thd=0xb35e0e8) at sql_base.cc:1203
#11 0x082e0d6b in close_thread_tables (thd=0xb35e0e8) at sql_base.cc:1361
#12 0x0829308e in dispatch_command (command=COM_QUERY, thd=0xb35e0e8, packet=0xb376789 "", packet_length=405) at sql_parse.cc:1644
#13 0x08291376 in do_command (thd=0xb35e0e8) at sql_parse.cc:902
#14 0x0828e454 in handle_one_connection (arg=0xb35e0e8) at sql_connect.cc:1154
#15 0x00bea919 in start_thread () from /lib/libpthread.so.0
#16 0x001edcbe in clone () from /lib/libc.so.6
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: bool close_thread_table(THD*, TABLE**): Assertion `table->key_read == 0' failed in maria-5.3-mwl128
Test case:
CREATE TABLE t1 (f1 int,f3 int,f4 int) ;
INSERT IGNORE INTO t1 VALUES (NULL,1,0);
CREATE TABLE t2 (f2 int,f4 int,f5 int) ;
INSERT IGNORE INTO t2 VALUES (8,0,0),(5,0,0);
CREATE TABLE t3 (f4 int,KEY (f4)) ;
INSERT IGNORE INTO t3 VALUES (0),(0);
EXPLAIN
SELECT f3 FROM t1 WHERE
(
SELECT SUBQUERY2_t1.f1
FROM t1 AS SUBQUERY2_t1
RIGHT JOIN t1 AS SUBQUERY2_t2 JOIN t2 AS SUBQUERY2_t3 ON /* SUBQUERY2_t3.f5 = SUBQUERY2_t2.f4 AND */ SUBQUERY2_t3.f4 <= ALL
(
SELECT CHILD_SUBQUERY1_t1.f4 AS CHILD_SUBQUERY1_field1
FROM t3 AS CHILD_SUBQUERY1_t1 JOIN t3 AS CHILD_SUBQUERY1_t3 ON CHILD_SUBQUERY1_t3.f4
GROUP BY child_subquery1_field1 )
ON SUBQUERY2_t3.f2 )
;