1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Bug#40389: REORGANIZE PARTITION crashes when only using one partition

The non documented command 'ALTER PARTITION t REORGANIZE PARTITION'
(without any partitions!) which only make sense for nativly
partitioned engines, such as NDB, crashes the server if there was
no change of number of partitions.

The problem was wrong usage of fast_end_partition function,
which led to usage of a non initialized variable.
This commit is contained in:
Mattias Jonsson
2008-12-02 11:18:01 +01:00
parent 54eaadf01c
commit 8f39d2584b
4 changed files with 21 additions and 3 deletions

View File

@@ -4228,9 +4228,8 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
after the change as before. Thus we can reply ok immediately
without any changes at all.
*/
DBUG_RETURN(fast_end_partition(thd, ULL(0), ULL(0),
table, NULL,
TRUE, NULL, FALSE));
*fast_alter_partition= TRUE;
DBUG_RETURN(FALSE);
}
else if (new_part_no > curr_part_no)
{