Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
Description
Repeatable with maria-5.3 , maria-5.3-subqueries-mwl90.
backtrace:
#3 <signal handler called>
#4 0x00000000006f0a4d in JOIN_CACHE::write_record_data (this=0x855bd88, link=0x0, is_full=0x41681217) at sql_join_cache.cc:1391
#5 0x00000000006f0fef in JOIN_CACHE::put_record (this=0x855bd88) at sql_join_cache.cc:1500
#6 0x00000000007338a8 in sub_select_cache (join=0x8552980, join_tab=0x855b4c0, end_of_records=false) at sql_select.cc:14698
#7 0x000000000072a2c6 in evaluate_join_record (join=0x8552980, join_tab=0x855b1a8, error=0) at sql_select.cc:15099
#8 0x0000000000733560 in sub_select (join=0x8552980, join_tab=0x855b1a8, end_of_records=false) at sql_select.cc:14904
#9 0x0000000000734894 in do_select (join=0x8552980, fields=0x8498b00, table=0x0, procedure=0x0) at sql_select.cc:14569
#10 0x0000000000754016 in JOIN::exec (this=0x8552980) at sql_select.cc:2665
#11 0x000000000074df6e in mysql_select (thd=0x8496098, rref_pointer_array=0x8498c18, tables=0x851d4a0, wild_num=1, fields=..., conds=0x8551550, og_num=0,
order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x851dc20, unit=0x8498510, select_lex=0x84989f8)
at sql_select.cc:2886
#12 0x0000000000754348 in handle_select (thd=0x8496098, lex=0x8498470, result=0x851dc20, setup_tables_done_option=0) at sql_select.cc:283
#13 0x00000000006a1744 in execute_sqlcom_select (thd=0x8496098, all_tables=0x851d4a0) at sql_parse.cc:5082
#14 0x00000000006a33f7 in mysql_execute_command (thd=0x8496098) at sql_parse.cc:2227
#15 0x00000000006ac18f in mysql_parse (thd=0x8496098,
rawbuf=0x851bc40 "SELECT *\nFROM ( \nSELECT DISTINCT *\nFROM t1\n) AS alias1\nWHERE alias1.f1 = ANY (\nSELECT t2.f1 FROM t2\n)", length=101,
found_semicolon=0x41682f08) at sql_parse.cc:6083
#16 0x00000000006ad027 in dispatch_command (command=COM_QUERY, thd=0x8496098, packet=0x85128c9 "", packet_length=103) at sql_parse.cc:1206
#17 0x00000000006ae635 in do_command (thd=0x8496098) at sql_parse.cc:904
#18 0x00000000006990eb in handle_one_connection (arg=0x8496098) at sql_connect.cc:1178
#19 0x00000033b600673d in start_thread () from /lib64/libpthread.so.0
#20 0x00000033b58d40cd in clone () from /lib64/libc.so.6
optimizer switch in effect:
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=on,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
explain:
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL key0 NULL NULL NULL 2 Start temporary
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; End temporary; Using join buffer (flat, BNL join)
2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using temporary
test case:
SET SESSION optimizer_switch='semijoin=on,materialization=off,firstmatch=off,loosescan=off';
SET SESSION join_cache_level = 1;
CREATE TABLE t2 ( f1 int) ;
INSERT IGNORE INTO t2 VALUES (0),(0);
CREATE TABLE t1 ( f1 int) ;
INSERT IGNORE INTO t1 VALUES (0),(0);
SELECT *
FROM (
SELECT DISTINCT *
FROM t1
) AS alias1
WHERE alias1.f1 = ANY (
SELECT t2.f1 FROM t2
) ;
bzr version-info:
revision-id: <email address hidden>
date: 2011-06-28 11:11:26 +0400
build-date: 2011-06-28 11:03:34 +0300
revno: 3066
branch-nick: maria-5.3