mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
MDEV-15990 versioning: don't allow changes in the past
This commit is contained in:
@@ -57,6 +57,30 @@ insert into t2 (a) values (now()),(now());
|
||||
select * from t2 where a in (select row_start from t1);
|
||||
a
|
||||
drop table t1, t2;
|
||||
# MDEV-30046 wrong row targeted with "insert ... on duplicate" and "replace"
|
||||
# Don't allow changes from the past
|
||||
create or replace table t1 (pk int primary key, i int) with system versioning;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`pk` int(11) NOT NULL,
|
||||
`i` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
|
||||
set timestamp=12345;
|
||||
insert t1(pk, i) values(1,3);
|
||||
set timestamp=12344;
|
||||
delete from t1;
|
||||
select pk,i from t1 for system_time all;
|
||||
pk i
|
||||
set timestamp=12345;
|
||||
insert t1(pk, i) values(1,3);
|
||||
set timestamp=12344;
|
||||
replace t1(pk, i) values(1,4);
|
||||
select pk,i from t1 for system_time all;
|
||||
pk i
|
||||
1 4
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.11 tests
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user