Crash in Field::eq in maria-5.3 and NOT NULL fields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Igor Babaev |
Bug Description
Not repeatable in maria-5.2. The following query:
SELECT * FROM t1 LEFT JOIN v2 ON t1.f10 != 0 WHERE v2.f1 = v2.f3 AND v2.f1 = 68 AND v2.f1 IS NULL
crashes as follows:
#3 0x08289e44 in handle_segfault (sig=11) at mysqld.cc:2774
#4 <signal handler called>
#5 0x082698f6 in Field::eq (this=0xae61ae60, field=0x8f8f8f00) at field.h:236
#6 0x0820f900 in Item_equal:
#7 0x081ccb68 in Item_field:
#8 0x081ccd9f in Item_field:
#9 0x081d939c in Item::compile (this=0xae613550, analyzer=&virtual Item::subst_
transformer
#10 0x081eb195 in Item_func::compile (this=0xae613660, analyzer=&virtual table offset 336, arg_p=0xae99ee8c, transformer=
arg_
#11 0x0832082e in build_equal_
#12 0x08320433 in build_equal_
#13 0x083208a5 in build_equal_items (thd=0xb101da8, cond=0xae623870, inherited=0x0, join_list=
#14 0x083233f1 in optimize_cond (join=0xae625140, conds=0xae623870, join_list=
#15 0x08309d7c in JOIN::optimize (this=0xae625140) at sql_select.cc:855
#16 0x0830fd2d in mysql_select (thd=0xb101da8, rref_pointer_
order=0x0, group=0x0, having=0x0, proc_param=0x0, select_
at sql_select.cc:2687
#17 0x0830860f in handle_select (thd=0xb101da8, lex=0xb10344c, result=0xae614e88, setup_tables_
#18 0x082a5954 in execute_
#19 0x0829c79e in mysql_execute_
#20 0x082a7ef7 in mysql_parse (thd=0xb101da8,
rawbuf=
found_
#21 0x0829a427 in dispatch_command (command=COM_QUERY, thd=0xb101da8,
packet=
at sql_parse.cc:1215
#22 0x08299885 in do_command (thd=0xb101da8) at sql_parse.cc:904
#23 0x08296938 in handle_
#24 0x00821919 in start_thread () from /lib/libpthread
#25 0x0076acce in clone () from /lib/libc.so.6
test case:
CREATE TABLE t1 ( f10 int NOT NULL ) ;
INSERT IGNORE INTO t1 VALUES (2),(2);
DROP TABLE IF EXISTS t2;
CREATE TABLE t2 ( f1 int NOT NULL , f3 int NOT NULL ) ;
INSERT INTO t2 VALUES (2,2),(2,2);
CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2;
SELECT * FROM t1 LEFT JOIN v2 ON t1.f10 != 0 WHERE v2.f1 = v2.f3 AND v2.f1 = 68 AND v2.f1 IS NULL;
bzr version-info
revision-id: <email address hidden>
date: 2011-05-04 18:08:44 -0700
build-date: 2011-05-05 13:56:40 +0300
revno: 2980
branch-nick: maria-5.3
Changed in maria: | |
milestone: | none → 5.3 |
assignee: | nobody → Igor Babaev (igorb-seattle) |
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 |
Also observed without IS NULL