From ff4fde18c40fa92caabff596100357c2b411116f Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Mon, 6 Oct 2008 14:36:15 -0600 Subject: 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. --- sql/sql_plugin.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sql/sql_plugin.cc') diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 089ef012d3a..13b2bfef24d 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1715,16 +1715,16 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) } if (!plugin->plugin_dl) { - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, - "Built-in plugins cannot be deleted,."); + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + WARN_PLUGIN_DELETE_BUILTIN, ER(WARN_PLUGIN_DELETE_BUILTIN)); my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "PLUGIN", name->str); goto err; } plugin->state= PLUGIN_IS_DELETED; if (plugin->ref_count) - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, - "Plugin is busy and will be uninstalled on shutdown"); + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + WARN_PLUGIN_BUSY, ER(WARN_PLUGIN_BUSY)); else reap_needed= true; reap_plugins(); -- cgit v1.2.1