Second assertion `cache != __null' failed in sub_select_cache() on 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 bug #675981 ,the test case below still crashes with the following backtrace:
#8 0x00a72d98 in __assert_fail () from /lib/libc.so.6
#9 0x08321715 in sub_select_cache (join=0xae673878, join_tab=
#10 0x0832195f in sub_select (join=0xae673878, join_tab=
#11 0x08320f0e in do_select (join=0xae673878, fields=0xae632554, table=0x0, procedure=0x0) at sql_select.cc:12686
#12 0x083071f5 in JOIN::exec (this=0xae673878) at sql_select.cc:2340
#13 0x08237f1e in subselect_
#14 0x0823243b in Item_subselect:
#15 0x0823263a in Item_in_
#16 0x08233f90 in Item_in_
#17 0x081d1670 in Item::val_
#18 0x081fd14a in Item_in_
#19 0x081d1612 in Item::val_
#20 0x081cd450 in Item_cache_
#21 0x081d52bc in Item_cache_
#22 0x081cb04b in Item_cache_
#23 0x08204fa4 in Item_cond_
#24 0x082dd9de in SQL_SELECT:
#25 0x083c8dd4 in find_all_keys (param=0xae9dff18, select=0xae66aa98, sort_keys=
at filesort.cc:619
#26 0x083c7984 in filesort (thd=0x98910e8, table=0xae63eb20, sortorder=
sort_
#27 0x08328d4e in create_sort_index (thd=0x98910e8, join=0xae66e9f8, order=0xae6692f8, filesort_
select_
#28 0x08303c37 in JOIN::init_
#29 0x08304a8a in JOIN::exec (this=0xae66e9f8) at sql_select.cc:1750
#30 0x08307961 in mysql_select (thd=0x98910e8, rref_pointer_
order=
at sql_select.cc:2550
#31 0x08330ed0 in mysql_explain_union (thd=0x98910e8, unit=0x98927c4, result=0xae669480) at sql_select.cc:18914
#32 0x0829d78a in execute_
#33 0x08294423 in mysql_execute_
#34 0x0829feac in mysql_parse (thd=0x98910e8,
rawbuf=
#35 0x08291f0c in dispatch_command (command=COM_QUERY, thd=0x98910e8, packet=0x98a9789 "", packet_length=291) at sql_parse.cc:1209
#36 0x08291376 in do_command (thd=0x98910e8) at sql_parse.cc:902
#37 0x0828e454 in handle_
#38 0x00bea919 in start_thread () from /lib/libpthread
#39 0x00b2ccbe in clone () from /lib/libc.so.6
Related branches
Changed in maria: | |
status: | New → In Progress |
Changed in maria: | |
status: | In Progress → Fix Released |
Test case:
CREATE TABLE t1 (f1 int,f2 int,f4 int,f6 int,KEY (f4)) ; ,'1','0' ),('2', '1','1' ,'0'),( '2','2' ,'2','0' ),('0', NULL,'0' ,'0'),( '2','1' ,'2','0' ),('2', '0','0' ,'0'),( '2','2' ,'2','0' ),('2', '8','2' ,'0'),( '2','7' ,'2','0' ),('2', '5','2' ,'0'),( '2',NULL, '1','0' );
INSERT IGNORE INTO t1 VALUES ('1','5'
CREATE TABLE t3 (f3 int) ;
INSERT IGNORE INTO t3 VALUES ('2');
CREATE TABLE t2 (f3 int) ;
INSERT IGNORE INTO t2 VALUES ('7');
EXPLAIN
SELECT table2.f4 AS field1
FROM t2 AS table1 JOIN t1 AS table2 ON table2.f6
WHERE
( table2.f2 ) IN (
SELECT SUBQUERY2_t1.f3
FROM t3 AS SUBQUERY2_t1 JOIN (
t1 AS SUBQUERY2_t2
JOIN t1 AS SUBQUERY2_t3 ON SUBQUERY2_t3.f1
)
ON SUBQUERY2_t3.f2 )
GROUP BY field1
ORDER BY table2.f1
LIMIT 10;