Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
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_ref_to_ident::compile(bool (Item::)(uchar), uchar, Item (Item::)(uchar), uchar*): Assertion `new_item->type() == FIELD_ITEM || new_item->type() == REF_ITEM' failed.
#6 0x00000033b58296e6 in __assert_fail () from /lib64/libc.so.6
#7 0x000000000059fe33 in Item_direct_ref_to_ident::compile (this=0x299d0d0, analyzer=&virtual Item::subst_argument_checker(uchar**), arg_p=0x420be088,
transformer=&virtual Item::equal_fields_propagator(uchar*), arg_t=0x299e0b8 "\001") at item.cc:6913
#8 0x0000000000744e91 in build_equal_items_for_cond (thd=0x28e8128, cond=0x299d0d0, inherited=0x299e0b8) at sql_select.cc:10807
#9 0x00000000007449cc in build_equal_items_for_cond (thd=0x28e8128, cond=0x299dfd0, inherited=0x299e0b8) at sql_select.cc:10725
#10 0x0000000000744f43 in build_equal_items (thd=0x28e8128, cond=0x299dfd0, inherited=0x0, join_list=0x28eac20, cond_equal_ref=0x29a62f0)
at sql_select.cc:10889
#11 0x000000000074565f in optimize_cond (join=0x29a0210, conds=0x299dfd0, join_list=0x28eac20, cond_value=0x29a61d8, cond_equal=0x29a62f0)
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_array=0x28eacd8, tables=0x296f6d0, wild_num=1, fields=..., conds=0x299a8b0, og_num=0,
order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x299c658, unit=0x28ea5d0, select_lex=0x28eaab8)
at sql_select.cc:2875
#14 0x0000000000755002 in handle_select (thd=0x28e8128, lex=0x28ea530, result=0x299c658, setup_tables_done_option=0) at sql_select.cc:283
#15 0x00000000006a1fdc in execute_sqlcom_select (thd=0x28e8128, all_tables=0x296f6d0) at sql_parse.cc:5087
#16 0x00000000006a3cba in mysql_execute_command (thd=0x28e8128) at sql_parse.cc:2231
#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_semicolon=0x420bff08) at sql_parse.cc:6088
#18 0x00000000006ad8eb in dispatch_command (command=COM_QUERY, thd=0x28e8128,
packet=0x2964869 "SELECT * FROM (SELECT f3 FROM v1 WHERE f3 = 0) AS select1 WHERE f3", packet_length=66) at sql_parse.cc:1208
#19 0x00000000006aeef9 in do_command (thd=0x28e8128) at sql_parse.cc:906
#20 0x000000000069996f in handle_one_connection (arg=0x28e8128) at sql_connect.cc:1178
#21 0x00000033b600673d in start_thread () from /lib64/libpthread.so.0
#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;
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: Assertion `new_item->type() == FIELD_ITEM || new_item->type() == REF_ITEM' with derived_merge=on
Notice the malformed condition "WHERE f3" . I was unable to reproduce this bug with an equality condition.