Commit 82379ce1 authored by Aleksey Midenkov's avatar Aleksey Midenkov

SQL: error messages revised

parent b55a1491
......@@ -10,7 +10,7 @@ t CREATE TABLE `t` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t drop system versioning;
ERROR HY000: Table `t` is not temporal
ERROR HY000: Table `t` is not system-versioned
alter table t add system versioning;
show create table t;
Table Create Table
......@@ -21,9 +21,9 @@ t CREATE TABLE `t` (
PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
alter table t add column y int;
ERROR HY000: Not allowed for temporal `test`.`t`. Change @@system_versioning_alter_history to proceed with ALTER.
ERROR HY000: Not allowed for system-versioned `test`.`t`. Change @@system_versioning_alter_history to proceed with ALTER.
alter table t engine innodb;
ERROR HY000: Not allowed for temporal `test`.`t`. Change to/from native system versioning engine is prohibited.
ERROR HY000: Not allowed for system-versioned `test`.`t`. Change to/from native system versioning engine is prohibited.
alter table t drop system versioning;
show create table t;
Table Create Table
......@@ -36,13 +36,13 @@ add column trx_start bigint(20) unsigned generated always as row start,
add column trx_end bigint(20) unsigned generated always as row end,
add period for system_time(trx_start, trx_end),
add system versioning;
ERROR HY000: `trx_start` must be of type TIMESTAMP(6) for temporal table `t`
ERROR HY000: `trx_start` must be of type TIMESTAMP(6) for system-versioned table `t`
alter table t
add column trx_start timestamp generated always as row start,
add column trx_end timestamp generated always as row end,
add period for system_time(trx_start, trx_end),
add system versioning;
ERROR HY000: `trx_start` must be of type TIMESTAMP(6) for temporal table `t`
ERROR HY000: `trx_start` must be of type TIMESTAMP(6) for system-versioned table `t`
alter table t
add column trx_start timestamp(6) not null generated always as row start,
add column trx_end timestamp(6) not null generated always as row end,
......@@ -231,9 +231,9 @@ t CREATE TABLE `t` (
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t modify a int with system versioning;
ERROR HY000: Table `t` is not temporal
ERROR HY000: Table `t` is not system-versioned
alter table t modify a int without system versioning;
ERROR HY000: Table `t` is not temporal
ERROR HY000: Table `t` is not system-versioned
alter table t add system versioning;
alter table t modify a int without system versioning;
show create table t;
......@@ -464,9 +464,9 @@ set system_versioning_alter_history= DROP;
ERROR 42000: Variable 'system_versioning_alter_history' can't be set to the value of 'DROP'
create or replace table t (a int) with system versioning;
alter table t add system versioning;
ERROR HY000: Table `t` is already temporal
ERROR HY000: Table `t` is already system-versioned
alter table t add system versioning, drop system versioning;
ERROR HY000: Table `t` is already temporal
ERROR HY000: Table `t` is already system-versioned
set @@system_versioning_alter_history=keep;
create or replace table t(x int, y int) with system versioning engine=innodb;
alter table t modify y int without system versioning;
......
......@@ -99,14 +99,14 @@ Sys_start bigint generated always as row start,
Sys_end bigint unsigned generated always as row end,
period for system_time (Sys_start, Sys_end)
) with system versioning engine innodb;
ERROR HY000: `Sys_start` must be of type TIMESTAMP(6) for temporal table `t1`
ERROR HY000: `Sys_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
create or replace table t1 (
x14 int unsigned,
Sys_start bigint unsigned generated always as row start,
Sys_end bigint generated always as row end,
period for system_time (Sys_start, Sys_end)
) with system versioning engine innodb;
ERROR HY000: `Sys_end` must be of type BIGINT(20) UNSIGNED for temporal table `t1`
ERROR HY000: `Sys_end` must be of type BIGINT(20) UNSIGNED for system-versioned table `t1`
create or replace table t1 (
x15 int with system versioning,
B int
......@@ -182,7 +182,7 @@ x21 int without system versioning
create or replace table t1 (
x22 int without system versioning
) with system versioning;
ERROR HY000: Table `t1` must have at least 1 temporal column
ERROR HY000: Table `t1` must have at least one temporal column
create or replace table t1 (a int) with system versioning;
create table tt1 like t1;
show create table tt1;
......@@ -363,7 +363,7 @@ period for system_time (st, en)
) with system versioning engine innodb;
create or replace table t2 with system versioning engine myisam
as select * from t1;
ERROR HY000: `st` must be of type TIMESTAMP(6) for temporal table `t2`
ERROR HY000: `st` must be of type TIMESTAMP(6) for system-versioned table `t2`
create or replace table t1 (x27 int, id int) with system versioning engine NON_DEFAULT_ENGINE;
create or replace table t2 (b int, id int);
create or replace table t3 with system versioning
......
......@@ -31,7 +31,7 @@ x
# Engine change native <-> non-native versioning prohibited
create or replace table t1 (i int) engine=DEFAULT_ENGINE with system versioning partition by hash(i);
alter table t1 engine=NON_DEFAULT_ENGINE;
ERROR HY000: Not allowed for temporal `test`.`t1`. Change to/from native system versioning engine is prohibited.
ERROR HY000: Not allowed for system-versioned `test`.`t1`. Change to/from native system versioning engine is prohibited.
# Check server-level partitioning
## create errors
create or replace table t1 (x int)
......
......@@ -7822,7 +7822,7 @@ ER_UPDATE_INFO_WITH_SYSTEM_VERSIONING
eng "Rows matched: %ld Changed: %ld Inserted: %ld Warnings: %ld"
ER_VERS_FIELD_WRONG_TYPE
eng "%`s must be of type %s for temporal table %`s"
eng "%`s must be of type %s for system-versioned table %`s"
ER_VERS_ENGINE_UNSUPPORTED
eng "Transaction system versioning for %`s is not supported"
......@@ -7852,10 +7852,10 @@ WARN_VERS_PART_NON_HISTORICAL
eng "Partition %`s contains non-historical data"
ER_VERS_ALTER_NOT_ALLOWED
eng "Not allowed for temporal %`s.%`s. Change @@system_versioning_alter_history to proceed with ALTER."
eng "Not allowed for system-versioned %`s.%`s. Change @@system_versioning_alter_history to proceed with ALTER."
ER_VERS_ALTER_ENGINE_PROHIBITED
eng "Not allowed for temporal %`s.%`s. Change to/from native system versioning engine is prohibited."
eng "Not allowed for system-versioned %`s.%`s. Change to/from native system versioning engine is prohibited."
ER_VERS_RANGE_PROHIBITED
eng "SYSTEM_TIME range selector is prohibited"
......@@ -7882,10 +7882,10 @@ ER_VERS_DIFFERENT_TABLES
eng "Wrong parameters for %`s: system fields selected from different tables"
ER_VERS_TABLE_MUST_HAVE_COLUMNS
eng "Table %`s must have at least 1 temporal column"
eng "Table %`s must have at least one temporal column"
ER_VERS_NOT_VERSIONED
eng "Table %`s is not temporal"
eng "Table %`s is not system-versioned"
ER_MISSING
eng "Wrong parameters for %`s: missing '%s'"
......@@ -7927,4 +7927,4 @@ ER_VERS_DUPLICATE_ROW_START_END
eng "Duplicate ROW %s column %`s"
ER_VERS_ALREADY_VERSIONED
eng "Table %`s is already temporal"
eng "Table %`s is already system-versioned"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment