1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-18945 Assertion `fixed == 1' failed in Item_cond_and::val_int

In the function make_cond_for_table_from_pred a call of ix_fields()
missed checking of the return code. As a result an extracted constant
condition could be not well formed and this caused an assertion failure.
This commit is contained in:
Igor Babaev
2019-03-16 15:08:17 -07:00
parent 1f020299f8
commit 5e044f78c0
3 changed files with 34 additions and 1 deletions

View File

@ -20614,7 +20614,8 @@ make_cond_for_table_from_pred(THD *thd, Item *root_cond, Item *cond,
the new parent Item. This should not be expensive because all
children of Item_cond_and should be fixed by now.
*/
new_cond->fix_fields(thd, 0);
if (new_cond->fix_fields(thd, 0))
return (COND*) 0;
new_cond->used_tables_cache=
((Item_cond_and*) cond)->used_tables_cache &
tables;