Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.0, 5.5.28, 5.3.10
-
None
-
None
Description
mysqld: item.cc:4601: virtual bool Item_field::fix_fields(THD*, Item**): Assertion `fixed == 0' failed.
|
[ERROR] mysqld got signal 6 ;
|
#6 0x00007f6d506edd4d in __GI___assert_fail (assertion=0xcb195e "fixed == 0", file=<optimized out>, line=4601, function=<optimized out>) at assert.c:81
|
#7 0x00000000005bb5c4 in Item_field::fix_fields (this=0x3251488, thd=0x31d1580, reference=0x32517c8) at item.cc:4601
|
#8 0x0000000000654c18 in Item_row::fix_fields (this=0x3251708, thd=0x31d1580, ref=0x3252a40) at item_row.cc:71
|
#9 0x0000000000727274 in setup_conds (thd=0x31d1580, tables=0x3251058, leaves=..., conds=0x3252f90) at sql_base.cc:8574
|
#10 0x000000000077b096 in setup_without_group (thd=0x31d1580, ref_pointer_array=0x3253488, tables=0x3251058, leaves=..., fields=..., all_fields=..., conds=0x3252f90, order=0x0, group=0x0, hidden_group_fields=0x3252e47) at sql_select.cc:520
|
#11 0x000000000073e2ff in JOIN::prepare (this=0x3252b48, rref_pointer_array=0x32506a8, tables_init=0x3251058, wild_num=0, conds_init=0x32578a8, og_num=0, order_init=0x0, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x3250400, unit_arg=0x324fed8) at sql_select.cc:668
|
#12 0x0000000000746bfd in mysql_select (thd=0x31d1580, rref_pointer_array=0x32506a8, tables=0x3251058, wild_num=0, fields=..., conds=0x32578a8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416200192, result=0x3252af8, unit=0x324fed8, select_lex=0x3250400) at sql_select.cc:2963
|
#13 0x000000000073d6cb in handle_select (thd=0x31d1580, lex=0x324fe38, result=0x3252af8, setup_tables_done_option=0) at sql_select.cc:286
|
#14 0x00000000006c8bab in execute_sqlcom_select (thd=0x31d1580, all_tables=0x3251058) at sql_parse.cc:5157
|
#15 0x00000000006bf96a in mysql_execute_command (thd=0x31d1580) at sql_parse.cc:2290
|
#16 0x000000000079d6f9 in Prepared_statement::execute (this=0x3266d30, expanded_query=0x7f6d479f0be0, open_cursor=false) at sql_prepare.cc:3758
|
#17 0x000000000079c8f1 in Prepared_statement::execute_loop (this=0x3266d30, expanded_query=0x7f6d479f0be0, open_cursor=false, packet=0x0, packet_end=0x0) at sql_prepare.cc:3439
|
#18 0x000000000079ad2a in mysql_sql_stmt_execute (thd=0x31d1580) at sql_prepare.cc:2664
|
#19 0x00000000006bf99b in mysql_execute_command (thd=0x31d1580) at sql_parse.cc:2299
|
#20 0x00000000006cb603 in mysql_parse (thd=0x31d1580, rawbuf=0x32677d8 "execute stmt", length=12, found_semicolon=0x7f6d479f17e0) at sql_parse.cc:6158
|
#21 0x00000000006bd110 in dispatch_command (command=COM_QUERY, thd=0x31d1580, packet=0x321ab61 "execute stmt", packet_length=12) at sql_parse.cc:1228
|
#22 0x00000000006bc424 in do_command (thd=0x31d1580) at sql_parse.cc:923
|
#23 0x00000000006b8e7d in handle_one_connection (arg=0x31d1580) at sql_connect.cc:1218
|
#24 0x00007f6d511fcefc in start_thread (arg=0x7f6d479f2700) at pthread_create.c:304
|
#25 0x00007f6d507a3f4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
|
branch: maria/5.3
|
revision-id: sergii@pisem.net-20121123121131-p4nfv8j2cbh68dbg
|
date: 2012-11-23 13:11:31 +0100
|
revno: 3605
|
The assertion failure started happening from revno 3457 on maria/5.3 (which was some time between 5.3.5 and 5.3.6).
Reproducible on maria/5.3, maria/5.5, maria/10.0. Not reproducible on mysql/5.6.
Maybe it's only a problem of a debug build (nothing visibly wrong happens on a release build).
Minimal optimizer_switch: semijoin=on
Full optimizer_switch (default):
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
SET optimizer_switch = 'semijoin=on'; |
|
CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM; |
INSERT INTO t1 VALUES (0,4),(8,6); |
|
CREATE TABLE t2 (c INT, d INT) ENGINE=MyISAM; |
INSERT INTO t2 VALUES (7,1),(0,7); |
|
eval PREPARE stmt FROM ' SELECT * FROM t1 WHERE ( a, b ) IN ( SELECT c, d FROM t2 ) '; |
|
execute stmt; |
execute stmt; |
Stack traces:
The first fix_fields call is here:
#0 Item_field::fix_fields (this=0x7fff2c00b480, thd=0xa64e1e0, reference=0x7fff2c00d7f0) at /home/psergey/dev2/5.5/sql/item.cc:4963
#1 0x000000000080bd59 in Item_func::fix_fields (this=0x7fff2c00d760, thd=0xa64e1e0, ref=0x7fff2c006510) at /home/psergey/dev2/5.5/sql/item_func.cc:204
#2 0x00000000007eee81 in Item_cond::fix_fields (this=0x7fff2c0063e0, thd=0xa64e1e0, ref=0x7fff2c0069f8) at /home/psergey/dev2/5.5/sql/item_cmpfunc.cc:4298
#3 0x00000000005b8918 in setup_conds (thd=0xa64e1e0, tables=0x7fff2c00ae98, leaves=..., conds=0x7fff2c0069f8) at /home/psergey/dev2/5.5/sql/sql_base.cc:8784
#4 0x0000000000674fe1 in setup_without_group (thd=0xa64e1e0, ref_pointer_array=0x7fff2c00cec0, tables=0x7fff2c00ae98, leaves=..., fields=..., all_fields=..., conds=0x7fff2c0069f8, order=0x0, group=0x0, hidden_group_fields=0x7fff2c0068e7) at /home/psergey/dev2/5.5/sql/sql_select.cc:566
#5 0x000000000063674b in JOIN::prepare (this=0x7fff2c0065f0, rref_pointer_array=0x7fff2c00a340, tables_init=0x7fff2c00ae98, wild_num=0, conds_init=0x7fff2c0063e0, og_num=0, order_init=0x0, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7fff2c00a0e8, unit_arg=0x7fff2c009a10) at /home/psergey/dev2/5.5/sql/sql_select.cc:714
#6 0x000000000063ec59 in mysql_select (thd=0xa64e1e0, rref_pointer_array=0x7fff2c00a340, tables=0x7fff2c00ae98, wild_num=0, fields=..., conds=0x7fff2c0063e0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7fff2c00b920, unit=0x7fff2c009a10, select_lex=0x7fff2c00a0e8) at /home/psergey/dev2/5.5/sql/sql_select.cc:3036
#7 0x0000000000635abb in handle_select (thd=0xa64e1e0, lex=0x7fff2c009960, result=0x7fff2c00b920, setup_tables_done_option=0) at /home/psergey/dev2/5.5/sql/sql_select.cc:316
#8 0x000000000060fa4a in execute_sqlcom_select (thd=0xa64e1e0, all_tables=0x7fff2c00ae98) at /home/psergey/dev2/5.5/sql/sql_parse.cc:4626
#9 0x0000000000608c6a in mysql_execute_command (thd=0xa64e1e0) at /home/psergey/dev2/5.5/sql/sql_parse.cc:2182
#10 0x00000000006293e8 in Prepared_statement::execute (this=0x7fff2c009550, expanded_query=0x7fff38546e80, open_cursor=false) at /home/psergey/dev2/5.5/sql/sql_prepare.cc:3904
#11 0x0000000000628538 in Prepared_statement::execute_loop (this=0x7fff2c009550, expanded_query=0x7fff38546e80, open_cursor=false, packet=0x0, packet_end=0x0) at /home/psergey/dev2/5.5/sql/sql_prepare.cc:3563
#12 0x00000000006266ef in mysql_sql_stmt_execute (thd=0xa64e1e0) at /home/psergey/dev2/5.5/sql/sql_prepare.cc:2729
#13 0x0000000000608c98 in mysql_execute_command (thd=0xa64e1e0) at /home/psergey/dev2/5.5/sql/sql_parse.cc:2192
#14 0x00000000006121e8 in mysql_parse (thd=0xa64e1e0, rawbuf=0x7fff2c006348 "execute stmt", length=12, parser_state=0x7fff38547640) at /home/psergey/dev2/5.5/sql/sql_parse.cc:5741
#15 0x00000000006062f3 in dispatch_command (command=COM_QUERY, thd=0xa64e1e0, packet=0xa739a21 "execute stmt", packet_length=12) at /home/psergey/dev2/5.5/sql/sql_parse.cc:1055
#16 0x00000000006055e3 in do_command (thd=0xa64e1e0) at /home/psergey/dev2/5.5/sql/sql_parse.cc:794
#17 0x0000000000701020 in do_handle_one_connection (thd_arg=0xa64e1e0) at /home/psergey/dev2/5.5/sql/sql_connect.cc:1266
#18 0x0000000000700a0b in handle_one_connection (arg=0xa64e1e0) at /home/psergey/dev2/5.5/sql/sql_connect.cc:1181
#19 0x0000003509c07d90 in start_thread (arg=0x7fff38548700) at pthread_create.c:309
#20 0x00000035098f0f5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115