Assertion `new_item->type() == FIELD_ITEM || new_item->type() == REF_ITEM' with derived_merge=on
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Igor Babaev |
Bug Description
Repeatable in maria-5.3 with derived_merge=on. not repeatable with derived_merge = off. not repeatable with maria-5.3 before WL#106. EXPLAIN also crashes.
assertion:
mysqld: item.cc:6913: virtual Item* Item_direct_
#6 0x00000033b58296e6 in __assert_fail () from /lib64/libc.so.6
#7 0x000000000059fe33 in Item_direct_
transformer
#8 0x0000000000744e91 in build_equal_
#9 0x00000000007449cc in build_equal_
#10 0x0000000000744f43 in build_equal_items (thd=0x28e8128, cond=0x299dfd0, inherited=0x0, join_list=
at sql_select.cc:10889
#11 0x000000000074565f in optimize_cond (join=0x29a0210, conds=0x299dfd0, join_list=
at sql_select.cc:12313
#12 0x000000000074a8f2 in JOIN::optimize (this=0x29a0210) at sql_select.cc:972
#13 0x000000000074ebbb in mysql_select (thd=0x28e8128, rref_pointer_
order=0x0, group=0x0, having=0x0, proc_param=0x0, select_
at sql_select.cc:2875
#14 0x0000000000755002 in handle_select (thd=0x28e8128, lex=0x28ea530, result=0x299c658, setup_tables_
#15 0x00000000006a1fdc in execute_
#16 0x00000000006a3cba in mysql_execute_
#17 0x00000000006aca53 in mysql_parse (thd=0x28e8128, rawbuf=0x296dba0 "SELECT * FROM (SELECT f3 FROM v1 WHERE f3 = 0) AS select1 WHERE f3", length=66,
found_
#18 0x00000000006ad8eb in dispatch_command (command=COM_QUERY, thd=0x28e8128,
packet=
#19 0x00000000006aeef9 in do_command (thd=0x28e8128) at sql_parse.cc:906
#20 0x000000000069996f in handle_
#21 0x00000033b600673d in start_thread () from /lib64/
#22 0x00000033b58d40cd in clone () from /lib64/libc.so.6
minimum optimizer switch required: derived_merge=on
bzr version-info
revision-id: <email address hidden>
date: 2011-07-01 21:53:47 -0700
build-date: 2011-07-02 12:28:17 +0300
revno: 3075
branch-nick: maria-5.3
test case:
CREATE TABLE t1 (f1 int, f3 int);
INSERT INTO t1 VALUES (0,0),(0,0);
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT f1, MAX(f3) AS f3 FROM t1 GROUP BY f1;
SELECT * FROM (SELECT f3 FROM v1 WHERE f3 = 0) AS select1 WHERE f3;
Changed in maria: | |
importance: | Undecided → Critical |
status: | New → Confirmed |
Changed in maria: | |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
Notice the malformed condition "WHERE f3" . I was unable to reproduce this bug with an equality condition.