Crash when updating multiple equality const-ness during constant table optimization in make_join_statistics
Bug #776285 reported by
Timour Katchaounov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Undecided
|
Igor Babaev |
Bug Description
The following test case extracted from the test for LP BUG#715759
results in a crash (NULL pointer):
CREATE TABLE t1 (a1 int, a2 int) ;
INSERT INTO t1 VALUES (1, 2);
INSERT INTO t1 VALUES (3, 4);
CREATE TABLE t2 (b1 int, b2 int) ;
INSERT INTO t2 VALUES (1, 2);
SELECT b1 FROM t2 WHERE b1 = b2;
Changed in maria: | |
status: | New → Confirmed |
status: | Confirmed → Fix Committed |
Changed in maria: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The stack trace is:
#0 0x000000000060b4e5 in Item_func: :Item_func (this=0x44b5870, a=0x44b4ac0, b=0x0) at item_func.h:82 func::Item_ int_func (this=0x44b5870, a=0x44b4ac0, b=0x0) at item_func.h:402 func2:: Item_bool_ func2 (this=0x44b5870, a=0x44b4ac0, b=0x0) at item_cmpfunc.h:356 rowready_ func2:: Item_bool_ rowready_ func2 (this=0x44b5870, a=0x44b4ac0, b=0x0) at item_cmpfunc.h:389 eq::Item_ func_eq (this=0x44b5870, a=0x44b4ac0, b=0x0) at item_cmpfunc.h:494 :add_const (this=0x44b4ee0, c=0x44b4ac0, f=0x0) at item_cmpfunc. cc:5621 :update_ const (this=0x44b4ee0) at item_cmpfunc. cc:5750 const_equal_ items (cond=0x44b4ee0, tab=0x44b5108) at sql_select.cc:10349 const_table (tab=0x44b5108, pos=0x44ca028) at sql_select.cc:14374 statistics (join=0x44c7100, tables_ arg=0x44b4620, conds=0x44b4ee0, keyuse_ array=0x44cd098 ) at sql_select.cc:3023
#1 0x000000000060b5db in Item_int_
#2 0x000000000060be35 in Item_bool_
#3 0x000000000060c0d9 in Item_bool_
#4 0x000000000060c3a7 in Item_func_
#5 0x000000000060a434 in Item_equal:
#6 0x000000000060a6c1 in Item_equal:
#7 0x000000000073f9dc in update_
#8 0x0000000000749a9f in join_read_
#9 0x000000000072dd4f in make_join_
#10 0x0000000000726c23 in JOIN::optimize (this=0x44c7100) at sql_select.cc:992