mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
post-review fixes
This commit is contained in:
@@ -350,7 +350,8 @@ sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root,
|
||||
|
||||
if (stat_info.st_size > INT_MAX-1)
|
||||
{
|
||||
my_error(ER_FPARSER_TOO_BIG_FILE, MYF(0), file_name->str);
|
||||
my_printf_error(ER_FPARSER_TOO_BIG_FILE,
|
||||
ER(ER_FPARSER_TOO_BIG_FILE), MYF(0), file_name->str);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
@@ -412,7 +413,8 @@ sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root,
|
||||
frm_error:
|
||||
if (bad_format_errors)
|
||||
{
|
||||
my_error(ER_FPARSER_BAD_HEADER, MYF(0), file_name->str);
|
||||
my_printf_error(ER_FPARSER_BAD_HEADER, ER(ER_FPARSER_BAD_HEADER), MYF(0),
|
||||
file_name->str);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
else
|
||||
@@ -627,7 +629,8 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
|
||||
// it is comment
|
||||
if (!(ptr= strchr(ptr, '\n')))
|
||||
{
|
||||
my_error(ER_FPARSER_EOF_IN_COMMENT, MYF(0), line);
|
||||
my_printf_error(ER_FPARSER_EOF_IN_COMMENT,
|
||||
ER(ER_FPARSER_EOF_IN_COMMENT), MYF(0), line);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
ptr++;
|
||||
@@ -669,8 +672,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
|
||||
(LEX_STRING *)(base +
|
||||
parameter->offset))))
|
||||
{
|
||||
my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0),
|
||||
parameter->name.str, line);
|
||||
my_printf_error(ER_FPARSER_ERROR_IN_PARAMETER,
|
||||
ER(ER_FPARSER_ERROR_IN_PARAMETER), MYF(0),
|
||||
parameter->name.str, line);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
break;
|
||||
@@ -681,8 +685,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
|
||||
(LEX_STRING *)
|
||||
(base + parameter->offset))))
|
||||
{
|
||||
my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0),
|
||||
parameter->name.str, line);
|
||||
my_printf_error(ER_FPARSER_ERROR_IN_PARAMETER,
|
||||
ER(ER_FPARSER_ERROR_IN_PARAMETER), MYF(0),
|
||||
parameter->name.str, line);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
break;
|
||||
@@ -691,8 +696,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
|
||||
case FILE_OPTIONS_REV:
|
||||
if (!(eol= strchr(ptr, '\n')))
|
||||
{
|
||||
my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0),
|
||||
parameter->name.str, line);
|
||||
my_printf_error(ER_FPARSER_ERROR_IN_PARAMETER,
|
||||
ER(ER_FPARSER_ERROR_IN_PARAMETER), MYF(0),
|
||||
parameter->name.str, line);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
{
|
||||
@@ -709,8 +715,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
|
||||
/* yyyy-mm-dd HH:MM:SS = 19(PARSE_FILE_TIMESTAMPLENGTH) characters */
|
||||
if (ptr[PARSE_FILE_TIMESTAMPLENGTH] != '\n')
|
||||
{
|
||||
my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0),
|
||||
parameter->name.str, line);
|
||||
my_printf_error(ER_FPARSER_ERROR_IN_PARAMETER,
|
||||
ER(ER_FPARSER_ERROR_IN_PARAMETER), MYF(0),
|
||||
parameter->name.str, line);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
memcpy(val->str, ptr, PARSE_FILE_TIMESTAMPLENGTH);
|
||||
@@ -763,8 +770,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
|
||||
break;
|
||||
|
||||
list_err_w_message:
|
||||
my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0),
|
||||
parameter->name.str, line);
|
||||
my_printf_error(ER_FPARSER_ERROR_IN_PARAMETER,
|
||||
ER(ER_FPARSER_ERROR_IN_PARAMETER), MYF(0),
|
||||
parameter->name.str, line);
|
||||
list_err:
|
||||
if (change_mem)
|
||||
my_pthread_setspecific_ptr(THR_MALLOC, sql_mem);
|
||||
@@ -779,8 +787,9 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
|
||||
// skip unknown parameter
|
||||
if (!(ptr= strchr(ptr, '\n')))
|
||||
{
|
||||
my_error(ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER, MYF(0),
|
||||
line);
|
||||
my_printf_error(ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER,
|
||||
ER(ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER), MYF(0),
|
||||
line);
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
ptr++;
|
||||
|
||||
Reference in New Issue
Block a user