Assertion `keypart_map' failed in mi_rkey with semijoin
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Sergey Petrunia |
Bug Description
mysqld: mi_rkey.c:58: mi_rkey: Assertion `keypart_map' failed.
#8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
#9 0x084da6b7 in mi_rkey (info=0xae62a2e0, buf=0xae6298b0 "\374\003", inx=0, key=0xae661a00 "", keypart_map=0, search_
at mi_rkey.c:58
#10 0x084d55df in ha_myisam:
at ha_myisam.cc:1796
#11 0x081bbfee in handler:
at sql_class.h:3655
#12 0x0833eb40 in join_read_
#13 0x0833d3ed in sub_select (join=0xae635280, join_tab=
#14 0x083e4bef in join_tab_
#15 0x0833d37a in sub_select (join=0xae635280, join_tab=
#16 0x0833cc93 in do_select (join=0xae635280, fields=0xae612e0c, table=0x0, procedure=0x0) at sql_select.cc:14763
#17 0x08321669 in JOIN::exec (this=0xae635280) at sql_select.cc:2679
#18 0x0824c4fb in subselect_
#19 0x08246247 in Item_subselect:
#20 0x082466ee in Item_in_
#21 0x08248242 in Item_in_
#22 0x081e2064 in Item::val_
#23 0x0820e462 in Item_in_
#24 0x081ca2cc in Item::val_bool (this=0xae614518) at item.cc:197
#25 0x0820b010 in Item_func_
#26 0x0833d7d5 in evaluate_
#27 0x0833d588 in sub_select (join=0xae62b7d0, join_tab=
#28 0x0833cc93 in do_select (join=0xae62b7d0, fields=0xad601b4, table=0x0, procedure=0x0) at sql_select.cc:14763
#29 0x08321669 in JOIN::exec (this=0xae62b7d0) at sql_select.cc:2679
#30 0x08321e96 in mysql_select (thd=0xad5e6e0, rref_pointer_
order=0x0, group=0x0, having=0x0, proc_param=0x0, select_
at sql_select.cc:2900
#31 0x08319c67 in handle_select (thd=0xad5e6e0, lex=0xad5fde4, result=0xae6142f0, setup_tables_
#32 0x082ac5f9 in mysql_execute_
#33 0x082b6a63 in mysql_parse (thd=0xad5e6e0,
rawbuf=
#34 0x082a8e40 in dispatch_command (command=COM_QUERY, thd=0xad5e6e0,
packet=
#35 0x082a829b in do_command (thd=0xad5e6e0) at sql_parse.cc:916
#36 0x082a527f in handle_
#37 0x00821919 in start_thread () from /lib/libpthread
#38 0x0076acce in clone () from /lib/libc.so.6
minimal optimzer switch for this test case: semijoin=
full optimizer switch: index_merge=
also observed with a different query and this switch: semijoin=
explain of the SELECT part:
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
2 SUBQUERY t2 system f3 NULL NULL NULL 1
2 SUBQUERY <subquery3> eq_ref distinct_key distinct_key 5 func 1
3 SUBQUERY t3 ref f3,f4 f4 4 const 1 Using where; Using index
test case:
CREATE TABLE t1 (f3 int) ;
INSERT INTO t1 VALUES (1),(7);
CREATE TABLE t2 (f3 int , f5 varchar(1), KEY (f3)) ;
INSERT INTO t2 VALUES (7,'b');
CREATE TABLE t3 (f3 int , f4 varchar(1) , KEY(f3), KEY (f4,f3)) ;
INSERT INTO t3 VALUES (1,'t'),(7,'g');
SET SESSION optimizer_
CREATE TABLE t4
SELECT f3
FROM t1 WHERE ( f3 ) NOT IN (
SELECT f3
FROM t2
WHERE f5 IN (
)
);
Changed in maria: | |
milestone: | none → 5.3 |
assignee: | nobody → Sergey Petrunia (sergefp) |
Changed in maria: | |
status: | New → Fix Committed |
importance: | Undecided → High |
Changed in maria: | |
status: | Fix Committed → Fix Released |