Crash in create_ref_for_key with semijoin_with_cache=on
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Igor Babaev |
Bug Description
#3 <signal handler called>
#4 0x0000000000781d52 in create_ref_for_key (join=0x1ce2450, j=0x1d3be40,
org_
at sql_select.cc:7363
#5 0x00000000007811d2 in get_best_
at sql_select.cc:7124
#6 0x0000000000778986 in make_join_
tables_
at sql_select.cc:3554
#7 0x000000000076ff50 in JOIN::optimize (this=0x1ce2450) at sql_select.cc:1116
#8 0x0000000000776859 in mysql_select (thd=0x1c25818,
rref_
conds=
proc_param=0x0, select_
unit=0x1c27cb8, select_
#9 0x000000000076d4c9 in handle_select (thd=0x1c25818, lex=0x1c27c18,
result=
#10 0x00000000006fc648 in execute_
all_
#11 0x00000000006f371e in mysql_execute_
at sql_parse.cc:2250
#12 0x00000000006ff028 in mysql_parse (thd=0x1c25818,
rawbuf=
found_
#13 0x00000000006f0f36 in dispatch_command (command=COM_QUERY, thd=0x1c25818,
packet=
at sql_parse.cc:1221
#14 0x00000000006f026a in do_command (thd=0x1c25818) at sql_parse.cc:916
#15 0x00000000006ed1c0 in handle_
at sql_connect.cc:1191
#16 0x00007fc5a286da4f in start_thread () from /lib64/
#17 0x00007fc5a1c5782d in clone () from /lib64/libc.so.6
Minimal switch: semijoin_
Full switch: index_merge=
EXPLAIN also crashes.
Reproducible with join_cache_level >= 3
revno: 3324
revision-id: <email address hidden>
branch nick: maria-5.3-bug898073
timestamp: Wed 2011-11-30 10:22:53 -0800
Also reproducible on 3315.
Test case:
SET optimizer_
SET join_cache_level=3;
CREATE TABLE t1 ( a INTEGER, UNIQUE INDEX(a), b INTEGER, c INTEGER );
INSERT INTO t1 VALUES (1,8,6), (2,2,8);
SELECT alias1.*
FROM t1 alias1, t1 alias2
WHERE
( alias1.b, alias2.b ) IN
( SELECT alias3.b, alias4.b FROM t1 alias3, t1 alias4
WHERE alias4.c = alias3.b )
AND alias1.a = 10;
Changed in maria: | |
importance: | Undecided → Critical |
status: | New → Confirmed |
assignee: | nobody → Igor Babaev (igorb-seattle) |
Changed in maria: | |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
I checked previous crashes in create_ref_for_key that I found, but they seem to have been fixed, and test cases do not produce the problem.