Commit fc21529f authored by Aleksey Midenkov's avatar Aleksey Midenkov

MDEV-14683 Possible redundancy in error codes

ER_VERS_GENERATED_ALWAYS_NOT_EMPTY vs ER_VERS_ALTER_SYSTEM_FIELD

Related to #310 (91ba4f04).
parent 617e108f
......@@ -375,20 +375,15 @@ a b
4 2
create or replace table t (
a int,
sys_trx_start bigint(20) unsigned as row start invisible,
sys_trx_end bigint(20) unsigned as row end invisible,
period for system_time(sys_trx_start, sys_trx_end)
) with system versioning engine innodb;
alter table t change column sys_trx_start asdf bigint unsigned;
ERROR HY000: Can not change system versioning field `sys_trx_start`
create or replace table t (
a int,
sys_trx_start timestamp(6) as row start invisible,
sys_trx_end timestamp(6) as row end invisible,
period for system_time(sys_trx_start, sys_trx_end)
) with system versioning engine myisam;
) with system versioning;
alter table t change column sys_trx_start asdf timestamp(6);
ERROR HY000: Can not change system versioning field `sys_trx_start`
insert into t values (1);
alter table t modify column sys_trx_start bigint unsigned;
ERROR HY000: Can not change system versioning field `sys_trx_start`
create or replace table t (
a int,
sys_trx_start timestamp(6) as row start invisible,
......
......@@ -260,23 +260,17 @@ select * from t for system_time all;
insert into t values (4, 0);
select * from t for system_time all;
create or replace table t (
a int,
sys_trx_start bigint(20) unsigned as row start invisible,
sys_trx_end bigint(20) unsigned as row end invisible,
period for system_time(sys_trx_start, sys_trx_end)
) with system versioning engine innodb;
--error ER_VERS_ALTER_SYSTEM_FIELD
alter table t change column sys_trx_start asdf bigint unsigned;
create or replace table t (
a int,
sys_trx_start timestamp(6) as row start invisible,
sys_trx_end timestamp(6) as row end invisible,
period for system_time(sys_trx_start, sys_trx_end)
) with system versioning engine myisam;
) with system versioning;
--error ER_VERS_ALTER_SYSTEM_FIELD
alter table t change column sys_trx_start asdf timestamp(6);
insert into t values (1);
--error ER_VERS_ALTER_SYSTEM_FIELD
alter table t modify column sys_trx_start bigint unsigned;
create or replace table t (
a int,
......
......@@ -7177,6 +7177,7 @@ bool Vers_parse_info::fix_alter_info(THD *thd, Alter_info *alter_info,
return false;
}
if (!share->versioned)
{
List_iterator_fast<Create_field> it(alter_info->create_list);
while (Create_field *f= it++)
......
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