MDEV-33665: MSAN failure due to uninitialized Item_func::not_null_tables_cache
eliminate_item_equal() uses quick_fix_field() for Item objects it creates. It computes some of their attributes on its own (see update_used_tables() call) but it doesn't update not_null_tables_cache. Recompute not_null_tables_cache also. Not computing it is currently harmless, except for producing MSAN error when some other code propagates the wrong value of not_null_tables_cache to other item.
This commit is contained in:
parent
49cf702ee5
commit
9d5a8bd663
@ -16209,6 +16209,7 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
|
|||||||
|
|
||||||
if (!eq_item || eq_item->set_cmp_func(thd))
|
if (!eq_item || eq_item->set_cmp_func(thd))
|
||||||
return 0;
|
return 0;
|
||||||
|
eq_item->eval_not_null_tables(0);
|
||||||
eq_item->quick_fix_field();
|
eq_item->quick_fix_field();
|
||||||
}
|
}
|
||||||
current_sjm= field_sjm;
|
current_sjm= field_sjm;
|
||||||
@ -16266,6 +16267,7 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
|
|||||||
{
|
{
|
||||||
res->quick_fix_field();
|
res->quick_fix_field();
|
||||||
res->update_used_tables();
|
res->update_used_tables();
|
||||||
|
res->eval_not_null_tables(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user