mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
5.3-merge
This commit is contained in:
@@ -3605,6 +3605,9 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
|
||||
{
|
||||
conds->update_used_tables();
|
||||
conds= remove_eq_conds(join->thd, conds, &join->cond_value);
|
||||
if (conds && conds->type() == Item::COND_ITEM &&
|
||||
((Item_cond*) conds)->functype() == Item_func::COND_AND_FUNC)
|
||||
join->cond_equal= &((Item_cond_and*) conds)->cond_equal;
|
||||
join->select_lex->where= conds;
|
||||
if (join->cond_value == Item::COND_FALSE)
|
||||
{
|
||||
@@ -13594,7 +13597,10 @@ optimize_cond(JOIN *join, COND *conds,
|
||||
Remove all and-levels where CONST item != CONST item
|
||||
*/
|
||||
DBUG_EXECUTE("where",print_where(conds,"after const change", QT_ORDINARY););
|
||||
conds= remove_eq_conds(thd, conds, cond_value) ;
|
||||
conds= remove_eq_conds(thd, conds, cond_value);
|
||||
if (conds && conds->type() == Item::COND_ITEM &&
|
||||
((Item_cond*) conds)->functype() == Item_func::COND_AND_FUNC)
|
||||
join->cond_equal= &((Item_cond_and*) conds)->cond_equal;
|
||||
DBUG_EXECUTE("info",print_where(conds,"after remove", QT_ORDINARY););
|
||||
}
|
||||
DBUG_RETURN(conds);
|
||||
|
||||
Reference in New Issue
Block a user