@@ -6,9 +6,6 @@ period for system_time (sys_trx_start, sys_trx_end)
6
6
) with system versioning engine innodb;
7
7
insert into t1 (x) values (1);
8
8
# ALTER ADD SYSTEM VERSIONING should write to mysql.transaction_registry
9
- create function check_result (cond boolean)
10
- returns char(50) deterministic
11
- return if(cond = 1, '[CORRECT]', '[INCORRECT]');
12
9
set @@system_versioning_alter_history=keep;
13
10
create or replace table t1 (x int) engine innodb;
14
11
insert into t1 values (1);
@@ -19,9 +16,9 @@ add period for system_time(s, e),
19
16
add system versioning,
20
17
algorithm=inplace;
21
18
select s from t1 into @trx_start;
22
- select check_result( count(*) = 1) from mysql.transaction_registry where transaction_id = @trx_start;
23
- check_result( count(*) = 1)
24
- [CORRECT]
19
+ select count(*) = 1 from mysql.transaction_registry where transaction_id = @trx_start;
20
+ count(*) = 1
21
+ 1
25
22
create or replace table t1 (x int) engine innodb;
26
23
select count(*) from mysql.transaction_registry into @tmp;
27
24
alter table t1
@@ -30,9 +27,9 @@ add column e bigint unsigned as row end,
30
27
add period for system_time(s, e),
31
28
add system versioning,
32
29
algorithm=inplace;
33
- select check_result( count(*) = @tmp) from mysql.transaction_registry;
34
- check_result( count(*) = @tmp)
35
- [CORRECT]
30
+ select count(*) = @tmp from mysql.transaction_registry;
31
+ count(*) = @tmp
32
+ 1
36
33
create or replace table t1 (x int) engine innodb;
37
34
insert into t1 values (1);
38
35
alter table t1
@@ -42,9 +39,9 @@ add period for system_time(s, e),
42
39
add system versioning,
43
40
algorithm=copy;
44
41
select s from t1 into @trx_start;
45
- select check_result( count(*) = 1) from mysql.transaction_registry where transaction_id = @trx_start;
46
- check_result( count(*) = 1)
47
- [CORRECT]
42
+ select count(*) = 1 from mysql.transaction_registry where transaction_id = @trx_start;
43
+ count(*) = 1
44
+ 1
48
45
create or replace table t1 (x int) engine innodb;
49
46
select count(*) from mysql.transaction_registry into @tmp;
50
47
alter table t1
@@ -53,9 +50,9 @@ add column e bigint unsigned as row end,
53
50
add period for system_time(s, e),
54
51
add system versioning,
55
52
algorithm=copy;
56
- select check_result( count(*) = @tmp + 1) from mysql.transaction_registry;
57
- check_result( count(*) = @tmp + 1)
58
- [CORRECT]
53
+ select count(*) = @tmp + 1 from mysql.transaction_registry;
54
+ count(*) = @tmp + 1
55
+ 1
59
56
# TRX_ID to TIMESTAMP versioning switch
60
57
create or replace table t1 (
61
58
x int,
@@ -69,4 +66,3 @@ select row_end = 18446744073709551615 as transaction_based from t1 for system_ti
69
66
transaction_based
70
67
1
71
68
drop table t1;
72
- drop function check_result;
0 commit comments