Server crashes in Item_ref::real_item on INSERT .. SELECT with FROM subquery and derived_merge=ON
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Oleksandr "Sanja" Byelkin |
Bug Description
#4 <signal handler called>
#5 0x08214ee2 in Item_ref::real_item (this=0x9486a20) at item.h:2659
#6 0x0837eae0 in count_field_types (select_
reset_
#7 0x083525ae in JOIN::prepare_
#8 0x0835249b in JOIN::prepare (this=0x9486678, rref_pointer_
tables_
group_init=0x0, having_init=0x0, proc_param_
unit_
#9 0x0835920d in mysql_select (thd=0x93ec740, rref_pointer_
tables=
having=0x0, proc_param=0x0, select_
unit=0x93edec0, select_
#10 0x08350f2f in handle_select (thd=0x93ec740, lex=0x93ede64, result=0x9486600,
setup_
#11 0x082e6057 in mysql_execute_
#12 0x082ee4d8 in mysql_parse (thd=0x93ec740,
rawbuf=
length=59, found_semicolon
#13 0x082e0eb9 in dispatch_command (command=COM_QUERY, thd=0x93ec740,
packet=
packet_
#14 0x082e0363 in do_command (thd=0x93ec740) at sql_parse.cc:923
#15 0x082dd259 in handle_
bzr version-info
revision-id: <email address hidden>
date: 2012-04-07 17:27:00 -0700
build-date: 2012-04-11 15:49:16 +0400
revno: 3500
Notes:
maria/5.5-release revno 3367 and the latest build on 5.5-release from buildbot also crash, but maria-5.5 revno 3364 does not. 5.5-release looks newer, though.
No crash on MySQL trunk revno 3827 or MySQL 5.5 revno 3737.
Could not replace the FROM subquery with a view, no crash.
SELECT without INSERT does not cause the crash.
Minimal optimizer_switch: derived_merge=on
Full optimizer_switch (default): index_merge=
EXPLAIN for the SELECT with the minimal switch:
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`
INSERT INTO t1 SELECT * FROM
( SELECT * FROM t1 ) AS alias;
Test case:
SET optimizer_switch = 'derived_merge=on';
CREATE TABLE t1 ( a INT, b INT );
INSERT INTO t1 VALUES (2,1),(3,2);
INSERT INTO t1 SELECT * FROM
( SELECT * FROM t1 ) AS alias;
# End of test case
Changed in maria: | |
assignee: | Igor Babaev (igorb-seattle) → Oleksandr "Sanja" Byelkin (sanja-byelkin) |
Changed in maria: | |
status: | New → In Progress |
Changed in maria: | |
status: | In Progress → Fix Released |
I've checked that this bug was introduced by the patch for bug #968720.
The bug is not reproducible on rev, 3493, but is reproducible on rev. 3494.