diff options
author | Igor Babaev <igor@askmonty.org> | 2019-03-16 15:08:17 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-03-16 15:08:17 -0700 |
commit | 5e044f78c0a9a8cd40dedff0e4bc857c0bd76b95 (patch) | |
tree | c2dac6313da1f5ae82ff2b812cc87b59bea786f4 /sql/sql_select.cc | |
parent | 1f020299f816263e347c852eb2a494b5ef1cbf0d (diff) | |
download | mariadb-git-5e044f78c0a9a8cd40dedff0e4bc857c0bd76b95.tar.gz |
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.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 1dfd6520e17..6253c39b777 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -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; |