Crash in copy_fields with aggregate IN subquery
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Igor Babaev |
Bug Description
Repeatable in maria-5.3 , maria-5.3-mwl89 . Not repeatable in maria-5.2, mysql-5.5
backtrace:
#4 <signal handler called>
#5 0x08333e4c in copy_fields (param=0xae533f60) at sql_select.cc:18231
#6 0x0832ccf2 in end_write (join=0xae52f2b8, join_tab=
#7 0x0832a73b in evaluate_
#8 0x0832a0ce in sub_select (join=0xae52f2b8, join_tab=
#9 0x083294a0 in do_select (join=0xae52f2b8, fields=0x0, table=0xae52d940, procedure=0x0) at sql_select.cc:13541
#10 0x0830e390 in JOIN::exec (this=0xae525980) at sql_select.cc:2091
#11 0x0824057c in subselect_
#12 0x0823ac0f in Item_subselect:
#13 0x0823ae0e in Item_in_
#14 0x0823c7f6 in Item_in_
#15 0x081d9138 in Item::val_
#16 0x082054d2 in Item_in_
#17 0x08329461 in do_select (join=0xae520ad8, fields=0xae525874, table=0x0, procedure=0x0) at sql_select.cc:13538
#18 0x0830fccb in JOIN::exec (this=0xae520ad8) at sql_select.cc:2530
#19 0x083104e8 in mysql_select (thd=0xb25bc08, rref_pointer_
order=0x0, group=0xae514360, having=0x0, proc_param=0x0, select_
at sql_select.cc:2749
#20 0x08308ac7 in handle_select (thd=0xb25bc08, lex=0xb25d2a8, result=0xae514408, setup_tables_
#21 0x082a5e15 in execute_
#22 0x0829cc87 in mysql_execute_
#23 0x082a83b8 in mysql_parse (thd=0xb25bc08,
rawbuf=
#24 0x0829a910 in dispatch_command (command=COM_QUERY, thd=0xb25bc08, packet=0xb2b67d1 "", packet_length=168) at sql_parse.cc:1211
#25 0x08299dbd in do_command (thd=0xb25bc08) at sql_parse.cc:904
#26 0x08296e70 in handle_
#27 0x00116919 in start_thread () from /lib/libpthread
#28 0x0076acce in clone () from /lib/libc.so.6
explain:
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
2 DEPENDENT SUBQUERY SQ3_alias2 system NULL NULL NULL NULL 1 Using temporary; Using filesort
2 DEPENDENT SUBQUERY SQ3_alias1 ALL NULL NULL NULL NULL 2
test case:
CREATE TABLE t1 ( f3 int, f10 int) ;
INSERT IGNORE INTO t1 VALUES (4,0);
CREATE TABLE t2 ( f10 int, f11 int) ;
INSERT IGNORE INTO t2 VALUES (0,0),(0,0);
SELECT f11 FROM t2
WHERE ( '0' ) IN (
SELECT SQ3_alias1.f10 AS SQ3_field1
FROM t2 AS SQ3_alias1 JOIN t1 AS SQ3_alias2 ON SQ3_alias2.f3
GROUP BY SQ3_field1
)
GROUP BY 1;
Changed in maria: | |
milestone: | none → 5.3 |
description: | updated |
Changed in maria: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Igor Babaev (igorb-seattle) |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
see also https:/ /bugs.launchpad .net/maria/ +bug/772335