1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

SQL: disallow ALTER CHANGE of system fields [fixes #213]

This commit is contained in:
Eugene Kosov
2017-07-15 13:59:15 +03:00
parent 909867d014
commit f8b6256992
4 changed files with 43 additions and 0 deletions

View File

@ -6869,6 +6869,12 @@ bool Vers_parse_info::check_and_fix_alter(THD *thd, Alter_info *alter_info,
{
if (f->versioning == Column_definition::WITHOUT_VERSIONING)
f->flags|= VERS_OPTIMIZED_UPDATE_FLAG;
if (f->change && (!strcmp(f->change, start) || !strcmp(f->change, end)))
{
my_error(ER_VERS_ALTER_SYSTEM_FIELD, MYF(0), f->change);
return true;
}
}
}