Assertion `!is_interleave_error' failed on low optimizer_search_depth
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Confirmed
|
High
|
Sergey Petrunia |
Bug Description
As already reported in mysql bug http://
The RQG sometimes generates joins involving many tables. In order to restrict the total optimization time per query, and thus run more queries per test run, optimizer_
assertion:
mysqld: sql_select.cc:5498: bool greedy_
backtrace:
#8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
#9 0x0831785c in greedy_search (join=0xae688eb0, remaining_
#10 0x08316ebc in choose_plan (join=0xae688eb0, join_tables=55) at sql_select.cc:5120
#11 0x0831205f in make_join_
#12 0x08309e93 in JOIN::optimize (this=0xae688eb0) at sql_select.cc:956
#13 0x0830fa81 in mysql_select (thd=0xb1fda70, rref_pointer_
unit=0xb1ff16c, select_
#14 0x0830800d in handle_select (thd=0xb1fda70, lex=0xb1ff110, result=0xae64b8b0, setup_tables_
#15 0x082a3400 in execute_
#16 0x08299e1b in mysql_execute_
#17 0x082a599e in mysql_parse (thd=0xb1fda70,
rawbuf=
length=262, found_semicolon
#18 0x08297904 in dispatch_command (command=COM_QUERY, thd=0xb1fda70,
packet=
packet_
#19 0x08296d6e in do_command (thd=0xb1fda70) at sql_parse.cc:903
#20 0x08293e4a in handle_
#21 0x00821919 in start_thread () from /lib/libpthread
#22 0x0076acce in clone () from /lib/libc.so.6
test case:
SET SESSION optimizer_
CREATE TABLE t1 (f1 int,f2 int,f3 int,f4 int) ;
INSERT IGNORE INTO t1 VALUES (0,0,2,
CREATE TABLE t2 (f1 int) ;
CREATE TABLE t3 (f3 int,PRIMARY KEY (f3)) ;
CREATE TABLE t4 (f5 int) ;
CREATE TABLE t5 (f2 int) ;
SELECT alias2.f4 FROM t1 AS alias1
LEFT JOIN t1 AS alias2
LEFT JOIN t2 AS alias3
LEFT JOIN t3 AS alias4 ON alias3.f1 = alias4.f3
ON alias2.f1
LEFT JOIN t4 AS alias5
JOIN t5 ON alias5.f5
ON alias2.f3 ON alias1.f2 ;
Changed in maria: | |
assignee: | nobody → Timour Katchaounov (timour) |
milestone: | none → 5.3 |
milestone: | 5.3 → none |
Changed in maria: | |
importance: | Undecided → High |
Changed in maria: | |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Confirmed |
tags: | added: assertion optimizer |
Timour reports this bug is in Sergey's code. A patch is available from the mysql bug report.