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

MDEV-14787 CREATE does not allow tables with versioning columns only, but ALTER does

This commit is contained in:
Eugene Kosov
2018-01-03 15:51:23 +03:00
committed by GitHub
parent b8b5d8d87d
commit dbf21ff396
3 changed files with 18 additions and 0 deletions

View File

@ -8363,6 +8363,13 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
}
}
if (table->versioned() && !(alter_info->flags & Alter_info::ALTER_DROP_SYSTEM_VERSIONING) &&
new_create_list.elements == VERSIONING_FIELDS)
{
my_error(ER_VERS_TABLE_MUST_HAVE_COLUMNS, MYF(0), table->s->table_name.str);
goto err;
}
if (!create_info->comment.str)
{
create_info->comment.str= table->s->comment.str;