BUG#21210: ALTER TABLE t1 REORGANIZE PARTITION crashes when using InnoDB
Inserted wrong handlers into the new_file_array which later caused havoc in rename_partitions
This commit is contained in:
parent
e1c245bff3
commit
814b81ad6b
@ -1360,6 +1360,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
|
|||||||
i= 0;
|
i= 0;
|
||||||
part_count= 0;
|
part_count= 0;
|
||||||
orig_count= 0;
|
orig_count= 0;
|
||||||
|
first= TRUE;
|
||||||
part_it.rewind();
|
part_it.rewind();
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -1387,9 +1388,16 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
|
|||||||
DBUG_RETURN(ER_OUTOFMEMORY);
|
DBUG_RETURN(ER_OUTOFMEMORY);
|
||||||
}
|
}
|
||||||
} while (++j < no_subparts);
|
} while (++j < no_subparts);
|
||||||
|
if (part_elem->part_state == PART_CHANGED)
|
||||||
|
orig_count+= no_subparts;
|
||||||
|
else if (temp_partitions && first)
|
||||||
|
{
|
||||||
|
orig_count+= (no_subparts * temp_partitions);
|
||||||
|
first= FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} while (++i < no_parts);
|
} while (++i < no_parts);
|
||||||
|
first= FALSE;
|
||||||
/*
|
/*
|
||||||
Step 5:
|
Step 5:
|
||||||
Create the new partitions and also open, lock and call external_lock
|
Create the new partitions and also open, lock and call external_lock
|
||||||
|
Loading…
x
Reference in New Issue
Block a user