Commit d199591c authored by Sergei Golubchik's avatar Sergei Golubchik

generalize the error message

parent ececc502
......@@ -50,7 +50,7 @@ x
# and not covered by tests
# As of standard, TRUNCATE on versioned tables is forbidden
truncate tf;
ERROR HY000: Got error 10000 'Error on remote system: 4160: Cannot truncate a versioned table' from FEDERATED
ERROR HY000: Got error 10000 'Error on remote system: 4137: System-versioned tables do not support TRUNCATE TABLE' from FEDERATED
delete history from t1;
select * from t1 for system_time all;
x
......
......@@ -446,11 +446,11 @@ alter table t1 engine=myisam;
# MDEV-14692 crash in MDL_context::upgrade_shared_lock()
create or replace temporary table t (a int);
alter table t change column if exists b c bigint unsigned generated always as row start;
ERROR HY000: TEMPORARY tables do not support system versioning
ERROR HY000: System-versioned tables do not support CREATE TEMPORARY TABLE
alter table t change column if exists b c bigint unsigned generated always as row end;
ERROR HY000: TEMPORARY tables do not support system versioning
ERROR HY000: System-versioned tables do not support CREATE TEMPORARY TABLE
alter table t add system versioning;
ERROR HY000: TEMPORARY tables do not support system versioning
ERROR HY000: System-versioned tables do not support CREATE TEMPORARY TABLE
drop table t;
# MDEV-14744 trx_id-based and transaction-based mixup in assertion
create or replace table t (c text) engine=innodb with system versioning;
......@@ -526,9 +526,9 @@ ERROR HY000: Table `t` is already system-versioned
#
use mysql;
create or replace table t (x int) with system versioning;
ERROR HY000: System versioning tables in the `mysql` database are not suported
ERROR HY000: System-versioned tables in the `mysql` database are not suported
alter table db add system versioning;
ERROR HY000: System versioning tables in the `mysql` database are not suported
ERROR HY000: System-versioned tables in the `mysql` database are not suported
use test;
# MDEV-15956 Strange ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN upon ALTER on versioning column
create or replace table t1 (i int, j int as (i), s timestamp(6) as row start, e timestamp(6) as row end, period for system_time(s,e)) with system versioning;
......
......@@ -427,7 +427,7 @@ t3 CREATE TABLE `t3` (
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
## Errors
create or replace temporary table t (x28 int) with system versioning;
ERROR HY000: TEMPORARY tables do not support system versioning
ERROR HY000: System-versioned tables do not support CREATE TEMPORARY TABLE
create or replace table t1 (
x29 int unsigned,
Sys_start0 timestamp(6) as row start invisible,
......
......@@ -5,7 +5,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create temporary table tt1 (a int) with system versioning;
ERROR HY000: TEMPORARY tables do not support system versioning
ERROR HY000: System-versioned tables do not support CREATE TEMPORARY TABLE
set @old_dbug=@@global.debug_dbug;
set global debug_dbug='+d,sysvers_force';
create table t2 (a int);
......
......@@ -31,7 +31,7 @@ partition by key() (
partition p1,
partition p2
);
ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
create or replace table t (
a int primary key,
row_start bigint unsigned as row start invisible,
......@@ -42,7 +42,7 @@ partition by key(a, row_start) (
partition p1,
partition p2
);
ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
create or replace table t (
a int primary key,
row_start bigint unsigned as row start invisible,
......@@ -53,7 +53,7 @@ partition by hash(a + row_end * 2) (
partition p1,
partition p2
);
ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
create or replace table t (
a int primary key,
row_start bigint unsigned as row start invisible,
......@@ -63,7 +63,7 @@ period for system_time(row_start, row_end)
partition by range columns (a, row_start) (
partition p1 values less than (100, 100)
);
ERROR HY000: Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END
ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
# Test cleanup
drop database test;
create database test;
......@@ -113,7 +113,7 @@ create or replace table t2 (id int) with system versioning;
flush tables t1, t2;
truncate table t1;
truncate table t2;
ERROR HY000: Cannot truncate a versioned table
ERROR HY000: System-versioned tables do not support TRUNCATE TABLE
# fetch table shares
describe t1;
Field Type Null Key Default Extra
......@@ -123,12 +123,12 @@ Field Type Null Key Default Extra
id int(11) YES NULL
truncate table t1;
truncate table t2;
ERROR HY000: Cannot truncate a versioned table
ERROR HY000: System-versioned tables do not support TRUNCATE TABLE
# enter locked tables mode
lock tables t1 WRITE, t2 WRITE;
truncate t1;
truncate t2;
ERROR HY000: Cannot truncate a versioned table
ERROR HY000: System-versioned tables do not support TRUNCATE TABLE
unlock tables;
drop database test;
create database test;
......@@ -368,11 +368,11 @@ alter table t1 engine=myisam;
--echo # MDEV-14692 crash in MDL_context::upgrade_shared_lock()
create or replace temporary table t (a int);
--error ER_VERS_TEMPORARY
--error ER_VERS_NOT_SUPPORTED
alter table t change column if exists b c bigint unsigned generated always as row start;
--error ER_VERS_TEMPORARY
--error ER_VERS_NOT_SUPPORTED
alter table t change column if exists b c bigint unsigned generated always as row end;
--error ER_VERS_TEMPORARY
--error ER_VERS_NOT_SUPPORTED
alter table t add system versioning;
drop table t;
......
......@@ -310,7 +310,7 @@ show create table t3;
--echo ## Errors
--error ER_VERS_TEMPORARY
--error ER_VERS_NOT_SUPPORTED
create or replace temporary table t (x28 int) with system versioning;
--error ER_VERS_DUPLICATE_ROW_START_END
......
......@@ -3,7 +3,7 @@
create table t1 (a int);
show create table t1;
--error ER_VERS_TEMPORARY
--error ER_VERS_NOT_SUPPORTED
create temporary table tt1 (a int) with system versioning;
set @old_dbug=@@global.debug_dbug;
......
......@@ -125,7 +125,7 @@ create or replace table t2 (id int) with system versioning;
flush tables t1, t2;
truncate table t1;
--error ER_TRUNCATE_ILLEGAL_VERS
--error ER_VERS_NOT_SUPPORTED
truncate table t2;
-- echo # fetch table shares
......@@ -133,14 +133,14 @@ describe t1;
describe t2;
truncate table t1;
--error ER_TRUNCATE_ILLEGAL_VERS
--error ER_VERS_NOT_SUPPORTED
truncate table t2;
--echo # enter locked tables mode
lock tables t1 WRITE, t2 WRITE;
truncate t1;
--error ER_TRUNCATE_ILLEGAL_VERS
--error ER_VERS_NOT_SUPPORTED
truncate t2;
unlock tables;
......
......@@ -7355,7 +7355,7 @@ bool Vers_parse_info::fix_alter_info(THD *thd, Alter_info *alter_info,
if (DBUG_EVALUATE_IF("sysvers_force", 0, share->tmp_table))
{
my_error(ER_VERS_TEMPORARY, MYF(0));
my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "CREATE TEMPORARY TABLE");
return true;
}
......
......@@ -7869,7 +7869,7 @@ ER_DROP_VERSIONING_SYSTEM_TIME_PARTITION
eng "Can not DROP SYSTEM VERSIONING for table %`s partitioned BY SYSTEM_TIME"
ER_VERS_DB_NOT_SUPPORTED
eng "System versioning tables in the %`s database are not suported"
eng "System-versioned tables in the %`s database are not suported"
ER_VERS_TRT_IS_DISABLED
eng "Transaction registry is disabled"
......@@ -7883,11 +7883,11 @@ ER_VERS_ALREADY_VERSIONED
ER_UNUSED_24
eng "You should never see it"
ER_VERS_TEMPORARY
eng "TEMPORARY tables do not support system versioning"
ER_VERS_NOT_SUPPORTED
eng "System-versioned tables do not support %s"
ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED
eng "Transaction-precise system versioned tables do not support partitioning by ROW START or ROW END"
eng "Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END"
ER_INDEX_FILE_FULL
eng "The index file for table '%-.192s' is full"
ER_UPDATED_COLUMN_ONLY_ONCE
......@@ -7931,5 +7931,3 @@ ER_PERIOD_CONSTRAINT_DROP
eng "Can't DROP CONSTRAINT `%s`. Use DROP PERIOD `%s` for this"
ER_TOO_LONG_KEYPART 42000 S1009
eng "Specified key part was too long; max key part length is %u bytes"
ER_TRUNCATE_ILLEGAL_VERS
eng "Cannot truncate a versioned table"
......@@ -340,7 +340,7 @@ bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref,
if (versioned)
{
my_error(ER_TRUNCATE_ILLEGAL_VERS, MYF(0));
my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "TRUNCATE TABLE");
DBUG_RETURN(TRUE);
}
......
......@@ -6355,7 +6355,7 @@ versioning_option:
{
if (DBUG_EVALUATE_IF("sysvers_force", 0, 1))
{
my_error(ER_VERS_TEMPORARY, MYF(0));
my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "CREATE TEMPORARY TABLE");
MYSQL_YYABORT;
}
}
......
......@@ -6380,7 +6380,7 @@ versioning_option:
{
if (DBUG_EVALUATE_IF("sysvers_force", 0, 1))
{
my_error(ER_VERS_TEMPORARY, MYF(0));
my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "CREATE TEMPORARY TABLE");
MYSQL_YYABORT;
}
}
......
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