Crash in Item_equal::print in EXPLAIN EXTENDED in maria-5.3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Low
|
Igor Babaev |
Bug Description
Repeatable in maria-5.3 , maria-5.3-ml89 . Not repeatable in maria-5.2 . May be related to the Item_func crashes reported separately. Not repeatable with more rows in each table.
backtrace:
#3 0x08289e2c in handle_segfault (sig=11) at mysqld.cc:2774
#4 <signal handler called>
#5 0x0821011e in Item_equal::print (this=0xae513f58, str=0xae89f788, query_type=
#6 0x08339573 in st_select_
#7 0x081af078 in st_select_
#8 0x08338ed1 in TABLE_LIST::print (this=0xae513ac0, thd=0x9c44da8, eliminated_
#9 0x083387e2 in print_table_array (thd=0x9c44da8, eliminated_
at sql_select.cc:19895
#10 0x08338bf4 in print_join (thd=0x9c44da8, eliminated_
#11 0x083394d1 in st_select_
#12 0x081af078 in st_select_
#13 0x082a5832 in execute_
#14 0x0829c786 in mysql_execute_
#15 0x082a7edf in mysql_parse (thd=0x9c44da8,
rawbuf=
found_
#16 0x0829a40f in dispatch_command (command=COM_QUERY, thd=0x9c44da8, packet=0x9c9f901 "", packet_length=93) at sql_parse.cc:1215
#17 0x0829986d in do_command (thd=0x9c44da8) at sql_parse.cc:904
#18 0x08296920 in handle_
#19 0x00116919 in start_thread () from /lib/libpthread
#20 0x0076acce in clone () from /lib/libc.so.6
test case:
CREATE TABLE t2 ( f3 int) ;
INSERT IGNORE INTO t2 VALUES (8);
CREATE TABLE t1 ( f3 int) ;
EXPLAIN EXTENDED
SELECT * FROM (
SELECT t1.*
FROM t1
JOIN t2
ON t2.f3 = t1.f3
) AS alias1;
explain from maria-5.2:
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 0 0.00 const row not found
2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table
Warnings:
Note 1003 select NULL AS `f3` from (select NULL AS `f3` from `test`.`t1` join `test`.`t2` where multiple equal('8')) `alias1`
Changed in maria: | |
milestone: | none → 5.3 |
Changed in maria: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Igor Babaev (igorb-seattle) |
Changed in maria: | |
importance: | High → Low |
status: | Confirmed → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
After the fix for bug #776274 the crash disappeared, but the output of the EXPLAIN EXTENDED still contained some terms that was hard to understand (like multiple equal('8')):
MariaDB [test]> EXPLAIN EXTENDED SELECT * FROM ( SELECT t1.* FROM t1 JOIN t2 ON t2.f3 = t1.f3 ) AS alias1\G ******* ******* ****** 1. row ******* ******* ******* ****** ******* ******* ****** 2. row ******* ******* ******* ******
*******
id: 1
select_type: PRIMARY
table: <derived2>
type: system
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 0
filtered: 0.00
Extra: const row not found
*******
id: 2
select_type: DERIVED
table: NULL
type: NULL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: NULL
filtered: NULL
Extra: no matching row in const table
2 rows in set, 1 warning (0.00 sec)
MariaDB [test]> show warnings\G ******* ******* ****** 1. row ******* ******* ******* ******
*******
Level: Note
Code: 1003
Message: select NULL AS `f3` from (select NULL AS `f3` from `test`.`t1` join `test`.`t2` where multiple equal('8')) `alias1`
1 row in set (0.00 sec)