1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Bug#36768 (partition_info::check_partition_info() reports mal formed

warnings)

Before this fix, several places in the code would raise a warning with an
error code 0, making it impossible for a stored procedure, a connector,
or a client application to trigger logic to handle the warning.
Also, the warning text was hard coded, and therefore not translated.

With this fix, new errors numbers have been created to represent these
warnings, and the warning text is coded in the errmsg.txt file.
This commit is contained in:
Marc Alff
2008-10-06 14:36:15 -06:00
parent 1b488e528e
commit e76bb8c665
12 changed files with 76 additions and 42 deletions

View File

@ -109,6 +109,9 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
DBUG_ENTER("push_warning");
DBUG_PRINT("enter", ("code: %d, msg: %s", code, msg));
DBUG_ASSERT(code != 0);
DBUG_ASSERT(msg != NULL);
if (level == MYSQL_ERROR::WARN_LEVEL_NOTE &&
!(thd->options & OPTION_SQL_NOTES))
DBUG_RETURN(0);
@ -177,7 +180,10 @@ void push_warning_printf(THD *thd, MYSQL_ERROR::enum_warning_level level,
char warning[ERRMSGSIZE+20];
DBUG_ENTER("push_warning_printf");
DBUG_PRINT("enter",("warning: %u", code));
DBUG_ASSERT(code != 0);
DBUG_ASSERT(format != NULL);
va_start(args,format);
my_vsnprintf(warning, sizeof(warning), format, args);
va_end(args);