diff options
author | monty@mashka.mysql.fi <> | 2003-01-06 01:48:59 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2003-01-06 01:48:59 +0200 |
commit | 1f6ecc0cd3d9acf4751ebbbf8db8b6ee468d3abf (patch) | |
tree | 5fe133480d7e74a88990405ae324694fb8797fa5 /sql/sql_error.cc | |
parent | f9772317eefe95fe8152d69593082b2864164e16 (diff) | |
download | mariadb-git-1f6ecc0cd3d9acf4751ebbbf8db8b6ee468d3abf.tar.gz |
Changed mysql-test to print warnings for not existing table to DROP TABLE
Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names.
changed store_warning() -> push_warning_print()
Diffstat (limited to 'sql/sql_error.cc')
-rw-r--r-- | sql/sql_error.cc | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/sql/sql_error.cc b/sql/sql_error.cc index c9684855b86..5508be5167a 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -105,31 +105,29 @@ void push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level, uint code, } /* - Store warning to the list + Push the warning/error to error list if there is still room in the list + + SYNOPSIS + push_warning_printf() + thd Thread handle + level Severity of warning (note, warning, error ...) + code Error number + msg Clear error message */ -void store_warning(THD *thd, uint errcode, ...) +void push_warning_printf(THD *thd, MYSQL_ERROR::enum_warning_level level, + uint code, const char *format, ...) { -#if TESTS_TO_BE_FIXED va_list args; - const char *format; char warning[ERRMSGSIZE+20]; - DBUG_ENTER("store_warning"); - DBUG_PRINT("enter",("warning: %u",errcode)); + DBUG_ENTER("push_warning_printf"); + DBUG_PRINT("enter",("warning: %u", code)); - va_start(args,errcode); - if (errcode) - format= ER(errcode); - else - { - format=va_arg(args,char*); - errcode= ER_UNKNOWN_ERROR; - } - (void) vsprintf (warning,format,args); + va_start(args,format); + my_vsnprintf(warning, sizeof(warning), format, args); va_end(args); - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, errcode, warning); + push_warning(thd, level, code, warning); DBUG_VOID_RETURN; -#endif } |