#4 0x000000000080449f in Dependency_marker::visit_field (this=0x7f768a719510, item=0x305bd58) at 10.0-exists2in/sql/item.cc:6601
#5 0x00000000007ebc38 in Item_field::enumerate_field_refs_processor (this=0x305bd58, arg=0x7f768a719510 "\260S@\001") at 10.0-exists2in/sql/item.cc:2381
#6 0x0000000000579611 in Item::walk (this=0x305bd58, processor=&virtual table offset 688, walk_subquery=false, arg=0x7f768a719510 "\260S@\001") at 10.0-exists2in/sql/item.h:1108
#7 0x00000000007f8023 in Item_ref::fix_fields (this=0x307a418, thd=0x304b8a0, reference=0x307a5b8) at 10.0-exists2in/sql/item.cc:6896
#8 0x0000000000831c62 in Item_func::fix_fields (this=0x307a528, thd=0x304b8a0, ref=0x307a758) at 10.0-exists2in/sql/item_func.cc:203
#9 0x000000000081477c in Item_cond::fix_fields (this=0x307a608, thd=0x304b8a0, ref=0x3054948) at 10.0-exists2in/sql/item_cmpfunc.cc:4337
#10 0x0000000000831c62 in Item_func::fix_fields (this=0x30548b8, thd=0x304b8a0, ref=0x30793e8) at 10.0-exists2in/sql/item_func.cc:203
#11 0x0000000000817e5c in Item_func_not::fix_fields (this=0x30548b8, thd=0x304b8a0, ref=0x30793e8) at 10.0-exists2in/sql/item_cmpfunc.cc:5412
#12 0x00000000005bfe36 in setup_conds (thd=0x304b8a0, tables=0x3053a88, leaves=..., conds=0x30793e8) at 10.0-exists2in/sql/sql_base.cc:8774
#13 0x0000000000683f4e in setup_without_group (thd=0x304b8a0, ref_pointer_array=0x3054998, tables=0x3053a88, leaves=..., fields=..., all_fields=..., conds=0x30793e8, order=0x0, group=0x0, hidden_group_fields=0x307929f, reserved=0x3075fbc) at 10.0-exists2in/sql/sql_select.cc:614
#14 0x000000000064452e in JOIN::prepare (this=0x3078f78, rref_pointer_array=0x3075fa0, tables_init=0x3053a88, wild_num=0, conds_init=0x30548b8, og_num=0, order_init=0x0, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x3075cf0, unit_arg=0x30755f8) at 10.0-exists2in/sql/sql_select.cc:769
#16 0x000000000064387e in handle_select (thd=0x304b8a0, lex=0x3075548, result=0x2f8d748, setup_tables_done_option=0) at 10.0-exists2in/sql/sql_select.cc:362
#17 0x000000000061b13b in execute_sqlcom_select (thd=0x304b8a0, all_tables=0x3053a88) at 10.0-exists2in/sql/sql_parse.cc:4937
#18 0x00000000006137a8 in mysql_execute_command (thd=0x304b8a0) at 10.0-exists2in/sql/sql_parse.cc:2421
#19 0x0000000000635b95 in Prepared_statement::execute (this=0x3097ba0, expanded_query=0x7f768a71ac30, open_cursor=false) at 10.0-exists2in/sql/sql_prepare.cc:3914
#20 0x0000000000634c2c in Prepared_statement::execute_loop (this=0x3097ba0, expanded_query=0x7f768a71ac30, open_cursor=false, packet=0x0, packet_end=0x0) at 10.0-exists2in/sql/sql_prepare.cc:3570
#21 0x0000000000632ce3 in mysql_sql_stmt_execute (thd=0x304b8a0) at 10.0-exists2in/sql/sql_prepare.cc:2732
#22 0x00000000006137d9 in mysql_execute_command (thd=0x304b8a0) at 10.0-exists2in/sql/sql_parse.cc:2431
#23 0x000000000061d9f6 in mysql_parse (thd=0x304b8a0, rawbuf=0x3096248 "EXECUTE stmt", length=12, parser_state=0x7f768a71b4e0) at 10.0-exists2in/sql/sql_parse.cc:6056
#24 0x000000000061099a in dispatch_command (command=COM_QUERY, thd=0x304b8a0, packet=0x3055ab1 "EXECUTE stmt", packet_length=12) at 10.0-exists2in/sql/sql_parse.cc:1216
#25 0x000000000060fb93 in do_command (thd=0x304b8a0) at 10.0-exists2in/sql/sql_parse.cc:945
#26 0x000000000071a57a in do_handle_one_connection (thd_arg=0x304b8a0) at 10.0-exists2in/sql/sql_connect.cc:1254
The problem is that in case of NOT we put IS NOT NULL befoe Item_in_optimizer with reference on its left expression. On the first execution the left expression is already "fixed". But on the second IS NOT NULL fix_field() called before and so it is not fix fielded.
Oleksandr Byelkin
added a comment - The problem is that in case of NOT we put IS NOT NULL befoe Item_in_optimizer with reference on its left expression. On the first execution the left expression is already "fixed". But on the second IS NOT NULL fix_field() called before and so it is not fix fielded.
The problem is that in case of NOT we put IS NOT NULL befoe Item_in_optimizer with reference on its left expression. On the first execution the left expression is already "fixed". But on the second IS NOT NULL fix_field() called before and so it is not fix fielded.