1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

SQL: recreate PRIMARY KEY on DROP SYSTEM VERSIONING [#348]

This commit is contained in:
Eugene Kosov
2017-11-24 21:26:43 +03:00
committed by Aleksey Midenkov
parent 0c571f8c4e
commit 62470fc787
2 changed files with 76 additions and 0 deletions

View File

@@ -320,6 +320,23 @@ alter table non_empty
change column sys_trx_end sys_trx_end bigint(20) unsigned generated always as row end;
drop table non_empty;
create or replace table t (a int primary key) with system versioning;
insert into t values (1);
update t set a=2;
alter table t drop primary key, add primary key (a), drop system versioning;
select * from t;
--replace_result InnoDB INNODB_OR_MYISAM MyISAM INNODB_OR_MYISAM
show create table t;
create or replace table t (a int primary key) with system versioning;
insert into t values (1);
update t set a=2;
alter table t drop system versioning;
select * from t;
--replace_result InnoDB INNODB_OR_MYISAM MyISAM INNODB_OR_MYISAM
show create table t;
call verify_vtq;
}