Elimination of a table results in an invalid execution plan
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Sergey Petrunia |
Bug Description
The following unsimplified query:
SELECT table1 . `col_int_key` AS field1 FROM O AS table1 LEFT JOIN D AS table2 LEFT OUTER JOIN M AS table3 ON table2 . `col_varchar_
caused the following assertion:
mysqld: sql_join_
backtrace:
# 2010-11-13T22:05:09 #8 0x00a72d98 in __assert_fail () from /lib/libc.so.6
# 2010-11-13T22:05:09 #9 0x082de97b in JOIN_CACHE:
# 2010-11-13T22:05:09 #10 0x082de2d5 in JOIN_CACHE:
# 2010-11-13T22:05:09 #11 0x082de311 in JOIN_CACHE:
# 2010-11-13T22:05:09 #12 0x08326019 in sub_select_cache (join=0x915132b0, join_tab=
# 2010-11-13T22:05:09 #13 0x08326232 in sub_select (join=0x915132b0, join_tab=
# 2010-11-13T22:05:09 #14 0x08326232 in sub_select (join=0x915132b0, join_tab=
# 2010-11-13T22:05:09 #15 0x0832584f in do_select (join=0x915132b0, fields=0xbb4f980, table=0x0, procedure=0x0) at sql_select.cc:12992
# 2010-11-13T22:05:09 #16 0x0830b21b in JOIN::exec (this=0x915132b0) at sql_select.cc:2392
# 2010-11-13T22:05:09 #17 0x0830b981 in mysql_select (thd=0xbb4df50, rref_pointer_
# 2010-11-13T22:05:09 order=0x0, group=0x0, having=0xa766f058, proc_param=0x0, select_
# 2010-11-13T22:05:09 at sql_select.cc:2602
# 2010-11-13T22:05:09 #18 0x08303ed1 in handle_select (thd=0xbb4df50, lex=0xbb4f5dc, result=0x90f105d8, setup_tables_
# 2010-11-13T22:05:09 #19 0x0829fcd7 in execute_
# 2010-11-13T22:05:09 #20 0x082967d7 in mysql_execute_
# 2010-11-13T22:05:09 #21 0x082a2248 in mysql_parse (thd=0xbb4df50,
# 2010-11-13T22:05:09 rawbuf=0xa7660c30 "SELECT table1 . `col_int_key` AS field1 FROM O AS table1 LEFT JOIN D AS table2 LEFT OUTER JOIN M AS table3 ON table2 . `col_varchar_
# 2010-11-13T22:05:09 length=763, found_semicolon
# 2010-11-13T22:05:09 #22 0x08294344 in dispatch_command (command=COM_QUERY, thd=0xbb4df50, packet=0xbb542c9 "", packet_length=767) at sql_parse.cc:1209
# 2010-11-13T22:05:09 #23 0x082937f6 in do_command (thd=0xbb4df50) at sql_parse.cc:902
# 2010-11-13T22:05:09 #24 0x082907ac in handle_
# 2010-11-13T22:05:09 #25 0x00bea919 in start_thread () from /lib/libpthread
# 2010-11-13T22:05:09 #26 0x00b2ccbe in clone () from /lib/libc.so.6
bug is not reproducible with the original test case. Not reproducible with MyISAM or FOCE KEY.
Changed in maria: | |
milestone: | none → 5.3 |
summary: |
- mysqld: sql_join_cache.cc:2388: virtual enum_nested_loop_state - JOIN_CACHE::join_null_complements(bool): Assertion - `join_tab->first_inner' failed with join_cache_level=4, - outer_join_with_cache=on + table elimination does not adjust the nested join structure when + eliminating tables |
Changed in maria: | |
assignee: | nobody → Sergey Petrunia (sergefp) |
summary: |
- table elimination does not adjust the nested join structure when - eliminating tables + Elimination of a table results in an invalid execution plan |
Changed in maria: | |
status: | Confirmed → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
bzr version-info:
revision-id: <email address hidden>
date: 2010-11-13 07:47:43 -0800
build-date: 2010-11-14 11:03:28 +0200
revno: 2856
branch-nick: maria-5.3-mwl128