Skip to content

Commit c5d0c38

Browse files
committed
MDEV-14676 Redundancy in error codes
ER_VERS_NOT_VERSIONED vs ER_VERSIONING_REQUIRED
1 parent fc21529 commit c5d0c38

File tree

12 files changed

+36
-38
lines changed

12 files changed

+36
-38
lines changed

mysql-test/suite/versioning/r/insert.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ insert into t1(x) values (1);
290290
ERROR HY000: Temporal operation requires `mysql.transaction_registry` (@@system_versioning_transaction_registry).
291291
set global system_versioning_transaction_registry= on;
292292
Warnings:
293-
Warning 4145 Transaction-based system versioning is EXPERIMENTAL and is subject to change in future.
293+
Warning 4144 Transaction-based system versioning is EXPERIMENTAL and is subject to change in future.
294294
create or replace table t1 (
295295
x int,
296296
y int as (x) virtual,

mysql-test/suite/versioning/r/optimized.result

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,59 +17,59 @@ a b b+0
1717
1 NULL NULL
1818
3 NULL NULL
1919
Warnings:
20-
Warning 4112 Attempt to read non-temporal field `b` in historical query
21-
Warning 4112 Attempt to read non-temporal field `b` in historical query
20+
Warning 4111 Attempt to read non-temporal field `b` in historical query
21+
Warning 4111 Attempt to read non-temporal field `b` in historical query
2222
select * from t for system_time as of timestamp now(6);
2323
a b
2424
1 NULL
2525
3 NULL
2626
Warnings:
27-
Warning 4112 Attempt to read non-temporal field `b` in historical query
27+
Warning 4111 Attempt to read non-temporal field `b` in historical query
2828
select count(*) from t for system_time as of timestamp now(6) group by b;
2929
count(*)
3030
2
3131
Warnings:
32-
Warning 4112 Attempt to read non-temporal field `b` in historical query
32+
Warning 4111 Attempt to read non-temporal field `b` in historical query
3333
select * from t for system_time as of timestamp now(6) order by b asc;
3434
a b
3535
1 NULL
3636
3 NULL
3737
Warnings:
38-
Warning 4112 Attempt to read non-temporal field `b` in historical query
39-
Warning 4112 Attempt to read non-temporal field `b` in historical query
38+
Warning 4111 Attempt to read non-temporal field `b` in historical query
39+
Warning 4111 Attempt to read non-temporal field `b` in historical query
4040
select * from t for system_time as of timestamp now(6) order by b desc;
4141
a b
4242
1 NULL
4343
3 NULL
4444
Warnings:
45-
Warning 4112 Attempt to read non-temporal field `b` in historical query
46-
Warning 4112 Attempt to read non-temporal field `b` in historical query
45+
Warning 4111 Attempt to read non-temporal field `b` in historical query
46+
Warning 4111 Attempt to read non-temporal field `b` in historical query
4747
select * from t for system_time as of timestamp now(6) group by a having a=2;
4848
a b
4949
Warnings:
50-
Warning 4112 Attempt to read non-temporal field `b` in historical query
50+
Warning 4111 Attempt to read non-temporal field `b` in historical query
5151
select * from t for system_time as of timestamp now(6) group by b having b=2;
5252
a b
5353
Warnings:
54-
Warning 4112 Attempt to read non-temporal field `b` in historical query
54+
Warning 4111 Attempt to read non-temporal field `b` in historical query
5555
select a from t for system_time as of timestamp now(6) where b=2;
5656
a
5757
Warnings:
58-
Warning 4112 Attempt to read non-temporal field `b` in historical query
58+
Warning 4111 Attempt to read non-temporal field `b` in historical query
5959
select a from t for system_time as of timestamp now(6) where b=NULL;
6060
a
6161
Warnings:
62-
Warning 4112 Attempt to read non-temporal field `b` in historical query
62+
Warning 4111 Attempt to read non-temporal field `b` in historical query
6363
select a from t for system_time as of timestamp now(6) where b is NULL;
6464
a
6565
1
6666
3
6767
Warnings:
68-
Warning 4112 Attempt to read non-temporal field `b` in historical query
68+
Warning 4111 Attempt to read non-temporal field `b` in historical query
6969
select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL;
7070
count(*) b
7171
Warnings:
72-
Warning 4112 Attempt to read non-temporal field `b` in historical query
72+
Warning 4111 Attempt to read non-temporal field `b` in historical query
7373
select a, b from t;
7474
a b
7575
1 2
@@ -84,12 +84,12 @@ a b
8484
1 NULL
8585
3 NULL
8686
Warnings:
87-
Warning 4112 Attempt to read non-temporal field `b` in historical query
87+
Warning 4111 Attempt to read non-temporal field `b` in historical query
8888
select * from t for system_time as of timestamp now(6) where b is NULL;
8989
a b
9090
1 NULL
9191
3 NULL
9292
Warnings:
93-
Warning 4112 Attempt to read non-temporal field `b` in historical query
94-
Warning 4112 Attempt to read non-temporal field `b` in historical query
93+
Warning 4111 Attempt to read non-temporal field `b` in historical query
94+
Warning 4111 Attempt to read non-temporal field `b` in historical query
9595
drop table t;

mysql-test/suite/versioning/r/partition.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exact
8585
alter table t1 add partition (
8686
partition p1 history);
8787
Warnings:
88-
Warning 4115 Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
88+
Warning 4114 Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
8989
show create table t1;
9090
Table Create Table
9191
t1 CREATE TABLE `t1` (
@@ -229,7 +229,7 @@ x
229229
### warn about partition switching
230230
delete from t1;
231231
Warnings:
232-
Note 4116 Versioned table `test`.`t1`: switching from partition `p0` to `p1`
232+
Note 4115 Versioned table `test`.`t1`: switching from partition `p0` to `p1`
233233
select * from t1 partition (p0);
234234
x
235235
1
@@ -241,7 +241,7 @@ insert into t1 values (4), (5);
241241
### warn about full partition
242242
delete from t1;
243243
Warnings:
244-
Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
244+
Warning 4113 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
245245
select * from t1 partition (p1) order by x;
246246
x
247247
3
@@ -276,7 +276,7 @@ x
276276
insert into t1 values (4);
277277
delete from t1;
278278
Warnings:
279-
Note 4116 Versioned table `test`.`t1`: switching from partition `p0` to `p1`
279+
Note 4115 Versioned table `test`.`t1`: switching from partition `p0` to `p1`
280280
select * from t1 partition (p1);
281281
x
282282
4
@@ -302,8 +302,8 @@ x
302302
### warn about partition switching and about full partition
303303
delete from t1;
304304
Warnings:
305-
Note 4116 Versioned table `test`.`t1`: switching from partition `p0` to `p1`
306-
Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
305+
Note 4115 Versioned table `test`.`t1`: switching from partition `p0` to `p1`
306+
Warning 4113 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
307307
select * from t1 partition (p0sp0);
308308
x
309309
1

mysql-test/suite/versioning/r/select.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ A
202202
create or replace table t1 (x int);
203203
insert into t1 values (1);
204204
select * from t1 for system_time all;
205-
ERROR HY000: System versioning required: t1
205+
ERROR HY000: Table `t1` is not system-versioned
206206
create or replace table t1 (x int) with system versioning;
207207
insert into t1 values (1);
208208
select * from t1 for system_time all for update;

mysql-test/suite/versioning/r/select_sp.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ A
217217
create or replace table t1 (x int);
218218
insert into t1 values (1);
219219
select * from t1 for system_time all;
220-
ERROR HY000: System versioning required: t1
220+
ERROR HY000: Table `t1` is not system-versioned
221221
create or replace table t1 (x int) with system versioning;
222222
insert into t1 values (1);
223223
select * from t1 for system_time all for update;

mysql-test/suite/versioning/r/truncate.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
create table t (a int);
22
delete history from t before system_time now();
3-
ERROR HY000: System versioning required: t
3+
ERROR HY000: Table `t` is not system-versioned
44
create or replace table t (a int) with system versioning;
55
insert into t values (1);
66
update t set a=2;
@@ -53,7 +53,7 @@ delete history from v before system_time now();
5353
ERROR HY000: TRUNCATE table_name TO doesn't work with VIEWs
5454
create or replace table t (i int);
5555
delete history from t before system_time now();
56-
ERROR HY000: System versioning required: t
56+
ERROR HY000: Table `t` is not system-versioned
5757
create or replace view v as select * from t;
5858
delete history from v before system_time now();
5959
ERROR HY000: TRUNCATE table_name TO doesn't work with VIEWs

mysql-test/suite/versioning/r/trx_id.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ period for system_time (sys_trx_start, sys_trx_end)
1010
ERROR HY000: Temporal operation requires `mysql.transaction_registry` (@@system_versioning_transaction_registry).
1111
set global system_versioning_transaction_registry= 1;
1212
Warnings:
13-
Warning 4145 Transaction-based system versioning is EXPERIMENTAL and is subject to change in future.
13+
Warning 4144 Transaction-based system versioning is EXPERIMENTAL and is subject to change in future.
1414
create or replace table t1 (
1515
x int,
1616
sys_trx_start bigint(20) unsigned as row start invisible,

mysql-test/suite/versioning/t/select.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ select * from t1;
117117

118118
create or replace table t1 (x int);
119119
insert into t1 values (1);
120-
--error ER_VERSIONING_REQUIRED
120+
--error ER_VERS_NOT_VERSIONED
121121
select * from t1 for system_time all;
122122

123123
create or replace table t1 (x int) with system versioning;

mysql-test/suite/versioning/t/select_sp.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ select * from t1;
115115

116116
create or replace table t1 (x int);
117117
insert into t1 values (1);
118-
--error ER_VERSIONING_REQUIRED
118+
--error ER_VERS_NOT_VERSIONED
119119
select * from t1 for system_time all;
120120

121121
create or replace table t1 (x int) with system versioning;

mysql-test/suite/versioning/t/truncate.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--source suite/versioning/engines.inc
22

33
create table t (a int);
4-
--error ER_VERSIONING_REQUIRED
4+
--error ER_VERS_NOT_VERSIONED
55
delete history from t before system_time now();
66

77
# TRUNCATE is not DELETE and trigger must not be called.
@@ -47,7 +47,7 @@ create or replace view v as select * from t;
4747
delete history from v before system_time now();
4848

4949
create or replace table t (i int);
50-
--error ER_VERSIONING_REQUIRED
50+
--error ER_VERS_NOT_VERSIONED
5151
delete history from t before system_time now();
5252
create or replace view v as select * from t;
5353
--error ER_VERS_TRUNCATE_TO_VIEW

0 commit comments

Comments
 (0)