Fix for Bug#49506 Valgrind error in make_cond_for_table_from_pred
This fix has been proposed by Sergey Petrunya and has been contributed under SCA by sca@askmonty.org. The cause for this valgrind error is that in the function add_cond_and_fix() in sql_select.cc an Item_cond_and object is created. This is marked as fixed but does not have a correct table_map() attribute. Later, in make_join_select(), if engine_condition_pushdown is in use, this table map is used and results in the valgrind error. The fix is to add a call to update_used_tables() in add_cond_and_fix() so that the table map is updated correctly. This patch is tested by multiple existing tests (e.g. the tests innodb_mysql, innodb, fulltext, compress all produces this valgrind warning/error without this fix). sql/sql_select.cc: In add_cond_and_fix() add a call to update_used_tables() to ensure the table map is updated.
This commit is contained in:
parent
3a733bb4d8
commit
9060aa68af
@ -5859,6 +5859,7 @@ inline void add_cond_and_fix(Item **e1, Item *e2)
|
||||
{
|
||||
*e1= res;
|
||||
res->quick_fix_field();
|
||||
res->update_used_tables();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user