|
1 | 1 | set @@session.time_zone='+00:00'; |
2 | | -select ifnull(max(trx_id), 0) into @start_trx_id from information_schema.innodb_vtq; |
| 2 | +select ifnull(max(transaction_id), 0) into @start_trx_id from information_schema.innodb_vtq; |
3 | 3 | create procedure if not exists verify_vtq() |
4 | 4 | begin |
5 | 5 | set @i= 0; |
6 | 6 | select |
7 | 7 | @i:= @i + 1 as No, |
8 | | -trx_id > 0 as A, |
9 | | -commit_id > trx_id as B, |
10 | | -begin_ts > '1-1-1 0:0:0' as C, |
11 | | -commit_ts >= begin_ts as D |
| 8 | +transaction_id > 0 as A, |
| 9 | +commit_id > transaction_id as B, |
| 10 | +begin_timestamp > '1-1-1 0:0:0' as C, |
| 11 | +commit_timestamp >= begin_timestamp as D |
12 | 12 | from information_schema.innodb_vtq |
13 | | -where trx_id > @start_trx_id; |
14 | | -select ifnull(max(trx_id), 0) |
| 13 | +where transaction_id > @start_trx_id; |
| 14 | +select ifnull(max(transaction_id), 0) |
15 | 15 | into @start_trx_id |
16 | 16 | from information_schema.innodb_vtq; |
17 | 17 | end~~ |
@@ -68,20 +68,20 @@ insert into t1 values (); |
68 | 68 | set @ts0= now(6); |
69 | 69 | insert into t1 values (); |
70 | 70 | select sys_trx_start from t1 where id = last_insert_id() into @tx0; |
71 | | -select trx_id = @tx0 from information_schema.innodb_vtq limit 1; |
72 | | -trx_id = @tx0 |
| 71 | +select transaction_id = @tx0 from information_schema.innodb_vtq limit 1; |
| 72 | +transaction_id = @tx0 |
73 | 73 | 1 |
74 | 74 | set @ts1= now(6); |
75 | 75 | insert into t1 values (); |
76 | 76 | select sys_trx_start from t1 where id = last_insert_id() into @tx1; |
77 | | -select trx_id = @tx1 from information_schema.innodb_vtq limit 1; |
78 | | -trx_id = @tx1 |
| 77 | +select transaction_id = @tx1 from information_schema.innodb_vtq limit 1; |
| 78 | +transaction_id = @tx1 |
79 | 79 | 1 |
80 | 80 | set @ts2= now(6); |
81 | 81 | insert into t1 values (); |
82 | 82 | select sys_trx_start from t1 where id = last_insert_id() into @tx2; |
83 | | -select trx_id = @tx2 from information_schema.innodb_vtq limit 1; |
84 | | -trx_id = @tx2 |
| 83 | +select transaction_id = @tx2 from information_schema.innodb_vtq limit 1; |
| 84 | +transaction_id = @tx2 |
85 | 85 | 1 |
86 | 86 | set @ts3= now(6); |
87 | 87 | select |
@@ -119,26 +119,26 @@ A B C D E F H |
119 | 119 | set transaction isolation level read uncommitted; |
120 | 120 | insert into t1 values (); |
121 | 121 | select sys_trx_start from t1 where id = last_insert_id() into @tx3; |
122 | | -select iso_level = 'RU' from information_schema.innodb_vtq where trx_id = @tx3; |
123 | | -iso_level = 'RU' |
| 122 | +select isolation_level = 'READ-UNCOMMITTED' from information_schema.innodb_vtq where transaction_id = @tx3; |
| 123 | +isolation_level = 'READ-UNCOMMITTED' |
124 | 124 | 1 |
125 | 125 | set transaction isolation level read committed; |
126 | 126 | insert into t1 values (); |
127 | 127 | select sys_trx_start from t1 where id = last_insert_id() into @tx4; |
128 | | -select iso_level = 'RC' from information_schema.innodb_vtq where trx_id = @tx4; |
129 | | -iso_level = 'RC' |
| 128 | +select isolation_level = 'READ-COMMITTED' from information_schema.innodb_vtq where transaction_id = @tx4; |
| 129 | +isolation_level = 'READ-COMMITTED' |
130 | 130 | 1 |
131 | 131 | set transaction isolation level serializable; |
132 | 132 | insert into t1 values (); |
133 | 133 | select sys_trx_start from t1 where id = last_insert_id() into @tx5; |
134 | | -select iso_level = 'S' from information_schema.innodb_vtq where trx_id = @tx5; |
135 | | -iso_level = 'S' |
| 134 | +select isolation_level = 'SERIALIZABLE' from information_schema.innodb_vtq where transaction_id = @tx5; |
| 135 | +isolation_level = 'SERIALIZABLE' |
136 | 136 | 1 |
137 | 137 | set transaction isolation level repeatable read; |
138 | 138 | insert into t1 values (); |
139 | 139 | select sys_trx_start from t1 where id = last_insert_id() into @tx6; |
140 | | -select iso_level = 'RR' from information_schema.innodb_vtq where trx_id = @tx6; |
141 | | -iso_level = 'RR' |
| 140 | +select isolation_level = 'REPEATABLE-READ' from information_schema.innodb_vtq where transaction_id = @tx6; |
| 141 | +isolation_level = 'REPEATABLE-READ' |
142 | 142 | 1 |
143 | 143 | drop table t1; |
144 | 144 | call verify_vtq; |
|
0 commit comments