Assertion `fixed == 1' failed in Item_func_eq::val_int() with semijoin + materialization + max_join_size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Sergey Petrunia |
Bug Description
This particular example uses max_join_size=10 for brevity, however the issue has been observed with max_join_
mysqld: item_cmpfunc.
#8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
#9 0x0820e94e in Item_func_
#10 0x081f3d6f in eval_const_cond (cond=0xae750230) at item_func.cc:63
#11 0x083377ce in remove_eq_conds (thd=0xac9e6e0, cond=0xae750230, cond_value=
#12 0x083372c5 in remove_eq_conds (thd=0xac9e6e0, cond=0xae750650, cond_value=
#13 0x083371c3 in optimize_cond (join=0xae738188, conds=0xae750650, join_list=
#14 0x0831b920 in JOIN::optimize (this=0xae738188) at sql_select.cc:975
#15 0x08321e11 in mysql_select (thd=0xac9e6e0, rref_pointer_
order=0x0, group=0x0, having=0x0, proc_param=0x0, select_
at sql_select.cc:2886
#16 0x08319c67 in handle_select (thd=0xac9e6e0, lex=0xac9fde4, result=0xae72fe80, setup_tables_
#17 0x082b4434 in execute_
#18 0x082ab1f1 in mysql_execute_
#19 0x082b6a63 in mysql_parse (thd=0xac9e6e0,
rawbuf=
#20 0x082a8e40 in dispatch_command (command=COM_QUERY, thd=0xac9e6e0,
packet=
#21 0x082a829b in do_command (thd=0xac9e6e0) at sql_parse.cc:916
#22 0x082a527f in handle_
#23 0x00821919 in start_thread () from /lib/libpthread
#24 0x0076acce in clone () from /lib/libc.so.6
explain also crashes.
minimal optimizer switch: semijoin=
full optimizer switch: index_merge=
test case:
CREATE TABLE t1 ( f2 int) ;
CREATE TABLE t2 ( f1 int, f3 int, f4 varchar(3), f5 varchar(35)) ;
INSERT INTO t2 VALUES (4057,9,
CREATE TABLE t3 ( f3 int, f4 varchar(3)) ;
INSERT INTO t3 VALUES (86,'USA');
CREATE TABLE t4 ( f3 int, f4 varchar(3), f5 varchar(52)) ;
INSERT INTO t4 VALUES (0,'RUS'
CREATE TABLE t5 ( f2 int) ;
CREATE TABLE t6 ( f4 varchar(3));
INSERT INTO t6 VALUES ('RUS'),('USA');
SET SESSION max_join_size=10;
SET SESSION optimizer_
SELECT *
FROM t1
WHERE ( 1 , 3 ) IN (
SELECT t2.f1 , MAX( t3.f3 )
FROM t2
JOIN t3
WHERE t3.f4 IN (
)
) AND ( 'p' , 'k' ) IN (
SELECT f4 , f4 FROM t6
);
bzr version-info
revision-id: <email address hidden>
date: 2011-09-27 17:40:04 +0300
build-date: 2011-09-28 08:43:25 +0300
revno: 3197
branch-nick: maria-5.3
Changed in maria: | |
milestone: | none → 5.3 |
assignee: | nobody → Sergey Petrunia (sergefp) |
Changed in maria: | |
importance: | Undecided → High |
Changed in maria: | |
status: | New → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |