[MDEV-3654] LP:922254 - Assertion `0' failed at item_cmpfunc.cc:5899: Item* Item_equal::get_first(JOIN_TAB*, Item*) with semijoin+materialization on EXPLAIN Created: 2012-01-26 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
#8 0xb747c014 in __assert_fail () from /lib/libc.so.6 bzr version-info Also reproducible on revno 3390, but isn't reproducible on 3389. Minimal switch: semijoin=on,materialization=on Test case: SET optimizer_switch = 'semijoin=on,materialization=on'; CREATE TABLE t1 ( a VARCHAR(3) ); EXPLAIN |
| Comments |
| Comment by Elena Stepanova [ 2012-01-26 ] |
|
Re: Assertion `0' failed at item_cmpfunc.cc:5899: Item* Item_equal::get_first(JOIN_TAB*, Item*) with semijoin+materialization on EXPLAIN |
| Comment by Sergei Petrunia [ 2012-01-27 ] |
|
Re: Assertion `0' failed at item_cmpfunc.cc:5899: Item* Item_equal::get_first(JOIN_TAB*, Item*) with semijoin+materialization on EXPLAIN The system constructs a join order of: t1, i.e. alias1 (the const table) access to table alias3 is made via alias3.c = alias1.a This is correct: alias1.a is a constant, so this is a ref(const) access. The system then tries to perform equality substitution for "alias1.a" within Eventually, it will call this function: and reach this code: Item *const_item= item_equal->get_const(); and here we will have: (gdb) p item_equal->with_const ... which is surprising, considering that the item_equal consists of (in order): Eventually, we will reach Item* Item_equal::get_first(JOIN_TAB *context, Item *field_item) with context = { alias3 }and field_item= {t1.a}and there we will fail an assert because we were unable to find a member of |
| Comment by Sergei Petrunia [ 2012-01-27 ] |
|
Re: Assertion `0' failed at item_cmpfunc.cc:5899: Item* Item_equal::get_first(JOIN_TAB*, Item*) with semijoin+materialization on EXPLAIN |
| Comment by Rasmus Johansson (Inactive) [ 2012-02-20 ] |
|
Launchpad bug id: 922254 |