bool close_thread_table(THD*, TABLE**): Assertion `table->key_read == 0' failed in EXPLAIN in maria-5.3-mwl89
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Undecided
|
Timour Katchaounov |
Bug Description
Even after the fix for 609045, the following EXPLAIN query asserts as follows:
mysqld: sql_base.cc:1386: bool close_thread_
#8 0x00133d98 in __assert_fail () from /lib/libc.so.6
#9 0x082e0ebf in close_thread_table (thd=0xb35e0e8, table_ptr=
#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_
#15 0x00bea919 in start_thread () from /lib/libpthread
#16 0x001edcbe in clone () from /lib/libc.so.6
Related branches
summary: |
bool close_thread_table(THD*, TABLE**): Assertion `table->key_read == 0' - failed in EXPLAIN in maria-5.3-mwl128 + failed in EXPLAIN in maria-5.3-mwl89 |
Changed in maria: | |
status: | New → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
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 _t1.f4 AS CHILD_SUBQUERY1 _field1 _t3.f4 _field1 )
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
FROM t3 AS CHILD_SUBQUERY1_t1 JOIN t3 AS CHILD_SUBQUERY1_t3 ON CHILD_SUBQUERY1
GROUP BY child_subquery1
ON SUBQUERY2_t3.f2 )
;