summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/versioning/r/update-big.result
blob: 506d1d23c5d9794e11ac730135842396a83dfaff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#
# MDEV-15458 Segfault in heap_scan() upon UPDATE after ADD SYSTEM VERSIONING
#
create or replace table t1 (a int);
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8);
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
insert into t1 select * from t1;
connect  con1,localhost,root,,test;
alter table t1 add system versioning;
connection default;
update t1 set a= 7 where a = 3;
update t1 set a= 2 where a = 7;
update t1 set a= 5 where a = 2;
update t1 set a= 1 where a = 5;
update t1 set a= 8 where a = 1;
update t1 set a= 4 where a = 8;
update t1 set a= 6;
disconnect con1;
drop table t1;
call mtr.add_suppression("need more HISTORY partitions");
#
# MDEV-23642 Locking timeout caused by auto-creation affects original DML
#
set timestamp= unix_timestamp('2000-01-01 00:00:00');
create or replace table t1 (x int primary key) with system versioning engine innodb
partition by system_time interval 1 hour auto;
insert into t1 values (1);
start transaction;
insert into t1 values (2);
connect con1, localhost, root;
set lock_wait_timeout= 1;
set innodb_lock_wait_timeout= 1;
set timestamp= unix_timestamp('2000-01-01 01:00:01');
update t1 set x= x + 122 where x = 1;
Warnings:
Error	1205	Lock wait timeout exceeded; try restarting transaction
Warning	4114	Versioned table `test`.`t1`: last HISTORY partition (`p0`) is out of INTERVAL, need more HISTORY partitions
disconnect con1;
connection default;
select * from t1;
x
2
123
drop table t1;
set timestamp= default;
#
# MDEV-25339 Assertion `thd->transaction.stmt.is_empty() || thd->in_sub_stmt' failed
#
create or replace table t1 (x int) with system versioning engine innodb
partition by system_time interval 1 hour auto;
start transaction;
insert into t1 values (1);
select * from t1;
x
1
connect con1, localhost, root;
set lock_wait_timeout= 1;
set innodb_lock_wait_timeout= 1;
update t1 set x= x + 111;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
x
disconnect con1;
connection default;
drop table t1;
#
# MDEV-25482 Auto-create: Server hangs after a failed attempt to create partition
#
set timestamp= default;
create table t (pk int primary key, a int) engine=InnoDB
with system versioning partition by system_time interval 1 hour auto;
insert into t values (1,1),(2,2),(3,3),(4,4),(5,5);
start transaction;
update t set a= 20 where pk = 2;
connect  con1,localhost,root,,;
set lock_wait_timeout= 1;
set @@timestamp= @@timestamp+3601;
update t set a= 40 where pk = 4;
Warnings:
Error	1205	Lock wait timeout exceeded; try restarting transaction
Warning	4114	Versioned table `test`.`t`: last HISTORY partition (`p0`) is out of INTERVAL, need more HISTORY partitions
update t set a= 400 where pk = 4;
Warnings:
Error	1205	Lock wait timeout exceeded; try restarting transaction
Warning	4114	Versioned table `test`.`t`: last HISTORY partition (`p0`) is out of INTERVAL, need more HISTORY partitions
disconnect con1;
connection default;
select * from t where pk = 4;
pk	a
4	400
rollback;
drop tables t;