diff options
author | Eugene Kosov <claprix@yandex.ru> | 2017-12-12 14:56:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-12 14:56:28 +0300 |
commit | cb4657e3b42e273318344181754a0cf8fb393524 (patch) | |
tree | 1ce6843f3d533792552f7a6aa5c414d74a8d9f1c /sql | |
parent | 9c718de2ed86177dde589d852769cb29449957df (diff) | |
download | mariadb-git-cb4657e3b42e273318344181754a0cf8fb393524.tar.gz |
MDEV-14627 SQL: disallow ADD SYSTEM VERSIONING for system-versioned tables
SQL: disallow ADD SYSTEM VERSIONING for system-versioned tables
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.cc | 6 | ||||
-rw-r--r-- | sql/share/errmsg-utf8.txt | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index bb52f6bb211..0193646984e 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -7047,6 +7047,12 @@ bool Vers_parse_info::check_and_fix_alter(THD *thd, Alter_info *alter_info, if (!need_check() && !share->versioned) return false; + if (with_system_versioning && table->versioned()) + { + my_error(ER_VERS_ALREADY_VERSIONED, MYF(0), table_name); + return true; + } + if (without_system_versioning) { if (!share->versioned) diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index e12f6cb258b..cb4cb84781d 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -7925,3 +7925,6 @@ ER_VERS_TRT_IS_DISABLED ER_VERS_DUPLICATE_ROW_START_END eng "Duplicate ROW %s column %`s" + +ER_VERS_ALREADY_VERSIONED + eng "Table %`s is already system-versioned table" |