Server crashes in create_ref_for_key with join_cache_level>=3, materialization+semijoin+semijoin_with_cache+join_cache_hashed, constant table, aggregate, MyISAM or Aria
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Igor Babaev |
Bug Description
#4 <signal handler called>
#5 0x08363f46 in create_ref_for_key (join=0x94b2d20, j=0x947be78,
org_
at sql_select.cc:7483
#6 0x083632f8 in get_best_
#7 0x0835b6ef in make_join_
conds=
#8 0x08353399 in JOIN::optimize (this=0x94b2d20) at sql_select.cc:1149
#9 0x08359214 in mysql_select (thd=0x93f04c8, rref_pointer_
tables=
group=0x0, having=0x0, proc_param=0x0, select_
result=
#10 0x08350f17 in handle_select (thd=0x93f04c8, lex=0x93f1bec, result=0x94731e8,
setup_
#11 0x082ec071 in execute_
at sql_parse.cc:5151
#12 0x082e344d in mysql_execute_
#13 0x082ee6ac in mysql_parse (thd=0x93f04c8,
rawbuf=
at sql_parse.cc:6152
#14 0x082e108d in dispatch_command (command=COM_QUERY, thd=0x93f04c8,
packet=
#15 0x082e0537 in do_command (thd=0x93f04c8) at sql_parse.cc:923
#16 0x082dd4bd in handle_
#17 0xb764fb25 in start_thread () from /lib/libpthread
bzr version-info
revision-id: <email address hidden>
date: 2012-02-29 23:28:16 -0800
build-date: 2012-03-04 07:28:38 +0400
revno: 3451
Also reproducible on MariaDB 5.5 revno 3309.
EXPLAIN also crashes.
Minimal optimizer_switch: materialization
Full optimizer_switch (default): index_merge=
Test case:
SET optimizer_
SET join_cache_level=3;
# MyISAM or Aria
CREATE TABLE t1 ( a INT ) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (
b INT, c INT, d VARCHAR(1), e VARCHAR(1),
KEY (c), KEY (d, c)
) ENGINE=MyISAM;
INSERT INTO t2
VALUES (4, 2, 'v', 'v'),
(6, 1, 'v', 'v'),(0, 5, 'x', 'x'),
(7, 3, 'i', 'i'),(7, 1, 'e', 'e'),
(1, 4, 'p', 'p'),(1, 2, 'j', 'j');
SELECT c FROM t1, t2
WHERE ( a, c ) IN (
SELECT alias1.b, alias1.c
FROM t2 AS alias1, t2 AS alias2
WHERE alias2.d = alias1.e
AND alias1.e = ( SELECT MAX(e) FROM t2 )
);
# End of test case
Changed in maria: | |
status: | New → Confirmed |
assignee: | nobody → Igor Babaev (igorb-seattle) |
Changed in maria: | |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Fix released in 5.3.6