1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Fixes during review of new code

- Mostly indentation fixes
- Added missing test
- Ensure that Item_func_case() checks for stack overruns
- Use real_item() instead of (Item_ref*) item
- Fixed wrong error handling
This commit is contained in:
monty@mysql.com
2005-07-04 03:42:33 +03:00
parent e4bb8377c7
commit ec420bfb43
26 changed files with 443 additions and 313 deletions

View File

@ -3528,15 +3528,12 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
{
/* Optimize NOT BETWEEN and NOT IN */
Item *arg= cond_func->arguments()[0];
if (arg->type() == Item::FUNC_ITEM)
{
cond_func= (Item_func*) arg;
if (cond_func->select_optimize() == Item_func::OPTIMIZE_NONE)
DBUG_RETURN(0);
inv= TRUE;
}
else
if (arg->type() != Item::FUNC_ITEM)
DBUG_RETURN(0);
cond_func= (Item_func*) arg;
if (cond_func->select_optimize() == Item_func::OPTIMIZE_NONE)
DBUG_RETURN(0);
inv= TRUE;
}
else if (cond_func->select_optimize() == Item_func::OPTIMIZE_NONE)
DBUG_RETURN(0);
@ -8153,7 +8150,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::get_next()
(have_max && have_min && (max_res == 0)));
}
/*
If this is a just a GROUP BY or DISTINCT without MIN or MAX and there
If this is just a GROUP BY or DISTINCT without MIN or MAX and there
are equality predicates for the key parts after the group, find the
first sub-group with the extended prefix.
*/