summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-07-04 03:42:33 +0300
committerunknown <monty@mysql.com>2005-07-04 03:42:33 +0300
commit306ebf7b1c1b26b45e93fbcbbf248b3479142c41 (patch)
tree502bf1c54d87aaf8e4cafea943108c20d146cacc /sql/opt_range.cc
parent1aa6343fe8d9a1d61aa7fcd4246fb5858b3dfa16 (diff)
downloadmariadb-git-306ebf7b1c1b26b45e93fbcbbf248b3479142c41.tar.gz
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 myisam/mi_unique.c: Improved comments myisam/myisampack.c: Updated version number mysql-test/r/group_by.result: Added test that was lost during earlier merge mysql-test/r/information_schema.result: Safety fix: Drop procedures before used mysql-test/t/group_by.test: Added test that was lost during earlier merge mysql-test/t/information_schema.test: Safety fix: Drop procedures before used mysys/hash.c: Updated comment sql/field.cc: false -> FALSE sql/ha_ndbcluster.cc: Fix some style issues - No () around argument to 'case' - Space before ( in switch and if - Removed 'goto' - Added {} - Added () to make expressions easier to read - my_snprintf -> strmov sql/handler.cc: if( -> if ( sql/item.cc: Indentation changes sql/item.h: false -> FALSE sql/item_cmpfunc.cc: Ensure that Item_func_case() check for stack overrun properly sql/item_cmpfunc.h: Ensure that Item_func_case() check for stack overrun properly sql/item_func.cc: Indentation fixes Fixed wrong goto label sql/mysqld.cc: Remove test for opt_disable_networking as this flag can never be set here sql/opt_range.cc: Simplify code sql/sql_class.h: Move define out from middle of class definition sql/sql_parse.cc: Remove extra empty lines sql/sql_select.cc: use real_item() instead of (Item_ref*) item Modifed function comment to be align with others Simple optimization sql/sql_union.cc: Portability fix: Don't use 'bool_variable|=...' sql/sql_view.cc: Move List_iterator_fast out from loops (rewind is faster than creating a new itearator) strings/ctype-utf8.c: if( -> if ( strings/ctype.c: Remove disabled code strings/decimal.c: Indentation fixes strings/xml.c: Indentation fixes
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 05028c4e2a5..65db1a290f6 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -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.
*/