mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
BUG#19801: Problems with single partition with only NULL allowed in LIST partitioning
After review fix sql/partition_info.cc: After review fix
This commit is contained in:
parent
10c5b8b6fd
commit
a4c2d33ed9
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue