Commit 903be4e6 authored by Sergei Golubchik's avatar Sergei Golubchik Committed by Aleksey Midenkov

remove my_error_as and one unnecessary error message

parent f4270fc5
...@@ -715,7 +715,6 @@ extern int my_sync(File fd, myf my_flags); ...@@ -715,7 +715,6 @@ extern int my_sync(File fd, myf my_flags);
extern int my_sync_dir(const char *dir_name, myf my_flags); extern int my_sync_dir(const char *dir_name, myf my_flags);
extern int my_sync_dir_by_file(const char *file_name, myf my_flags); extern int my_sync_dir_by_file(const char *file_name, myf my_flags);
extern const char *my_get_err_msg(uint nr); extern const char *my_get_err_msg(uint nr);
extern void my_error_as(uint nr1, uint nr2, myf MyFlags, ...);
extern int my_error_register(const char** (*get_errmsgs) (int nr), extern int my_error_register(const char** (*get_errmsgs) (int nr),
uint first, uint last); uint first, uint last);
extern my_bool my_error_unregister(uint first, uint last); extern my_bool my_error_unregister(uint first, uint last);
......
...@@ -17,59 +17,59 @@ a b b+0 ...@@ -17,59 +17,59 @@ a b b+0
1 NULL NULL 1 NULL NULL
3 NULL NULL 3 NULL NULL
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select * from t for system_time as of timestamp now(6); select * from t for system_time as of timestamp now(6);
a b a b
1 NULL 1 NULL
3 NULL 3 NULL
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select count(*) from t group by b for system_time as of timestamp now(6); select count(*) from t group by b for system_time as of timestamp now(6);
count(*) count(*)
2 2
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select * from t for system_time as of timestamp now(6) order by b asc; select * from t for system_time as of timestamp now(6) order by b asc;
a b a b
1 NULL 1 NULL
3 NULL 3 NULL
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select * from t for system_time as of timestamp now(6) order by b desc; select * from t for system_time as of timestamp now(6) order by b desc;
a b a b
1 NULL 1 NULL
3 NULL 3 NULL
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select * from t group by a having a=2 for system_time as of timestamp now(6); select * from t group by a having a=2 for system_time as of timestamp now(6);
a b a b
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select * from t group by b having b=2 for system_time as of timestamp now(6); select * from t group by b having b=2 for system_time as of timestamp now(6);
a b a b
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select a from t where b=2 for system_time as of timestamp now(6); select a from t where b=2 for system_time as of timestamp now(6);
a a
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select a from t where b=NULL for system_time as of timestamp now(6); select a from t where b=NULL for system_time as of timestamp now(6);
a a
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select a from t where b is NULL for system_time as of timestamp now(6); select a from t where b is NULL for system_time as of timestamp now(6);
a a
1 1
3 3
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select count(*), b from t group by b having b=NULL for system_time as of timestamp now(6); select count(*), b from t group by b having b=NULL for system_time as of timestamp now(6);
count(*) b count(*) b
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select a, b from t; select a, b from t;
a b a b
1 2 1 2
...@@ -78,29 +78,29 @@ select count(*) from t for system_time as of timestamp now(6) group by b; ...@@ -78,29 +78,29 @@ select count(*) from t for system_time as of timestamp now(6) group by b;
count(*) count(*)
2 2
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select * from t for system_time as of timestamp now(6) group by b having b=2; select * from t for system_time as of timestamp now(6) group by b having b=2;
a b a b
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select a from t for system_time as of timestamp now(6) where b=2; select a from t for system_time as of timestamp now(6) where b=2;
a a
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select a from t for system_time as of timestamp now(6) where b=NULL; select a from t for system_time as of timestamp now(6) where b=NULL;
a a
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select a from t for system_time as of timestamp now(6) where b is NULL; select a from t for system_time as of timestamp now(6) where b is NULL;
a a
1 1
3 3
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL; select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL;
count(*) b count(*) b
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
create or replace table t ( create or replace table t (
a int, a int,
b int not null without system versioning b int not null without system versioning
...@@ -111,12 +111,12 @@ a b ...@@ -111,12 +111,12 @@ a b
1 NULL 1 NULL
3 NULL 3 NULL
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
select * from t for system_time as of timestamp now(6) where b is NULL; select * from t for system_time as of timestamp now(6) where b is NULL;
a b a b
1 NULL 1 NULL
3 NULL 3 NULL
Warnings: Warnings:
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
Warning 4109 Attempt to read unversioned field `b` in historical query Warning 4108 Attempt to read unversioned field `b` in historical query
drop table t; drop table t;
...@@ -72,7 +72,7 @@ ERROR HY000: Wrong partitions consistency for `t1`: must have at least one 'VERS ...@@ -72,7 +72,7 @@ ERROR HY000: Wrong partitions consistency for `t1`: must have at least one 'VERS
alter table t1 add partition ( alter table t1 add partition (
partition p1 versioning); partition p1 versioning);
Warnings: Warnings:
Warning 4112 Maybe missing parameters: no rotation condition for multiple `VERSIONING` partitions. Warning 4111 Maybe missing parameters: no rotation condition for multiple `VERSIONING` partitions.
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
...@@ -209,7 +209,7 @@ x ...@@ -209,7 +209,7 @@ x
2 2
delete from t1; delete from t1;
Warnings: Warnings:
Note 4113 Switching from partition `p0` to `p1` Note 4112 Switching from partition `p0` to `p1`
select * from t1 partition (p0) for system_time all; select * from t1 partition (p0) for system_time all;
x x
1 1
...@@ -219,7 +219,7 @@ x ...@@ -219,7 +219,7 @@ x
insert into t1 values (3); insert into t1 values (3);
delete from t1; delete from t1;
Warnings: Warnings:
Warning 4111 Using full partition `p1`, need more VERSIONING partitions! Warning 4110 Using full partition `p1`, need more VERSIONING partitions!
select * from t1 partition (p1) for system_time all; select * from t1 partition (p1) for system_time all;
x x
2 2
...@@ -252,7 +252,7 @@ x ...@@ -252,7 +252,7 @@ x
insert into t1 values (4); insert into t1 values (4);
delete from t1; delete from t1;
Warnings: Warnings:
Note 4113 Switching from partition `p0` to `p1` Note 4112 Switching from partition `p0` to `p1`
select * from t1 partition (p1) for system_time all; select * from t1 partition (p1) for system_time all;
x x
4 4
...@@ -274,8 +274,8 @@ x ...@@ -274,8 +274,8 @@ x
2 2
delete from t1; delete from t1;
Warnings: Warnings:
Note 4113 Switching from partition `p0` to `p1` Note 4112 Switching from partition `p0` to `p1`
Warning 4111 Using full partition `p1`, need more VERSIONING partitions! Warning 4110 Using full partition `p1`, need more VERSIONING partitions!
select * from t1 partition (p0sp0) for system_time all; select * from t1 partition (p0sp0) for system_time all;
x x
1 1
......
...@@ -4,7 +4,7 @@ create table t( ...@@ -4,7 +4,7 @@ create table t(
a int a int
); );
show create table t; show create table t;
--error ER_VERS_WRONG_PARAMS --error ER_VERS_NOT_VERSIONED
alter table t drop system versioning; alter table t drop system versioning;
alter table t add system versioning; alter table t add system versioning;
...@@ -122,9 +122,9 @@ alter table t drop system versioning; ...@@ -122,9 +122,9 @@ alter table t drop system versioning;
select * from t; select * from t;
show create table t; show create table t;
--error ER_VERS_WRONG_PARAMS --error ER_VERS_NOT_VERSIONED
alter table t modify a int with system versioning; alter table t modify a int with system versioning;
--error ER_VERS_WRONG_PARAMS --error ER_VERS_NOT_VERSIONED
alter table t modify a int without system versioning; alter table t modify a int without system versioning;
alter table t add system versioning; alter table t add system versioning;
......
...@@ -39,7 +39,7 @@ create or replace table t1 ( ...@@ -39,7 +39,7 @@ create or replace table t1 (
show create table t1; show create table t1;
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE --replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
--error ER_VERS_WRONG_PARAMS --error ER_MISMATCH
eval create or replace table t1 ( eval create or replace table t1 (
x3 int unsigned, x3 int unsigned,
Sys_start $sys_datatype generated always as row start, Sys_start $sys_datatype generated always as row start,
...@@ -49,7 +49,7 @@ eval create or replace table t1 ( ...@@ -49,7 +49,7 @@ eval create or replace table t1 (
) with system versioning; ) with system versioning;
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE --replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
--error ER_VERS_WRONG_PARAMS --error ER_MISMATCH
eval create or replace table t1 ( eval create or replace table t1 (
x4 int unsigned, x4 int unsigned,
Sys_start $sys_datatype generated always as row start, Sys_start $sys_datatype generated always as row start,
...@@ -58,7 +58,7 @@ eval create or replace table t1 ( ...@@ -58,7 +58,7 @@ eval create or replace table t1 (
) with system versioning; ) with system versioning;
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE --replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
--error ER_VERS_WRONG_PARAMS --error ER_MISMATCH
eval create or replace table t1 ( eval create or replace table t1 (
x5 int unsigned, x5 int unsigned,
Sys_start $sys_datatype generated always as row start, Sys_start $sys_datatype generated always as row start,
...@@ -67,14 +67,14 @@ eval create or replace table t1 ( ...@@ -67,14 +67,14 @@ eval create or replace table t1 (
period for system_time (Sys_start, Sys_end) period for system_time (Sys_start, Sys_end)
) with system versioning; ) with system versioning;
--error ER_VERS_WRONG_PARAMS --error ER_MISSING
create or replace table t1 ( create or replace table t1 (
x6 int unsigned, x6 int unsigned,
period for system_time (Sys_start, Sys_end) period for system_time (Sys_start, Sys_end)
) with system versioning; ) with system versioning;
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE --replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
--error ER_VERS_WRONG_PARAMS --error ER_MISSING
eval create or replace table t1 ( eval create or replace table t1 (
x7 int unsigned, x7 int unsigned,
Sys_start $sys_datatype generated always as row start, Sys_start $sys_datatype generated always as row start,
...@@ -84,7 +84,7 @@ eval create or replace table t1 ( ...@@ -84,7 +84,7 @@ eval create or replace table t1 (
); );
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE --replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
--error ER_VERS_WRONG_PARAMS --error ER_MISMATCH
eval create or replace table t1 ( eval create or replace table t1 (
x8 int unsigned, x8 int unsigned,
Sys_start $sys_datatype generated always as row start, Sys_start $sys_datatype generated always as row start,
...@@ -93,7 +93,7 @@ eval create or replace table t1 ( ...@@ -93,7 +93,7 @@ eval create or replace table t1 (
) with system versioning; ) with system versioning;
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE --replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
--error ER_VERS_WRONG_PARAMS --error ER_MISSING
eval create or replace table t1 ( eval create or replace table t1 (
x9 int unsigned, x9 int unsigned,
Sys_start $sys_datatype generated always as row start, Sys_start $sys_datatype generated always as row start,
...@@ -102,7 +102,7 @@ eval create or replace table t1 ( ...@@ -102,7 +102,7 @@ eval create or replace table t1 (
); );
--replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE --replace_result "bigint unsigned" SYS_TRX_TYPE timestamp(6) SYS_TRX_TYPE
--error ER_VERS_WRONG_PARAMS --error ER_MISSING
eval create or replace table t1 ( eval create or replace table t1 (
x10 int unsigned, x10 int unsigned,
Sys_start $sys_datatype generated always as row start, Sys_start $sys_datatype generated always as row start,
...@@ -188,7 +188,7 @@ create or replace table t1 ( ...@@ -188,7 +188,7 @@ create or replace table t1 (
A7 int without system versioning A7 int without system versioning
); );
--error ER_VERS_WRONG_PARAMS --error ER_VERS_NO_COLS_DEFINED
create or replace table t1 ( create or replace table t1 (
A8 int without system versioning A8 int without system versioning
) with system versioning; ) with system versioning;
...@@ -253,7 +253,7 @@ create or replace table t3 with system versioning select * from t1 for system_ti ...@@ -253,7 +253,7 @@ create or replace table t3 with system versioning select * from t1 for system_ti
show create table t3; show create table t3;
create or replace table t2 with system versioning as select * from t0; create or replace table t2 with system versioning as select * from t0;
--error ER_VERS_WRONG_PARAMS --error ER_VERS_DIFFERENT_TABLES
create or replace table t3 with system versioning select x, y, t1.sys_trx_start, t2.en from t1, t2; create or replace table t3 with system versioning select x, y, t1.sys_trx_start, t2.en from t1, t2;
insert into t2 values (1), (2); insert into t2 values (1), (2);
......
...@@ -152,7 +152,7 @@ select @ts0 = @ts1; ...@@ -152,7 +152,7 @@ select @ts0 = @ts1;
select @ts2 = @ts3; select @ts2 = @ts3;
# rotation by LIMIT # rotation by LIMIT
--error ER_VERS_WRONG_PARAMS --error ER_PART_WRONG_VALUE
create or replace table t1 (x int) create or replace table t1 (x int)
with system versioning with system versioning
partition by system_time limit 0 ( partition by system_time limit 0 (
...@@ -184,7 +184,7 @@ delete from t1; ...@@ -184,7 +184,7 @@ delete from t1;
select * from t1 partition (p1) for system_time all; select * from t1 partition (p1) for system_time all;
# rotation by INTERVAL # rotation by INTERVAL
--error ER_VERS_WRONG_PARAMS --error ER_PART_WRONG_VALUE
create or replace table t1 (x int) create or replace table t1 (x int)
with system versioning with system versioning
partition by system_time interval 0 second ( partition by system_time interval 0 second (
......
...@@ -327,39 +327,3 @@ void my_error_unregister_all(void) ...@@ -327,39 +327,3 @@ void my_error_unregister_all(void)
my_errmsgs_list= &my_errmsgs_globerrs; my_errmsgs_list= &my_errmsgs_globerrs;
} }
/**
Format one error and print out as another error code.
@note
Stacks two error messages and prints as single error message.
Like my_error(), but error argument is another formatted error
@param nr1 error number of printed message. nr1 must have exactly one %s
parameter which will be formatted message of error nr2.
@param nr2 error number of formatted message
@param MyFlags Flags
@param ... parameters for error nr2
*/
void my_error_as(uint nr1, uint nr2, myf MyFlags, ...)
{
const char *format;
va_list args;
char ebuff[ERRMSGSIZE];
DBUG_ENTER("my_suberror");
DBUG_PRINT("my", ("nr1: %d nr2: %d MyFlags: %lu errno: %d", nr1, nr2, MyFlags, errno));
if (!(format = my_get_err_msg(nr2)))
(void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr2);
else
{
va_start(args,MyFlags);
(void) my_vsnprintf_ex(&my_charset_utf8_general_ci, ebuff,
sizeof(ebuff), format, args);
va_end(args);
}
my_error(nr1, MyFlags, ebuff);
DBUG_VOID_RETURN;
}
...@@ -6823,8 +6823,7 @@ bool Vers_parse_info::check_and_fix_implicit( ...@@ -6823,8 +6823,7 @@ bool Vers_parse_info::check_and_fix_implicit(
if ((system_time.start || system_time.end || as_row.start || as_row.end) && if ((system_time.start || system_time.end || as_row.start || as_row.end) &&
!with_system_versioning) !with_system_versioning)
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_MISSING, MYF(0), table_name, my_error(ER_MISSING, MYF(0), table_name, "WITH SYSTEM VERSIONING");
"WITH SYSTEM VERSIONING");
return true; return true;
} }
...@@ -6840,7 +6839,7 @@ bool Vers_parse_info::check_and_fix_implicit( ...@@ -6840,7 +6839,7 @@ bool Vers_parse_info::check_and_fix_implicit(
if (orig_table && orig_table != f->field->orig_table) if (orig_table && orig_table != f->field->orig_table)
{ {
err_different_tables: err_different_tables:
my_error_as(ER_VERS_WRONG_PARAMS, ER_VERS_DIFFERENT_TABLES, MYF(0), table_name); my_error(ER_VERS_DIFFERENT_TABLES, MYF(0), table_name);
return true; return true;
} }
orig_table= f->field->orig_table; orig_table= f->field->orig_table;
...@@ -6901,7 +6900,7 @@ bool Vers_parse_info::check_and_fix_implicit( ...@@ -6901,7 +6900,7 @@ bool Vers_parse_info::check_and_fix_implicit(
vers_cols == 0 && vers_cols == 0 &&
(plain_cols == 0 || !table_with_system_versioning)) (plain_cols == 0 || !table_with_system_versioning))
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_VERS_NO_COLS_DEFINED, MYF(0), my_error(ER_VERS_NO_COLS_DEFINED, MYF(0),
table_name, "WITH SYSTEM VERSIONING"); table_name, "WITH SYSTEM VERSIONING");
return true; return true;
} }
...@@ -6960,7 +6959,7 @@ bool Vers_parse_info::check_and_fix_alter(THD *thd, Alter_info *alter_info, ...@@ -6960,7 +6959,7 @@ bool Vers_parse_info::check_and_fix_alter(THD *thd, Alter_info *alter_info,
{ {
if (!share->versioned) if (!share->versioned)
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_VERS_NOT_VERSIONED, MYF(0), table_name); my_error(ER_VERS_NOT_VERSIONED, MYF(0), table_name);
return true; return true;
} }
...@@ -7045,7 +7044,7 @@ bool Vers_parse_info::check_and_fix_alter(THD *thd, Alter_info *alter_info, ...@@ -7045,7 +7044,7 @@ bool Vers_parse_info::check_and_fix_alter(THD *thd, Alter_info *alter_info,
if ((versioned_fields || unversioned_fields) && !share->versioned) if ((versioned_fields || unversioned_fields) && !share->versioned)
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_VERS_NOT_VERSIONED, MYF(0), table_name); my_error(ER_VERS_NOT_VERSIONED, MYF(0), table_name);
return true; return true;
} }
...@@ -7175,7 +7174,7 @@ Vers_parse_info::fix_create_like(Alter_info &alter_info, HA_CREATE_INFO &create_ ...@@ -7175,7 +7174,7 @@ Vers_parse_info::fix_create_like(Alter_info &alter_info, HA_CREATE_INFO &create_
if (!f_start || !f_end) if (!f_start || !f_end)
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_MISSING, MYF(0), src_table.table_name, my_error(ER_MISSING, MYF(0), src_table.table_name,
f_start ? "AS ROW END" : "AS ROW START"); f_start ? "AS ROW END" : "AS ROW START");
return true; return true;
} }
...@@ -7192,28 +7191,27 @@ bool Vers_parse_info::check_with_conditions(const char *table_name) const ...@@ -7192,28 +7191,27 @@ bool Vers_parse_info::check_with_conditions(const char *table_name) const
{ {
if (!as_row.start || !as_row.end) if (!as_row.start || !as_row.end)
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_MISSING, MYF(0), table_name, my_error(ER_MISSING, MYF(0), table_name,
as_row.start ? "AS ROW END" : "AS ROW START"); as_row.start ? "AS ROW END" : "AS ROW START");
return true; return true;
} }
if (!system_time.start || !system_time.end) if (!system_time.start || !system_time.end)
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_MISSING, MYF(0), table_name, my_error(ER_MISSING, MYF(0), table_name, "PERIOD FOR SYSTEM_TIME");
"PERIOD FOR SYSTEM_TIME");
return true; return true;
} }
if (as_row.start != system_time.start) if (as_row.start != system_time.start)
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_MISMATCH, MYF(0), table_name, my_error(ER_MISMATCH, MYF(0), table_name,
"PERIOD FOR SYSTEM_TIME", "AS ROW START"); "PERIOD FOR SYSTEM_TIME", "AS ROW START");
return true; return true;
} }
if (as_row.end != system_time.end) if (as_row.end != system_time.end)
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_MISMATCH, MYF(0), table_name, my_error(ER_MISMATCH, MYF(0), table_name,
"PERIOD FOR SYSTEM_TIME", "AS ROW END"); "PERIOD FOR SYSTEM_TIME", "AS ROW END");
return true; return true;
} }
......
...@@ -7815,9 +7815,6 @@ ER_UPDATE_INFO_WITH_SYSTEM_VERSIONING ...@@ -7815,9 +7815,6 @@ ER_UPDATE_INFO_WITH_SYSTEM_VERSIONING
ER_VERS_FIELD_WRONG_TYPE ER_VERS_FIELD_WRONG_TYPE
eng "%`s must be of type %`s for versioned table %`s" eng "%`s must be of type %`s for versioned table %`s"
ER_VERS_WRONG_PARAMS
eng "Wrong parameters %s"
ER_VERS_ENGINE_UNSUPPORTED ER_VERS_ENGINE_UNSUPPORTED
eng "Engine does not support System Versioning for %`s" eng "Engine does not support System Versioning for %`s"
...@@ -7873,22 +7870,22 @@ ER_NOT_ALLOWED ...@@ -7873,22 +7870,22 @@ ER_NOT_ALLOWED
eng "for %`s: not allowed '%s'" eng "for %`s: not allowed '%s'"
ER_VERS_DIFFERENT_TABLES ER_VERS_DIFFERENT_TABLES
eng "for %`s: system fields selected from different tables" eng "Wrong parameters for %`s: system fields selected from different tables"
ER_VERS_NO_COLS_DEFINED ER_VERS_NO_COLS_DEFINED
eng "for %`s: no columns defined '%s'" eng "Wrong parameters for %`s: no columns defined '%s'"
ER_VERS_NOT_VERSIONED ER_VERS_NOT_VERSIONED
eng "for %`s: table is not versioned" eng "Wrong parameters for %`s: table is not versioned"
ER_MISSING ER_MISSING
eng "for %`s: missing '%s'" eng "Wrong parameters for %`s: missing '%s'"
ER_MISMATCH ER_MISMATCH
eng "for %`s: mismatch '%s' and '%s'" eng "Wrong parameters for %`s: mismatch '%s' and '%s'"
ER_PART_WRONG_VALUE ER_PART_WRONG_VALUE
eng "for partitioned %`s: wrong value for '%s'" eng "Wrong parameters for partitioned %`s: wrong value for '%s'"
ER_VERS_WRONG_PARTS ER_VERS_WRONG_PARTS
eng "Wrong partitions consistency for %`s: must have at least one 'VERSIONING' and exactly one last 'AS OF NOW'" eng "Wrong partitions consistency for %`s: must have at least one 'VERSIONING' and exactly one last 'AS OF NOW'"
......
...@@ -5667,7 +5667,7 @@ opt_versioning_interval: ...@@ -5667,7 +5667,7 @@ opt_versioning_interval:
if (get_interval_value($2, $3, &interval) || if (get_interval_value($2, $3, &interval) ||
part_info->vers_set_interval(interval)) part_info->vers_set_interval(interval))
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_PART_WRONG_VALUE, MYF(0), my_error(ER_PART_WRONG_VALUE, MYF(0),
Lex->create_last_non_select_table->table_name, "INTERVAL"); Lex->create_last_non_select_table->table_name, "INTERVAL");
MYSQL_YYABORT; MYSQL_YYABORT;
} }
...@@ -5682,7 +5682,7 @@ opt_versioning_limit: ...@@ -5682,7 +5682,7 @@ opt_versioning_limit:
DBUG_ASSERT(part_info->part_type == VERSIONING_PARTITION); DBUG_ASSERT(part_info->part_type == VERSIONING_PARTITION);
if (part_info->vers_set_limit($2)) if (part_info->vers_set_limit($2))
{ {
my_error_as(ER_VERS_WRONG_PARAMS, ER_PART_WRONG_VALUE, MYF(0), my_error(ER_PART_WRONG_VALUE, MYF(0),
Lex->create_last_non_select_table->table_name, "LIMIT"); Lex->create_last_non_select_table->table_name, "LIMIT");
MYSQL_YYABORT; MYSQL_YYABORT;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment