[MDEV-2418] LP:962667 - Assertion `0' failed in QUICK_INDEX_SORT_SELECT::need_sorted_output() with index_merge+index_merge_sort_union+loosescan+semijoin, IN subquery, InnoDB Created: 2012-03-22 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 | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Query: mysqld: opt_range.h:584: virtual void QUICK_INDEX_SORT_SELECT::need_sorted_output(): Assertion `0' failed. #8 0xb748e014 in __assert_fail () from /lib/libc.so.6 bzr version-info This particular test case passes on MariaDB 5.5 (revno 3345), but I have a bigger one which fails with the same assertion. Minimal optimizer_switch: index_merge=on,index_merge_sort_union=on,loosescan=on,semijoin=on EXPLAIN also fails. Test case: --source include/have_innodb.inc CREATE TABLE t1 ( INSERT INTO t1 VALUES CREATE TABLE t2 ( INSERT INTO t2 VALUES SELECT * FROM t1 WHERE b IN (
|
| Comments |
| Comment by Sergei Petrunia [ 2012-03-23 ] |
|
Re: Assertion `0' failed in QUICK_INDEX_SORT_SELECT::need_sorted_output() with index_merge+index_merge_sort_union+loosescan+semijoin, IN subquery, InnoDB The failure scenario is as follows: > best_access_path(idx=0, table=t2) > considers ref access
> then consider full scan/range accesses
> advance_sj_state The problem is that subsequent code assumes that tab->type==JT_ALL && And eventually we crash with an assert because QUICK_SORT_INTERSECT_SELECT is |
| Comment by Sergei Petrunia [ 2012-03-23 ] |
|
Re: Assertion `0' failed in QUICK_INDEX_SORT_SELECT::need_sorted_output() with index_merge+index_merge_sort_union+loosescan+semijoin, IN subquery, InnoDB |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-03 ] |
|
Launchpad bug id: 962667 |