Assertion `tmp > 0 || record_count == 0' failed at best_access_path with semijoin_with_cache=on and STRAIGHT_JOIN
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Igor Babaev |
Bug Description
mysqld: sql_select.cc:5426: void best_access_
#6 0x00007fb374daf235 in __assert_fail () from /lib64/libc.so.6
#7 0x000000000077d98f in best_access_path (join=0x1d52a00, s=0x1d62c40,
remaining_
record_
loose_
#8 0x000000000077f7e3 in best_extension_
remaining_
read_time=3, search_depth=60, prune_level=0) at sql_select.cc:6425
#9 0x000000000077fb64 in best_extension_
remaining_
prune_level=0) at sql_select.cc:6488
#10 0x000000000077fb64 in best_extension_
remaining_
prune_level=0) at sql_select.cc:6488
#11 0x000000000077ed8a in greedy_search (join=0x1d52a00, remaining_
search_
#12 0x000000000077e5d9 in choose_plan (join=0x1d52a00, join_tables=11)
at sql_select.cc:5704
#13 0x0000000000778b7a in make_join_
tables_
at sql_select.cc:3592
#14 0x00000000007702f0 in JOIN::optimize (this=0x1d52a00) at sql_select.cc:1175
#15 0x0000000000776c07 in mysql_select (thd=0x1c25818,
rref_
conds=
proc_param=0x0, select_
unit=0x1c27cb8, select_
#16 0x000000000076d5dd in handle_select (thd=0x1c25818, lex=0x1c27c18,
result=
#17 0x00000000006fc744 in execute_
all_
#18 0x00000000006f381a in mysql_execute_
at sql_parse.cc:2250
#19 0x00000000006ff124 in mysql_parse (thd=0x1c25818,
rawbuf=
length=122, found_semicolon
#20 0x00000000006f1032 in dispatch_command (command=COM_QUERY, thd=0x1c25818,
packet=
packet_
#21 0x00000000006f0366 in do_command (thd=0x1c25818) at sql_parse.cc:916
#22 0x00000000006ed2bc in handle_
at sql_connect.cc:1191
#23 0x00007fb375a6aa4f in start_thread () from /lib64/
#24 0x00007fb374e5482d in clone () from /lib64/libc.so.6
bzr version-info
revision-id: <email address hidden>
date: 2011-12-08 04:22:38 +0400
build-date: 2011-12-08 17:10:52 +0200
revno: 3337
branch-nick: maria-5.3
Not reproducible on 3315.
Minimal switch: semijoin_
Full switch: index_merge=
optimizer_
t2 and t3 need to be Aria or MyISAM.
EXPLAIN also fails.
Test case:
SET optimizer_
SET optimizer_
CREATE TABLE t1 ( a INT, KEY (a) );
INSERT INTO t1 VALUES (4),(6);
CREATE TABLE t2 ( b INT ) ENGINE=Aria;
INSERT INTO t2 VALUES (4);
CREATE TABLE t3 ( c INT ) ENGINE=Aria;
# t2 and t3 need to be Aria or MyISAM
SELECT * FROM t1 AS alias1, t1 AS alias2
WHERE alias1.a = alias2.a
AND alias2.a IN ( SELECT b FROM t2 STRAIGHT_JOIN t3 );
Changed in maria: | |
milestone: | none → 5.3 |
assignee: | nobody → Sergey Petrunia (sergefp) |
description: | updated |
Changed in maria: | |
importance: | Undecided → Critical |
status: | New → Confirmed |
assignee: | Sergey Petrunia (sergefp) → Igor Babaev (igorb-seattle) |
Changed in maria: | |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |