summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorunknown <mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se>2006-06-14 08:35:19 -0400
committerunknown <mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se>2006-06-14 08:35:19 -0400
commita4c2d33ed976de778f1ff526b6d524a3ffe844c9 (patch)
tree0b9a7ac83c23fa169aaabc77421884d134fd505d /sql/partition_info.cc
parent10c5b8b6fd63365d5d3812964912752a6a89510b (diff)
downloadmariadb-git-a4c2d33ed976de778f1ff526b6d524a3ffe844c9.tar.gz
BUG#19801: Problems with single partition with only NULL allowed in LIST partitioning
After review fix sql/partition_info.cc: After review fix
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 6e3023289d8..988c24ae344 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -567,7 +567,6 @@ bool partition_info::check_list_constants()
uint i;
uint list_index= 0;
longlong *list_value;
- bool not_first;
bool result= TRUE;
longlong curr_value, prev_value;
partition_element* part_def;
@@ -634,19 +633,19 @@ bool partition_info::check_list_constants()
if (no_list_values)
{
+ bool first= TRUE;
qsort((void*)list_array, no_list_values, sizeof(LIST_PART_ENTRY),
&list_part_cmp);
- not_first= FALSE;
i= prev_value= 0; //prev_value initialised to quiet compiler
do
{
DBUG_ASSERT(i < no_list_values);
curr_value= list_array[i].list_value;
- if (likely(!not_first || prev_value != curr_value))
+ if (likely(first || prev_value != curr_value))
{
prev_value= curr_value;
- not_first= TRUE;
+ first= FALSE;
}
else
{