Assertion `!join_tab->cache->next_cache' failed in sql_select.cc:8645: void set_join_cache_denial(JOIN_TAB*)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Igor Babaev |
Bug Description
mysqld: sql_select.cc:8645: void set_join_
#6 0x00007fca28fa0235 in __assert_fail () from /lib64/libc.so.6
#7 0x00000000007853c4 in set_join_
at sql_select.cc:8645
#8 0x0000000000785690 in revise_cache_usage (join_tab=
at sql_select.cc:8771
#9 0x00000000007862fd in check_join_
no_
#10 0x000000000078646a in check_join_
options=0, no_jbuf_after=4) at sql_select.cc:9252
#11 0x00000000007867bd in make_join_readinfo (join=0x30a68f0, options=0,
no_
#12 0x00000000007717be in JOIN::optimize (this=0x30a68f0) at sql_select.cc:1500
#13 0x0000000000776859 in mysql_select (thd=0x7fca100c
rref_
fields=..., conds=0x30576d0, og_num=0, order=0x0, group=0x0, having=0x0,
proc_param=0x0, select_
0x7fca100cae78, select_
#14 0x000000000076d4c9 in handle_select (thd=0x7fca100c
lex=
at sql_select.cc:283
#15 0x00000000006fc648 in execute_
all_
#16 0x00000000006f371e in mysql_execute_
at sql_parse.cc:2250
#17 0x00000000006ff028 in mysql_parse (thd=0x7fca100c
rawbuf=
#18 0x00000000006f0f36 in dispatch_command (command=COM_QUERY,
thd=
packet=
#19 0x00000000006f026a in do_command (thd=0x7fca100c
#20 0x00000000006ed1c0 in handle_
at sql_connect.cc:1191
#21 0x00007fca29c5ba4f in start_thread () from /lib64/
#22 0x00007fca2904582d in clone () from /lib64/libc.so.6
bzr revno: 3324
revision-id: <email address hidden>
Reproducible on 3315 as well.
Changed in maria: | |
milestone: | none → 5.3 |
assignee: | Sergey Petrunia (sergefp) → Igor Babaev (igorb-seattle) |
importance: | Undecided → Critical |
Changed in maria: | |
status: | New → Confirmed |
Changed in maria: | |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
Full switch: index_merge= on,index_ merge_union= on,index_ merge_sort_ union=on, index_merge_ intersection= on,index_ merge_sort_ intersection= off,index_ condition_ pushdown= on,derived_ merge=on, derived_ with_keys= on,firstmatch= on,loosescan= on,materializat ion=on, in_to_exists= on,semijoin= on,partial_ match_rowid_ merge=on, partial_ match_table_ scan=on, subquery_ cache=on, mrr=off, mrr_cost_ based=off, mrr_sort_ keys=off, outer_join_ with_cache= off,semijoin_ with_cache= on,join_ cache_increment al=on,join_ cache_hashed= on,join_ cache_bka= on,optimize_ join_buffer_ size=off, table_eliminati on=on
Minimal switch: semijoin_ with_cache= on
(included into the test case)
Reproducible with join_cache_level = 2, 3, 6, 7, 8
InnoDB as the 2nd table's engine seems essential
Also fails on EXPLAIN.
test case:
--source include/ have_innodb. inc
SET optimizer_switch = 'semijoin_ with_cache= on';
SET join_cache_level = 2; # same assertion for 3,6,7,8
CREATE TABLE t1 ( pk INTEGER PRIMARY KEY, a INTEGER );
INSERT INTO t1 VALUES (1, 6),(2, 8);
CREATE TABLE t2 ( b INTEGER ) ENGINE=InnoDB;
INSERT INTO t2 VALUES (3);
SELECT * FROM t1, t2 WHERE b IN ( SELECT a FROM t1, t2 WHERE b = pk );