Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
Description
Even with the fix for bug 860535
this query:
SELECT *
FROM t1
JOIN t2
ON ( t2.col_int_key = t1.pk )
WHERE t1.col_varchar_key IN (
SELECT t3.col_varchar_key FROM t3, t4
);
asserts as follows:
mysqld: ma_rkey.c:69: maria_rkey: Assertion `keypart_map' failed.
#5 0x00000035a6e340d5 in abort () from /lib64/libc.so.6
#6 0x00000035a6e2b8b5 in __assert_fail () from /lib64/libc.so.6
#7 0x00000000009e6625 in maria_rkey (info=0x7f80600f53c8,
buf=0x7f8060041d70 "\377\377\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217", inx=5, key_data=0x7f80600c3990 "", keypart_map=0, search_flag=HA_READ_KEY_EXACT) at ma_rkey.c:69
#8 0x00000000009c4975 in ha_maria::index_read_map (this=0x7f8060041670,
buf=0x7f8060041d70 "\377\377\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217", key=0x7f80600c3990 "", keypart_map=0, find_flag=HA_READ_KEY_EXACT) at ha_maria.cc:2266
#9 0x00000000005a9a36 in handler::ha_index_read_map (this=0x7f8060041670,
buf=0x7f8060041d70 "\377\377\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217\217", key=0x7f80600c3990 "", keypart_map=0, find_flag=HA_READ_KEY_EXACT) at sql_class.h:3655
#10 0x0000000000766fea in join_read_always_key (tab=0x7f80600c2d10) at sql_select.cc:15803
#11 0x000000000076557d in sub_select (join=0x7f80600b5c70, join_tab=0x7f80600c2d10, end_of_records=false) at sql_select.cc:15129
#12 0x0000000000764d52 in do_select (join=0x7f80600b5c70, fields=0x254bca8, table=0x0, procedure=0x0) at sql_select.cc:14795
#13 0x0000000000744f90 in JOIN::exec (this=0x7f80600b5c70) at sql_select.cc:2679
#14 0x0000000000745811 in mysql_select (thd=0x2549218, rref_pointer_array=0x254bdf0, tables=0x7f80600188b8, wild_num=1, fields=..., conds=0x7f806001a440,
og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x7f80600a9410, unit=0x254b6b8, select_lex=0x254bba0)
at sql_select.cc:2900
#15 0x000000000073c6c7 in handle_select (thd=0x2549218, lex=0x254b618, result=0x7f80600a9410, setup_tables_done_option=0) at sql_select.cc:283
#16 0x00000000006c88cb in execute_sqlcom_select (thd=0x2549218, all_tables=0x7f80600188b8) at sql_parse.cc:5112
#17 0x00000000006bf62a in mysql_execute_command (thd=0x2549218) at sql_parse.cc:2250
#18 0x00000000006cb417 in mysql_parse (thd=0x2549218,
rawbuf=0x7f8060018600 "SELECT * \nFROM t1\nJOIN t2\nON ( t2.col_int_key = t1.pk )\nWHERE t1.col_varchar_key IN (\nSELECT t3.col_varchar_key FROM t3, t4\n)", length=126, found_semicolon=0x7f806fffdc68) at sql_parse.cc:6113
#19 0x00000000006bce67 in dispatch_command (command=COM_QUERY, thd=0x2549218, packet=0x25c3f09 "", packet_length=126) at sql_parse.cc:1221
#20 0x00000000006bc1e7 in do_command (thd=0x2549218) at sql_parse.cc:916
#21 0x00000000006b90c3 in handle_one_connection (arg=0x2549218) at sql_connect.cc:1191
#22 0x00000035a7207761 in start_thread () from /lib64/libpthread.so.0
#23 0x00000035a6ee098d in clone () from /lib64/libc.so.6
Explain:
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ref col_varchar_key NULL NULL NULL 3 Using where; Using index; Start temporary
1 PRIMARY t4 index NULL PRIMARY 4 NULL 3 Using index; Using join buffer (flat, BNL join)
1 PRIMARY t1 ref PRIMARY,col_varchar_key col_varchar_key 4 test.t3.col_varchar_key 3 End temporary
1 PRIMARY t2 ref col_int_key col_int_key 5 test.t1.pk 3
minimal switch: semijoin=on?
full 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=off,derived_merge=off,derived_with_keys=off,firstmatch=on,loosescan=on,materialization=off,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=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
bzr version-info:
revision-id: <email address hidden>
date: 2011-11-07 16:39:02 +0400
build-date: 2011-11-08 11:03:47 +0200
revno: 3273
branch-nick: maria-5.3