Crash in best_access_path with materialization+semijoin, aggregate function in IN subquery
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Igor Babaev |
Bug Description
#3 <signal handler called>
#4 0x000000000077fa9c in best_access_path (join=0x1cea1e0, s=0x1d43fd0, remaining_tables=3, idx=0,
disable_
#5 0x000000000078212b in best_extension_
record_count=1, read_time=0, search_depth=62, prune_level=1) at sql_select.cc:6414
#6 0x00000000007816a7 in greedy_search (join=0x1cea1e0, remaining_tables=3, search_depth=62, prune_level=1)
at sql_select.cc:6031
#7 0x0000000000780ef2 in choose_plan (join=0x1cea1e0, join_tables=3) at sql_select.cc:5692
#8 0x000000000077b43a in make_join_
keyuse_
#9 0x0000000000772ba1 in JOIN::optimize (this=0x1cea1e0) at sql_select.cc:1149
#10 0x000000000077947f in mysql_select (thd=0x1c73038, rref_pointer_
wild_num=1, fields=..., conds=0x1cb5370, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0,
select_
#11 0x000000000077015d in handle_select (thd=0x1c73038, lex=0x1c75480, result=0x1cb57b8,
setup_
#12 0x00000000006feab4 in execute_
#13 0x00000000006f5b71 in mysql_execute_
#14 0x000000000070148f in mysql_parse (thd=0x1c73038,
rawbuf=
#15 0x00000000006f3320 in dispatch_command (command=COM_QUERY, thd=0x1c73038,
packet=
#16 0x00000000006f2654 in do_command (thd=0x1c73038) at sql_parse.cc:923
#17 0x00000000006ef532 in handle_
#18 0x00007f5163261a4f in start_thread () from /lib64/
bzr version-info
revision-id: <email address hidden>
date: 2012-02-22 17:38:24 +0400
build-date: 2012-02-22 23:18:22 +0200
revno: 3439
EXPLAIN also crashes.
Minimal optimizer_switch: materialization
Full optimizer_switch (default): index_merge=
Test case:
SET optimizer_
CREATE TABLE t1 ( a INT, b INT );
INSERT INTO t1 VALUES
(7,1),(4,2);
CREATE TABLE t2 ( c INT );
INSERT INTO t2 VALUES (4),(6);
SELECT * FROM t1
WHERE a IN ( SELECT MAX( c ) FROM t2 )
AND b = 107
AND ( a IS NULL OR a = b );
Changed in maria: | |
status: | New → Confirmed |
Changed in maria: | |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Fix released with 5.3.5-ga.