Assertion `!created && key_to_save < (int)s->keys' failed in st_table::use_index with derived_with_keys=ON, join_cache_level=8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Igor Babaev |
Bug Description
mysqld: table.cc:5376: void st_table:
#8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
#9 0x0831853e in st_table::use_index (this=0xae726378, key_to_save=0) at table.cc:5376
#10 0x083305f5 in JOIN::drop_
#11 0x0831c9ce in JOIN::optimize (this=0xae735b50) at sql_select.cc:1120
#12 0x081b6a72 in st_select_
#13 0x083e5623 in JOIN::optimize_
#14 0x0831e502 in JOIN::optimize (this=0xae72dfe0) at sql_select.cc:1621
#15 0x08322709 in mysql_select (thd=0xa1346e0, rref_pointer_
order=0x0, group=0x0, having=0x0, proc_param=0x0, select_
at sql_select.cc:2886
#16 0x0831a55f in handle_select (thd=0xa1346e0, lex=0xa135de4, result=0xae7141e0, setup_tables_
#17 0x082b4d18 in execute_
#18 0x082abad5 in mysql_execute_
#19 0x082b7347 in mysql_parse (thd=0xa1346e0,
rawbuf=
found_
#20 0x082a9724 in dispatch_command (command=COM_QUERY, thd=0xa1346e0,
packet=
at sql_parse.cc:1221
#21 0x082a8b7f in do_command (thd=0xa1346e0) at sql_parse.cc:916
#22 0x082a5b63 in handle_
#23 0x00821919 in start_thread () from /lib/libpthread
#24 0x0076acce in clone () from /lib/libc.so.6
EXPLAIN crashes.
minimal switch: derived_
full switch: index_merge=
bzr version-info
revision-id: <email address hidden>
date: 2011-10-23 05:46:03 -0700
build-date: 2011-10-24 12:04:51 +0300
revno: 3248
branch-nick: maria-5.3
test case:
CREATE TABLE t1 (a int, b varchar(1)) ;
CREATE TABLE t2 (a int, b varchar(1)) ;
INSERT INTO t2 VALUES (9,NULL),(6,'r');
CREATE TABLE t3 (a int(11));
INSERT INTO t3 VALUES (1);
CREATE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3;
SET SESSION optimizer_switch = 'derived_
SET SESSION join_cache_level = 8;
SELECT *
FROM t1
WHERE t1.b <> ANY (
SELECT t2.b
FROM t2
LEFT JOIN v3 ON ( v3.a = t2.a )
);
Changed in maria: | |
assignee: | nobody → Igor Babaev (igorb-seattle) |
milestone: | none → 5.3 |
Changed in maria: | |
status: | New → Confirmed |
importance: | Undecided → Critical |
Changed in maria: | |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
The following query returns an unexpected result:
MariaDB [test]> SELECT t2.b FROM t2 LEFT JOIN v3 ON v3.a = t2.a;
ERROR 1030 (HY000): Got error 124 from storage engine
We have the same problems with SET SESSION join_cache_level = 4;