Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Description
Repeatable with any optimizer_switch setting.
backtrace:
#4 0x000000000074feb8 in select_describe (join=0x1f0d16e0, need_tmp_table=true, need_order=false, distinct=false, message=0x0) at sql_select.cc:20506
#5 0x0000000000752b86 in JOIN::exec (this=0x1f0d16e0) at sql_select.cc:2179
#6 0x000000000074e95a in mysql_select (thd=0x1efb8068, rref_pointer_array=0x1f03f998, tables=0x1f072ab8, wild_num=0, fields=..., conds=0x0, og_num=0,
order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764741, result=0x1f073320, unit=0x1f0725d0, select_lex=0x1f03f778)
at sql_select.cc:2889
#7 0x000000000074ecff in mysql_explain_union (thd=0x1efb8068, unit=0x1f0725d0, result=0x1f073320) at sql_select.cc:20978
#8 0x0000000000751cdb in select_describe (join=0x1f0cb4b0, need_tmp_table=false, need_order=false, distinct=false, message=0x0) at sql_select.cc:20935
#9 0x0000000000752b86 in JOIN::exec (this=0x1f0cb4b0) at sql_select.cc:2179
#10 0x000000000074e95a in mysql_select (thd=0x1efb8068, rref_pointer_array=0x1f03eaa0, tables=0x1f03f388, wild_num=0, fields=..., conds=0x1f072e90,
og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764740, result=0x1f073320, unit=0x1f03eb90, select_lex=0x1f03e880)
at sql_select.cc:2889
#11 0x000000000074ecff in mysql_explain_union (thd=0x1efb8068, unit=0x1f03eb90, result=0x1f073320) at sql_select.cc:20978
#12 0x0000000000751cdb in select_describe (join=0x1f0c5280, need_tmp_table=false, need_order=false, distinct=false,
message=0xd924a0 "Impossible WHERE noticed after reading const tables") at sql_select.cc:20935
#13 0x0000000000751dd9 in return_zero_rows (join=0x1f0c5280, result=0x1f073320, tables=..., fields=..., send_row=false, select_options=2147764740,
info=0xd924a0 "Impossible WHERE noticed after reading const tables", having=0x0) at sql_select.cc:10106
#14 0x0000000000752734 in JOIN::exec (this=0x1f0c5280) at sql_select.cc:2120
#15 0x000000000074e95a in mysql_select (thd=0x1efb8068, rref_pointer_array=0x1efbac18, tables=0x1f03df58, wild_num=1, fields=..., conds=0x1f073120,
og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764740, result=0x1f073320, unit=0x1efba510, select_lex=0x1efba9f8)
at sql_select.cc:2889
#16 0x000000000074ecff in mysql_explain_union (thd=0x1efb8068, unit=0x1efba510, result=0x1f073320) at sql_select.cc:20978
#17 0x00000000006a18c2 in execute_sqlcom_select (thd=0x1efb8068, all_tables=0x1f03df58) at sql_parse.cc:5066
#18 0x00000000006a373a in mysql_execute_command (thd=0x1efb8068) at sql_parse.cc:2231
#19 0x00000000006ac4d3 in mysql_parse (thd=0x1efb8068,
rawbuf=0x1f03dcb0 "EXPLAIN SELECT * \nFROM t2, t3\nWHERE t3.f1 = (\nSELECT SUM( f2 )\nFROM t4\nWHERE EXISTS (\nSELECT DISTINCT f4\nFROM t1\n)\n)",
length=116, found_semicolon=0x41427f08) at sql_parse.cc:6088
#20 0x00000000006ad36b in dispatch_command (command=COM_QUERY, thd=0x1efb8068, packet=0x1f034939 "", packet_length=116) at sql_parse.cc:1208
#21 0x00000000006ae979 in do_command (thd=0x1efb8068) at sql_parse.cc:906
#22 0x00000000006993ef in handle_one_connection (arg=0x1efb8068) at sql_connect.cc:1178
#23 0x00000033b600673d in start_thread () from /lib64/libpthread.so.0
#24 0x00000033b58d40cd in clone () from /lib64/libc.so.6
full optimizer switch:
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=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on
test case:
CREATE TABLE t1 ( f4 int) ;
INSERT INTO t1 VALUES (0),(0);
CREATE TABLE t2 ( f2 int) ;
CREATE TABLE t3 ( f1 int NOT NULL );
CREATE TABLE t4 ( f2 int, f3 int) ;
INSERT INTO t4 VALUES (8,0),(3,0);
SELECT @@optimizer_switch;
EXPLAIN SELECT *
FROM t2, t3
WHERE t3.f1 = (
SELECT SUM( f2 )
FROM t4
WHERE EXISTS (
SELECT DISTINCT f4
FROM t1
)
);
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Launchpad bug id: 806943