Commit 0ba4b082 authored by igor@rurik.mysql.com's avatar igor@rurik.mysql.com

sql_select.cc:

  Fixed a problem a with special cases of IS NULL usage
  caused by some erroneous change made when Item_equal
  was introduced.
parent e235d796
......@@ -5152,8 +5152,7 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value)
}
}
else if (cond->type() == Item::FUNC_ITEM &&
((Item_func*) cond)->functype() == Item_func::ISNULL_FUNC &&
!cond->const_item())
((Item_func*) cond)->functype() == Item_func::ISNULL_FUNC)
{
/*
Handles this special case for some ODBC applications:
......@@ -5203,6 +5202,11 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value)
}
}
}
if (cond->const_item())
{
*cond_value= eval_const_cond(cond) ? Item::COND_TRUE : Item::COND_FALSE;
return (COND*) 0;
}
}
else if (cond->type() == Item::FUNC_ITEM &&
((Item_func*) cond)->functype() == Item_func::MULT_EQUAL_FUNC)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment