item_subselect.cc:4285: Ordered_key::Ordered_key(uint, TABLE*, Item*, ha_rows, ha_rows, ha_rows, uchar*): Assertion `tbl->file->stats.records > null_count' failed in maria-5.3-mwl89
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Invalid
|
Undecided
|
Timour Katchaounov |
Bug Description
Not reproducible in maria-5.3
Query:
SELECT alias1.f3 FROM t2 AS alias1
WHERE ( alias1.f3 , alias1.f2 ) NOT IN (
SELECT SQ1_t2.f3 , SQ1_t1.f3
FROM t2 AS SQ1_t1 JOIN
( t2 AS SQ1_t2 JOIN t1 AS SQ1_t3 ON SQ1_t3.f3 = SQ1_t2.f2 )
ON SQ1_t3.f2 = SQ1_t2.f2
assertion:
mysqld: item_subselect.
backtrace:
#8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
#9 0x0823ad3a in Ordered_
min_
row_
#10 0x0823c0f9 in subselect_
#11 0x0823a9d4 in subselect_
#12 0x0823243b in Item_subselect:
#13 0x0823263a in Item_in_
#14 0x08233f90 in Item_in_
#15 0x081d1670 in Item::val_
#16 0x081fd14a in Item_in_
#17 0x081bb0f2 in Item::val_bool (this=0x9502380) at item.cc:187
#18 0x081f93a3 in Item_func_
#19 0x08321e1c in evaluate_
#20 0x08321a80 in sub_select (join=0x9506a68, join_tab=0x9502ba0, end_of_
#21 0x08320e7c in do_select (join=0x9506a68, fields=0x9488af4, table=0x0, procedure=0x0) at sql_select.cc:12686
#22 0x083071f5 in JOIN::exec (this=0x9506a68) at sql_select.cc:2340
#23 0x08307961 in mysql_select (thd=0x94870e8, rref_pointer_
group=0x0, having=0x0, proc_param=0x0, select_
#24 0x0830004d in handle_select (thd=0x94870e8, lex=0x9488768, result=0x95021a0, setup_tables_
#25 0x0829d91b in execute_
#26 0x08294423 in mysql_execute_
#27 0x0829feac in mysql_parse (thd=0x94870e8,
rawbuf=
#28 0x08291f0c in dispatch_command (command=COM_QUERY, thd=0x94870e8, packet=0x949f789 "", packet_length=217) at sql_parse.cc:1209
#29 0x08291376 in do_command (thd=0x94870e8) at sql_parse.cc:902
#30 0x0828e454 in handle_
#31 0x00821919 in start_thread () from /lib/libpthread
#32 0x0076acce in clone () from /lib/libc.so.6
explain:
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY alias1 ALL NULL NULL NULL NULL 13 Using where
2 SUBQUERY SQ1_t1 ALL NULL NULL NULL NULL 13
2 SUBQUERY SQ1_t2 ALL NULL NULL NULL NULL 13
2 SUBQUERY SQ1_t3 ref f2 f2 5 test.SQ1_t2.f2 2 Using index condition; Using where
test case:
SET SESSION join_cache_level=0;
SET SESSION optimizer_
CREATE TABLE t2 (
f1 int,
f2 varchar(32),
f3 varchar(32)) ;
INSERT IGNORE INTO t2 VALUES ('3','j'
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
f2 int,
f3 int,
KEY (f2)) ;
INSERT IGNORE INTO t1 VALUES ('0','0'
EXPLAIN SELECT alias1.f3 FROM t2 AS alias1
WHERE ( alias1.f3 , alias1.f2 ) NOT IN (
SELECT SQ1_t2.f3 , SQ1_t1.f3
FROM t2 AS SQ1_t1 JOIN
( t2 AS SQ1_t2 JOIN t1 AS SQ1_t3 ON SQ1_t3.f3 = SQ1_t2.f2 )
ON SQ1_t3.f2 = SQ1_t2.f2
);
SELECT alias1.f3 FROM t2 AS alias1
WHERE ( alias1.f3 , alias1.f2 ) NOT IN (
SELECT SQ1_t2.f3 , SQ1_t1.f3
FROM t2 AS SQ1_t1 JOIN
( t2 AS SQ1_t2 JOIN t1 AS SQ1_t3 ON SQ1_t3.f3 = SQ1_t2.f2 )
ON SQ1_t3.f2 = SQ1_t2.f2
);
Related branches
Changed in maria: | |
milestone: | none → 5.3 |
assignee: | nobody → Timour Katchaounov (timour) |
This is a duplicate of BUG#680058, which has been fixed in 5.3.
The fix will appear in 5.3-mwl89 after the next merge.