1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-28576 RENAME COLUMN with NOCOPY algorithm leads to corrupt partitioned table

10.5 part: test cases and comments.
The code is in the merge commit 74fe1c44aa

When f.ex. table is partitioned by HASH(a) and we rename column `a' to
`b' partitioning filter stays unchanged: HASH(a). That's the wrong
behavior.

The patch updates partitioning filter in accordance to the new columns
names. That includes partition/subpartition expression and
partition/subpartition field list.
This commit is contained in:
Aleksey Midenkov
2022-10-07 00:45:21 +03:00
parent 74fe1c44aa
commit fa0cada95b
6 changed files with 135 additions and 1 deletions

View File

@ -10535,6 +10535,9 @@ do_continue:;
#ifdef WITH_PARTITION_STORAGE_ENGINE
{
/*
Partitioning: part_info is prepared and returned via thd->work_part_info
*/
if (prep_alter_part_table(thd, table, alter_info, create_info,
&partition_changed, &fast_alter_partition))
{
@ -10712,6 +10715,9 @@ do_continue:;
else
alter_info->flags|= ALTER_INDEX_ORDER;
create_info->alias= alter_ctx.table_name;
/*
Partitioning: part_info is passed via thd->work_part_info
*/
error= create_table_impl(thd, alter_ctx.db, alter_ctx.table_name,
alter_ctx.new_db, alter_ctx.tmp_name,
alter_ctx.get_tmp_path(),