Debian Codegraph @

mysql-test/suite/versioning/r/update-big.result

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