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

MDEV-24176 Preparations

1. moved fix_vcol_exprs() call to open_table()

mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session

2. Vanilla cleanups and comments.
This commit is contained in:
Aleksey Midenkov
2022-04-18 12:44:27 +03:00
parent 7498978e6a
commit c02ebf3510
7 changed files with 110 additions and 115 deletions

View File

@ -5548,7 +5548,6 @@ that are reorganised.
my_error(ER_ROW_IS_REFERENCED, MYF(0));
goto err;
}
tab_part_info->num_parts-= num_parts_dropped;
}
else if (alter_info->partition_flags & ALTER_PARTITION_REBUILD)
{
@ -6214,8 +6213,6 @@ static bool mysql_drop_partitions(ALTER_PARTITION_PARAM_TYPE *lpt)
char path[FN_REFLEN+1];
partition_info *part_info= lpt->table->part_info;
List_iterator<partition_element> part_it(part_info->partitions);
uint i= 0;
uint remove_count= 0;
int error;
DBUG_ENTER("mysql_drop_partitions");
@ -6230,16 +6227,6 @@ static bool mysql_drop_partitions(ALTER_PARTITION_PARAM_TYPE *lpt)
lpt->table->file->print_error(error, MYF(0));
DBUG_RETURN(TRUE);
}
do
{
partition_element *part_elem= part_it++;
if (part_elem->part_state == PART_IS_DROPPED)
{
part_it.remove();
remove_count++;
}
} while (++i < part_info->num_parts);
part_info->num_parts-= remove_count;
DBUG_RETURN(FALSE);
}