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

MDEV-28127 EXCHANGE PARTITION with non-matching vcol expression segfault

mysql_compare_tables() treated all columns non-virtual. Now it
properly checks if the columns are virtual and matches expressions.
This commit is contained in:
Aleksey Midenkov
2023-11-09 16:26:11 +03:00
parent ebb6f57568
commit 56e479107c
3 changed files with 51 additions and 0 deletions

View File

@ -7538,6 +7538,14 @@ bool mysql_compare_tables(TABLE *table,
(uint) (field->flags & NOT_NULL_FLAG))
DBUG_RETURN(false);
if (field->vcol_info)
{
if (!tmp_new_field->field->vcol_info)
DBUG_RETURN(false);
if (!field->vcol_info->is_equal(tmp_new_field->field->vcol_info))
DBUG_RETURN(false);
}
/*
mysql_prepare_alter_table() clears HA_OPTION_PACK_RECORD bit when
preparing description of existing table. In ALTER TABLE it is later