Crash in JOIN_CACHE_BNLH::get_matching_chain_by_join_key with InnoDB and join-cache-level=3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Sergey Petrunia |
Bug Description
#3 <signal handler called>
#4 0x00000000006bf5a8 in key_copy (to_key=0x2e58b23 "v",
from_
with_
#5 0x0000000000742f06 in JOIN_CACHE_
this=0x2e584b8) at sql_join_
#6 0x0000000000742f9a in JOIN_CACHE_
this=0x2e584b8, skip_last=false) at sql_join_
#7 0x0000000000740eeb in JOIN_CACHE:
skip_
#8 0x000000000074099c in JOIN_CACHE:
skip_
#9 0x0000000000794329 in sub_select_cache (join=0x2e4e5d0,
join_
#10 0x000000000079454b in sub_select (join=0x2e4e5d0, join_tab=0x2e578f8,
end_
#11 0x0000000000794014 in do_select (join=0x2e4e5d0, fields=
table=0x0, procedure=0x0) at sql_select.cc:14820
#12 0x000000000077605c in JOIN::exec (this=0x2e4e5d0) at sql_select.cc:2685
#13 0x00000000007768ef in mysql_select (thd=0x7fe4f805
rref_
fields=..., conds=0x2e3e160, og_num=0, order=0x0, group=0x0, having=0x0,
proc_param=0x0, select_
unit=
#14 0x000000000076d4c9 in handle_select (thd=0x7fe4f805
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=0x7fe4f805
rawbuf=
#18 0x00000000006f0f36 in dispatch_command (command=COM_QUERY,
thd=
at sql_parse.cc:1221
#19 0x00000000006f026a in do_command (thd=0x7fe4f805
#20 0x00000000006ed1c0 in handle_
at sql_connect.cc:1191
#21 0x00007fe514fcaa4f in start_thread () from /lib64/
#22 0x00007fe5143b482d in clone () from /lib64/libc.so.6
5.3 main
revno: 3324
revision-id: <email address hidden>
Also reproducible on 3315.
No specific optimizer_switch required.
Full switch: index_merge=
Reproducible with join-cache-level = 3, 4 (included into the test case).
Does not crash with Aria or MyISAM.
EXPLAIN SELECT * FROM t1 WHERE b IN ( SELECT a FROM t1 GROUP BY a );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 1 Using where
1 PRIMARY <subquery2> hash_ALL distinct_key #hash#distinct_key 5 test.t1.b 1 Using join buffer (flat, BNLH join)
2 SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using temporary
Test case:
--source include/
SET join_cache_level=3; # also crashes with 4
CREATE TABLE t1 ( a VARCHAR(1), b VARCHAR(1) ) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('v','v');
SELECT * FROM t1 WHERE b IN ( SELECT a FROM t1 GROUP BY a );
summary: |
- Crash in JOIN_CACHE_BNLH::get_matching_chain_by_join_key with join- - cache-level=3 + Crash in JOIN_CACHE_BNLH::get_matching_chain_by_join_key with InnoDB and + join-cache-level=3 |
Changed in maria: | |
milestone: | none → 5.3 |
Changed in maria: | |
assignee: | nobody → Igor Babaev (igorb-seattle) |
Changed in maria: | |
importance: | Undecided → Critical |
status: | New → Confirmed |
Changed in maria: | |
assignee: | Igor Babaev (igorb-seattle) → Sergey Petrunia (sergefp) |
Changed in maria: | |
status: | Confirmed → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |