summaryrefslogtreecommitdiff
path: root/sql/opt_range.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-06-18 11:30:06 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-06-18 11:30:06 +0300
commit3c88ce4cd112f696002d5f7461db68a3dafeb838 (patch)
tree8860f823877b8d816fbca45d9e6926bcbc8f012d /sql/opt_range.h
parent44d06cd39df2bdde6f7ac31d5340f1f683683c99 (diff)
parente85e4814eeca9123b23c23b40dd776416bfba2ca (diff)
downloadmariadb-git-3c88ce4cd112f696002d5f7461db68a3dafeb838.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/opt_range.h')
-rw-r--r--sql/opt_range.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/opt_range.h b/sql/opt_range.h
index ae0e3822272..73def7bde92 100644
--- a/sql/opt_range.h
+++ b/sql/opt_range.h
@@ -459,8 +459,9 @@ public:
uint res= key_tree->store_min(key[key_tree->part].store_length,
range_key, *range_key_flag);
// add flags only if a key_part is written to the buffer
- if (res)
- *range_key_flag|= key_tree->min_flag;
+ if (!res)
+ return 0;
+ *range_key_flag|= key_tree->min_flag;
if (key_tree->next_key_part &&
key_tree->next_key_part->type == SEL_ARG::KEY_RANGE &&
key_tree->part != last_part &&
@@ -482,8 +483,9 @@ public:
SEL_ARG *key_tree= last();
uint res=key_tree->store_max(key[key_tree->part].store_length,
range_key, *range_key_flag);
- if (res)
- (*range_key_flag)|= key_tree->max_flag;
+ if (!res)
+ return 0;
+ *range_key_flag|= key_tree->max_flag;
if (key_tree->next_key_part &&
key_tree->next_key_part->type == SEL_ARG::KEY_RANGE &&
key_tree->part != last_part &&