summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@mysql.com>2009-11-04 09:30:52 +0100
committerMikael Ronstrom <mikael@mysql.com>2009-11-04 09:30:52 +0100
commit16b603a8b0c2bba16cb66b1769f21c0185435d33 (patch)
treefaf313876dd5c3611ec13dd9376602af54c75e27 /sql/sql_partition.cc
parent092cf82871a783286033c19193d64c23d975a615 (diff)
downloadmariadb-git-16b603a8b0c2bba16cb66b1769f21c0185435d33.tar.gz
Fixed a use of non-initialised variable, cannot use NULL flags if RANGE == NO_MAX_RANGE or NO_MIN_RANGE, so need to check NULL flags after checking the RANGE isn't NO_MAX_RANGE
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index bec8c0e9b0c..978628aed41 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -7382,7 +7382,7 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
{
part_iter->ret_null_part= part_iter->ret_null_part_orig= TRUE;
part_iter->part_nums.start= part_iter->part_nums.cur= 0;
- if (*max_value && !(flags & NO_MAX_RANGE))
+ if (!(flags & NO_MAX_RANGE) && *max_value)
{
/* The right bound is X <= NULL, i.e. it is a "X IS NULL" interval */
part_iter->part_nums.end= 0;