mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Tests: system columns *not* being auto-renamed (create, alter)
it's correct, they preserve their documented names
This commit is contained in:
committed by
Aleksey Midenkov
parent
35b679b924
commit
ca4dbcff69
@@ -450,5 +450,20 @@ alter table t drop column a;
|
||||
ERROR HY000: Table `t` must have at least one versioned column
|
||||
alter table t drop column a, drop column a;
|
||||
ERROR 42000: Can't DROP COLUMN `a`; check that it exists
|
||||
create or replace table t1 (sys_trx_start int);
|
||||
alter table t1 with system versioning;
|
||||
ERROR 42S21: Duplicate column name 'sys_trx_start'
|
||||
create or replace table t1 (sys_trx_end int);
|
||||
alter table t1 with system versioning;
|
||||
ERROR 42S21: Duplicate column name 'sys_trx_end'
|
||||
create or replace table t1 (a int, sys_trx_start int) with system versioning;
|
||||
ERROR 42S21: Duplicate column name 'sys_trx_start'
|
||||
create or replace table t1 (a int) with system versioning;
|
||||
set statement system_versioning_alter_history=keep for
|
||||
alter table t1 add column sys_trx_start int;
|
||||
ERROR 42S21: Duplicate column name 'sys_trx_start'
|
||||
set statement system_versioning_alter_history=keep for
|
||||
alter table t1 add column sys_trx_start timestamp(6);
|
||||
ERROR 42S21: Duplicate column name 'sys_trx_start'
|
||||
drop database test;
|
||||
create database test;
|
||||
|
@@ -341,12 +341,6 @@ t3 CREATE TABLE `t3` (
|
||||
`x27` int(11) DEFAULT NULL
|
||||
) ENGINE=NON_DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
## Errors
|
||||
create or replace table t (sys_trx_start int);
|
||||
alter table t with system versioning;
|
||||
ERROR 42S21: Duplicate column name 'sys_trx_start'
|
||||
create or replace table t (sys_trx_end int);
|
||||
alter table t with system versioning;
|
||||
ERROR 42S21: Duplicate column name 'sys_trx_end'
|
||||
create or replace temporary table t (x28 int) with system versioning;
|
||||
ERROR HY000: System versioning prohibited for TEMPORARY tables
|
||||
create or replace table t1 (
|
||||
|
@@ -383,6 +383,26 @@ alter table t drop column a;
|
||||
--error ER_CANT_DROP_FIELD_OR_KEY
|
||||
alter table t drop column a, drop column a;
|
||||
|
||||
create or replace table t1 (sys_trx_start int);
|
||||
--error ER_DUP_FIELDNAME
|
||||
alter table t1 with system versioning;
|
||||
|
||||
create or replace table t1 (sys_trx_end int);
|
||||
--error ER_DUP_FIELDNAME
|
||||
alter table t1 with system versioning;
|
||||
|
||||
--error ER_DUP_FIELDNAME
|
||||
create or replace table t1 (a int, sys_trx_start int) with system versioning;
|
||||
|
||||
create or replace table t1 (a int) with system versioning;
|
||||
|
||||
--error ER_DUP_FIELDNAME
|
||||
set statement system_versioning_alter_history=keep for
|
||||
alter table t1 add column sys_trx_start int;
|
||||
|
||||
--error ER_DUP_FIELDNAME
|
||||
set statement system_versioning_alter_history=keep for
|
||||
alter table t1 add column sys_trx_start timestamp(6);
|
||||
|
||||
drop database test;
|
||||
create database test;
|
||||
|
@@ -306,13 +306,6 @@ as select t2.b, t1.x27, t1.sys_trx_start, t1.sys_trx_end from t2 inner join t1 o
|
||||
show create table t3;
|
||||
|
||||
--echo ## Errors
|
||||
create or replace table t (sys_trx_start int);
|
||||
--error ER_DUP_FIELDNAME
|
||||
alter table t with system versioning;
|
||||
|
||||
create or replace table t (sys_trx_end int);
|
||||
--error ER_DUP_FIELDNAME
|
||||
alter table t with system versioning;
|
||||
|
||||
--error ER_VERS_TEMPORARY
|
||||
create or replace temporary table t (x28 int) with system versioning;
|
||||
|
Reference in New Issue
Block a user