summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-06-28 15:06:16 +0300
committerunknown <monty@mysql.com>2005-06-28 15:06:16 +0300
commit05c7edf64801efa5b0d99ca779eb0b31a4d92462 (patch)
treebf56a30c6bb6b1807ab7d923cca1960af81c0459 /sql/opt_range.cc
parent2776aa35b7abc4c0f742eaa94c04b4072e2ba83d (diff)
downloadmariadb-git-05c7edf64801efa5b0d99ca779eb0b31a4d92462.tar.gz
Move reset of insert_values to ensure it's done also during error conditions
This fixed a failure of insert_update.test on some platforms mysys/thr_alarm.c: Fixed problem noticed by valgrind sql/opt_range.cc: Simple optimization for common case sql/sql_base.cc: Safety assert sql/sql_insert.cc: Added comment
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 9f268804cc3..2dd097cbaab 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -981,8 +981,7 @@ get_mm_parts(PARAM *param, COND *cond_func, Field *field,
SEL_TREE *tree2= get_mm_parts(param, cond_func,
field, Item_func::GT_FUNC,
value, cmp_type);
- if (!tree2)
- DBUG_RETURN(0);
+ /* tree_or() will return 0 if tree2 is 0 */
tree= tree_or(param,tree,tree2);
}
DBUG_RETURN(tree);