summaryrefslogtreecommitdiff
path: root/mysql-test/suite/versioning/r/auto_increment.result
blob: 1f43595848b73303df616358b981ba2eb9ed722b (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
create procedure test_01(
sys_type varchar(255),
engine varchar(255),
fields varchar(255))
begin
set @str= concat('
  create table t1(
    id int unsigned auto_increment primary key,
    x int unsigned,
    y int unsigned,
    sys_start ', sys_type, ' as row start invisible,
    sys_end ', sys_type, ' as row end invisible,
    period for system_time (sys_start, sys_end))
  with system versioning
  engine ', engine);
prepare stmt from @str; execute stmt; drop prepare stmt;
set @str= concat('
  create table t2(
    id int unsigned auto_increment primary key,
    x int unsigned,
    y int unsigned)
  engine ', engine);
prepare stmt from @str; execute stmt; drop prepare stmt;
insert into t1(x, y) values(1, 11);
insert into t2(x, y) values(1, 11);
insert into t1(x, y) values(2, 12);
insert into t2(x, y) values(2, 12);
insert into t1(x, y) values(3, 13);
insert into t2(x, y) values(3, 13);
insert into t1(x, y) values(4, 14);
insert into t2(x, y) values(4, 14);
insert into t1(x, y) values(5, 15);
insert into t2(x, y) values(5, 15);
insert into t1(x, y) values(6, 16);
insert into t2(x, y) values(6, 16);
insert into t1(x, y) values(7, 17);
insert into t2(x, y) values(7, 17);
insert into t1(x, y) values(8, 18);
insert into t2(x, y) values(8, 18);
insert into t1(x, y) values(9, 19);
insert into t2(x, y) values(9, 19);
select t1.x = t2.x and t1.y = t2.y as A, t1.x, t1.y, t2.x, t2.y from t1 inner join t2 on t1.id = t2.id;
delete from t1 where x = 2;
delete from t2 where x = 2;
select t1.x = t2.x and t1.y = t2.y as A, t1.x, t1.y, t2.x, t2.y from t1 inner join t2 on t1.id = t2.id;
delete from t1 where x > 7;
delete from t2 where x > 7;
select t1.x = t2.x and t1.y = t2.y as A, t1.x, t1.y, t2.x, t2.y from t1 inner join t2 on t1.id = t2.id;
drop table t1;
drop table t2;
end~~
call test_01('timestamp(6)', 'myisam', 'sys_end');
A	x	y	x	y
1	1	11	1	11
1	2	12	2	12
1	3	13	3	13
1	4	14	4	14
1	5	15	5	15
1	6	16	6	16
1	7	17	7	17
1	8	18	8	18
1	9	19	9	19
A	x	y	x	y
1	1	11	1	11
1	3	13	3	13
1	4	14	4	14
1	5	15	5	15
1	6	16	6	16
1	7	17	7	17
1	8	18	8	18
1	9	19	9	19
A	x	y	x	y
1	1	11	1	11
1	3	13	3	13
1	4	14	4	14
1	5	15	5	15
1	6	16	6	16
1	7	17	7	17
call test_01('bigint unsigned', 'innodb', 'vtq_commit_ts(sys_end)');
A	x	y	x	y
1	1	11	1	11
1	2	12	2	12
1	3	13	3	13
1	4	14	4	14
1	5	15	5	15
1	6	16	6	16
1	7	17	7	17
1	8	18	8	18
1	9	19	9	19
A	x	y	x	y
1	1	11	1	11
1	3	13	3	13
1	4	14	4	14
1	5	15	5	15
1	6	16	6	16
1	7	17	7	17
1	8	18	8	18
1	9	19	9	19
A	x	y	x	y
1	1	11	1	11
1	3	13	3	13
1	4	14	4	14
1	5	15	5	15
1	6	16	6	16
1	7	17	7	17
call verify_vtq;
No	A	B	C	D
1	1	1	1	1
2	1	1	1	1
3	1	1	1	1
4	1	1	1	1
5	1	1	1	1
6	1	1	1	1
7	1	1	1	1
8	1	1	1	1
9	1	1	1	1
10	1	1	1	1
11	1	1	1	1
drop procedure test_01;