diff options
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 36ce86fca29..d596d87b703 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -335,7 +335,8 @@ bool Item_subselect::enumerate_field_refs_processor(void *arg) while ((upper= it++)) { - if (upper->item->walk(&Item::enumerate_field_refs_processor, FALSE, arg)) + if (upper->item && + upper->item->walk(&Item::enumerate_field_refs_processor, FALSE, arg)) return TRUE; } return FALSE; @@ -3416,7 +3417,8 @@ bool Item_in_subselect::init_cond_guards() { DBUG_ASSERT(thd); uint cols_num= left_expr->cols(); - if (!abort_on_null && left_expr->maybe_null && !pushed_cond_guards) + if (!abort_on_null && !pushed_cond_guards && + (left_expr->maybe_null || cols_num > 1)) { if (!(pushed_cond_guards= (bool*)thd->alloc(sizeof(bool) * cols_num))) return TRUE; |