diff options
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 8cff6a1e6c8..e87db62bd98 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -2048,6 +2048,7 @@ Item_in_subselect::create_single_in_to_exists_cond(JOIN *join, We can encounter "NULL IN (SELECT ...)". Wrap the added condition within a trig_cond. */ + disable_cond_guard_for_const_null_left_expr(0); item= new Item_func_trig_cond(item, get_cond_guard(0)); } @@ -2072,6 +2073,7 @@ Item_in_subselect::create_single_in_to_exists_cond(JOIN *join, having= new Item_is_not_null_test(this, having); if (left_expr->maybe_null) { + disable_cond_guard_for_const_null_left_expr(0); if (!(having= new Item_func_trig_cond(having, get_cond_guard(0)))) DBUG_RETURN(true); @@ -2090,6 +2092,7 @@ Item_in_subselect::create_single_in_to_exists_cond(JOIN *join, */ if (!abort_on_null && left_expr->maybe_null) { + disable_cond_guard_for_const_null_left_expr(0); if (!(item= new Item_func_trig_cond(item, get_cond_guard(0)))) DBUG_RETURN(true); } @@ -2116,6 +2119,7 @@ Item_in_subselect::create_single_in_to_exists_cond(JOIN *join, (char *)"<result>")); if (!abort_on_null && left_expr->maybe_null) { + disable_cond_guard_for_const_null_left_expr(0); if (!(new_having= new Item_func_trig_cond(new_having, get_cond_guard(0)))) DBUG_RETURN(true); @@ -2311,6 +2315,7 @@ Item_in_subselect::create_row_in_to_exists_cond(JOIN * join, Item *col_item= new Item_cond_or(item_eq, item_isnull); if (!abort_on_null && left_expr->element_index(i)->maybe_null) { + disable_cond_guard_for_const_null_left_expr(i); if (!(col_item= new Item_func_trig_cond(col_item, get_cond_guard(i)))) DBUG_RETURN(true); } @@ -2325,6 +2330,7 @@ Item_in_subselect::create_row_in_to_exists_cond(JOIN * join, (char *)"<list ref>")); if (!abort_on_null && left_expr->element_index(i)->maybe_null) { + disable_cond_guard_for_const_null_left_expr(i); if (!(item_nnull_test= new Item_func_trig_cond(item_nnull_test, get_cond_guard(i)))) DBUG_RETURN(true); @@ -2381,6 +2387,7 @@ Item_in_subselect::create_row_in_to_exists_cond(JOIN * join, item= new Item_cond_or(item, item_isnull); if (left_expr->element_index(i)->maybe_null) { + disable_cond_guard_for_const_null_left_expr(i); if (!(item= new Item_func_trig_cond(item, get_cond_guard(i)))) DBUG_RETURN(true); if (!(having_col_item= |