Skip to content

Commit 903be4e

Browse files
vuvovamidenok
authored andcommitted
remove my_error_as and one unnecessary error message
1 parent f4270fc commit 903be4e

File tree

10 files changed

+62
-104
lines changed

10 files changed

+62
-104
lines changed

include/my_sys.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,6 @@ extern int my_sync(File fd, myf my_flags);
715715
extern int my_sync_dir(const char *dir_name, myf my_flags);
716716
extern int my_sync_dir_by_file(const char *file_name, myf my_flags);
717717
extern const char *my_get_err_msg(uint nr);
718-
extern void my_error_as(uint nr1, uint nr2, myf MyFlags, ...);
719718
extern int my_error_register(const char** (*get_errmsgs) (int nr),
720719
uint first, uint last);
721720
extern my_bool my_error_unregister(uint first, uint last);

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

Lines changed: 23 additions & 23 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 4109 Attempt to read unversioned field `b` in historical query
21-
Warning 4109 Attempt to read unversioned field `b` in historical query
20+
Warning 4108 Attempt to read unversioned field `b` in historical query
21+
Warning 4108 Attempt to read unversioned 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 4109 Attempt to read unversioned field `b` in historical query
27+
Warning 4108 Attempt to read unversioned field `b` in historical query
2828
select count(*) from t group by b for system_time as of timestamp now(6);
2929
count(*)
3030
2
3131
Warnings:
32-
Warning 4109 Attempt to read unversioned field `b` in historical query
32+
Warning 4108 Attempt to read unversioned 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 4109 Attempt to read unversioned field `b` in historical query
39-
Warning 4109 Attempt to read unversioned field `b` in historical query
38+
Warning 4108 Attempt to read unversioned field `b` in historical query
39+
Warning 4108 Attempt to read unversioned 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 4109 Attempt to read unversioned field `b` in historical query
46-
Warning 4109 Attempt to read unversioned field `b` in historical query
45+
Warning 4108 Attempt to read unversioned field `b` in historical query
46+
Warning 4108 Attempt to read unversioned field `b` in historical query
4747
select * from t group by a having a=2 for system_time as of timestamp now(6);
4848
a b
4949
Warnings:
50-
Warning 4109 Attempt to read unversioned field `b` in historical query
50+
Warning 4108 Attempt to read unversioned field `b` in historical query
5151
select * from t group by b having b=2 for system_time as of timestamp now(6);
5252
a b
5353
Warnings:
54-
Warning 4109 Attempt to read unversioned field `b` in historical query
54+
Warning 4108 Attempt to read unversioned field `b` in historical query
5555
select a from t where b=2 for system_time as of timestamp now(6);
5656
a
5757
Warnings:
58-
Warning 4109 Attempt to read unversioned field `b` in historical query
58+
Warning 4108 Attempt to read unversioned field `b` in historical query
5959
select a from t where b=NULL for system_time as of timestamp now(6);
6060
a
6161
Warnings:
62-
Warning 4109 Attempt to read unversioned field `b` in historical query
62+
Warning 4108 Attempt to read unversioned field `b` in historical query
6363
select a from t where b is NULL for system_time as of timestamp now(6);
6464
a
6565
1
6666
3
6767
Warnings:
68-
Warning 4109 Attempt to read unversioned field `b` in historical query
68+
Warning 4108 Attempt to read unversioned field `b` in historical query
6969
select count(*), b from t group by b having b=NULL for system_time as of timestamp now(6);
7070
count(*) b
7171
Warnings:
72-
Warning 4109 Attempt to read unversioned field `b` in historical query
72+
Warning 4108 Attempt to read unversioned field `b` in historical query
7373
select a, b from t;
7474
a b
7575
1 2
@@ -78,29 +78,29 @@ select count(*) from t for system_time as of timestamp now(6) group by b;
7878
count(*)
7979
2
8080
Warnings:
81-
Warning 4109 Attempt to read unversioned field `b` in historical query
81+
Warning 4108 Attempt to read unversioned field `b` in historical query
8282
select * from t for system_time as of timestamp now(6) group by b having b=2;
8383
a b
8484
Warnings:
85-
Warning 4109 Attempt to read unversioned field `b` in historical query
85+
Warning 4108 Attempt to read unversioned field `b` in historical query
8686
select a from t for system_time as of timestamp now(6) where b=2;
8787
a
8888
Warnings:
89-
Warning 4109 Attempt to read unversioned field `b` in historical query
89+
Warning 4108 Attempt to read unversioned field `b` in historical query
9090
select a from t for system_time as of timestamp now(6) where b=NULL;
9191
a
9292
Warnings:
93-
Warning 4109 Attempt to read unversioned field `b` in historical query
93+
Warning 4108 Attempt to read unversioned field `b` in historical query
9494
select a from t for system_time as of timestamp now(6) where b is NULL;
9595
a
9696
1
9797
3
9898
Warnings:
99-
Warning 4109 Attempt to read unversioned field `b` in historical query
99+
Warning 4108 Attempt to read unversioned field `b` in historical query
100100
select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL;
101101
count(*) b
102102
Warnings:
103-
Warning 4109 Attempt to read unversioned field `b` in historical query
103+
Warning 4108 Attempt to read unversioned field `b` in historical query
104104
create or replace table t (
105105
a int,
106106
b int not null without system versioning
@@ -111,12 +111,12 @@ a b
111111
1 NULL
112112
3 NULL
113113
Warnings:
114-
Warning 4109 Attempt to read unversioned field `b` in historical query
114+
Warning 4108 Attempt to read unversioned field `b` in historical query
115115
select * from t for system_time as of timestamp now(6) where b is NULL;
116116
a b
117117
1 NULL
118118
3 NULL
119119
Warnings:
120-
Warning 4109 Attempt to read unversioned field `b` in historical query
121-
Warning 4109 Attempt to read unversioned field `b` in historical query
120+
Warning 4108 Attempt to read unversioned field `b` in historical query
121+
Warning 4108 Attempt to read unversioned field `b` in historical query
122122
drop table t;

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ERROR HY000: Wrong partitions consistency for `t1`: must have at least one 'VERS
7272
alter table t1 add partition (
7373
partition p1 versioning);
7474
Warnings:
75-
Warning 4112 Maybe missing parameters: no rotation condition for multiple `VERSIONING` partitions.
75+
Warning 4111 Maybe missing parameters: no rotation condition for multiple `VERSIONING` partitions.
7676
show create table t1;
7777
Table Create Table
7878
t1 CREATE TABLE `t1` (
@@ -209,7 +209,7 @@ x
209209
2
210210
delete from t1;
211211
Warnings:
212-
Note 4113 Switching from partition `p0` to `p1`
212+
Note 4112 Switching from partition `p0` to `p1`
213213
select * from t1 partition (p0) for system_time all;
214214
x
215215
1
@@ -219,7 +219,7 @@ x
219219
insert into t1 values (3);
220220
delete from t1;
221221
Warnings:
222-
Warning 4111 Using full partition `p1`, need more VERSIONING partitions!
222+
Warning 4110 Using full partition `p1`, need more VERSIONING partitions!
223223
select * from t1 partition (p1) for system_time all;
224224
x
225225
2
@@ -252,7 +252,7 @@ x
252252
insert into t1 values (4);
253253
delete from t1;
254254
Warnings:
255-
Note 4113 Switching from partition `p0` to `p1`
255+
Note 4112 Switching from partition `p0` to `p1`
256256
select * from t1 partition (p1) for system_time all;
257257
x
258258
4
@@ -274,8 +274,8 @@ x
274274
2
275275
delete from t1;
276276
Warnings:
277-
Note 4113 Switching from partition `p0` to `p1`
278-
Warning 4111 Using full partition `p1`, need more VERSIONING partitions!
277+
Note 4112 Switching from partition `p0` to `p1`
278+
Warning 4110 Using full partition `p1`, need more VERSIONING partitions!
279279
select * from t1 partition (p0sp0) for system_time all;
280280
x
281281
1

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ create table t(
44
a int
55
);
66
show create table t;
7-
--error ER_VERS_WRONG_PARAMS
7+
--error ER_VERS_NOT_VERSIONED
88
alter table t drop system versioning;
99

1010
alter table t add system versioning;
@@ -122,9 +122,9 @@ alter table t drop system versioning;
122122
select * from t;
123123
show create table t;
124124

125-
--error ER_VERS_WRONG_PARAMS
125+
--error ER_VERS_NOT_VERSIONED
126126
alter table t modify a int with system versioning;
127-
--error ER_VERS_WRONG_PARAMS
127+
--error ER_VERS_NOT_VERSIONED
128128
alter table t modify a int without system versioning;
129129

130130
alter table t add system versioning;

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ create or replace table t1 (
3939
show create table t1;
4040

4141
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
42-
--error ER_VERS_WRONG_PARAMS
42+
--error ER_MISMATCH
4343
eval create or replace table t1 (
4444
x3 int unsigned,
4545
Sys_start $sys_datatype generated always as row start,
@@ -49,7 +49,7 @@ eval create or replace table t1 (
4949
) with system versioning;
5050

5151
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
52-
--error ER_VERS_WRONG_PARAMS
52+
--error ER_MISMATCH
5353
eval create or replace table t1 (
5454
x4 int unsigned,
5555
Sys_start $sys_datatype generated always as row start,
@@ -58,7 +58,7 @@ eval create or replace table t1 (
5858
) with system versioning;
5959

6060
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
61-
--error ER_VERS_WRONG_PARAMS
61+
--error ER_MISMATCH
6262
eval create or replace table t1 (
6363
x5 int unsigned,
6464
Sys_start $sys_datatype generated always as row start,
@@ -67,14 +67,14 @@ eval create or replace table t1 (
6767
period for system_time (Sys_start, Sys_end)
6868
) with system versioning;
6969

70-
--error ER_VERS_WRONG_PARAMS
70+
--error ER_MISSING
7171
create or replace table t1 (
7272
x6 int unsigned,
7373
period for system_time (Sys_start, Sys_end)
7474
) with system versioning;
7575

7676
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
77-
--error ER_VERS_WRONG_PARAMS
77+
--error ER_MISSING
7878
eval create or replace table t1 (
7979
x7 int unsigned,
8080
Sys_start $sys_datatype generated always as row start,
@@ -84,7 +84,7 @@ eval create or replace table t1 (
8484
);
8585

8686
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
87-
--error ER_VERS_WRONG_PARAMS
87+
--error ER_MISMATCH
8888
eval create or replace table t1 (
8989
x8 int unsigned,
9090
Sys_start $sys_datatype generated always as row start,
@@ -93,7 +93,7 @@ eval create or replace table t1 (
9393
) with system versioning;
9494

9595
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
96-
--error ER_VERS_WRONG_PARAMS
96+
--error ER_MISSING
9797
eval create or replace table t1 (
9898
x9 int unsigned,
9999
Sys_start $sys_datatype generated always as row start,
@@ -102,7 +102,7 @@ eval create or replace table t1 (
102102
);
103103

104104
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
105-
--error ER_VERS_WRONG_PARAMS
105+
--error ER_MISSING
106106
eval create or replace table t1 (
107107
x10 int unsigned,
108108
Sys_start $sys_datatype generated always as row start,
@@ -188,7 +188,7 @@ create or replace table t1 (
188188
A7 int without system versioning
189189
);
190190

191-
--error ER_VERS_WRONG_PARAMS
191+
--error ER_VERS_NO_COLS_DEFINED
192192
create or replace table t1 (
193193
A8 int without system versioning
194194
) with system versioning;
@@ -253,7 +253,7 @@ create or replace table t3 with system versioning select * from t1 for system_ti
253253
show create table t3;
254254

255255
create or replace table t2 with system versioning as select * from t0;
256-
--error ER_VERS_WRONG_PARAMS
256+
--error ER_VERS_DIFFERENT_TABLES
257257
create or replace table t3 with system versioning select x, y, t1.sys_trx_start, t2.en from t1, t2;
258258

259259
insert into t2 values (1), (2);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ select @ts0 = @ts1;
152152
select @ts2 = @ts3;
153153

154154
# rotation by LIMIT
155-
--error ER_VERS_WRONG_PARAMS
155+
--error ER_PART_WRONG_VALUE
156156
create or replace table t1 (x int)
157157
with system versioning
158158
partition by system_time limit 0 (
@@ -184,7 +184,7 @@ delete from t1;
184184
select * from t1 partition (p1) for system_time all;
185185

186186
# rotation by INTERVAL
187-
--error ER_VERS_WRONG_PARAMS
187+
--error ER_PART_WRONG_VALUE
188188
create or replace table t1 (x int)
189189
with system versioning
190190
partition by system_time interval 0 second (

mysys/my_error.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -327,39 +327,3 @@ void my_error_unregister_all(void)
327327

328328
my_errmsgs_list= &my_errmsgs_globerrs;
329329
}
330-
331-
332-
/**
333-
Format one error and print out as another error code.
334-
335-
@note
336-
Stacks two error messages and prints as single error message.
337-
Like my_error(), but error argument is another formatted error
338-
339-
@param nr1 error number of printed message. nr1 must have exactly one %s
340-
parameter which will be formatted message of error nr2.
341-
@param nr2 error number of formatted message
342-
@param MyFlags Flags
343-
@param ... parameters for error nr2
344-
*/
345-
346-
void my_error_as(uint nr1, uint nr2, myf MyFlags, ...)
347-
{
348-
const char *format;
349-
va_list args;
350-
char ebuff[ERRMSGSIZE];
351-
DBUG_ENTER("my_suberror");
352-
DBUG_PRINT("my", ("nr1: %d nr2: %d MyFlags: %lu errno: %d", nr1, nr2, MyFlags, errno));
353-
354-
if (!(format = my_get_err_msg(nr2)))
355-
(void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr2);
356-
else
357-
{
358-
va_start(args,MyFlags);
359-
(void) my_vsnprintf_ex(&my_charset_utf8_general_ci, ebuff,
360-
sizeof(ebuff), format, args);
361-
va_end(args);
362-
}
363-
my_error(nr1, MyFlags, ebuff);
364-
DBUG_VOID_RETURN;
365-
}

0 commit comments

Comments
 (0)