From b79daf410963420487778dc764192eab8c813778 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2007 13:37:56 -0400 Subject: [PATCH] Re-set the plugin name so that we can be sure the plugin init() function doesn't set it to something else. --- sql/sql_show.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 4d0783a9a92..5b8cb93baab 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -5904,6 +5904,8 @@ int initialize_schema_table(st_plugin_int *plugin) schema_table->old_format= make_old_format; schema_table->idx_field1= -1, schema_table->idx_field2= -1; + + /* Make the name available to the init() function. */ schema_table->table_name= plugin->name.str; if (plugin->plugin->init(schema_table)) @@ -5912,6 +5914,9 @@ int initialize_schema_table(st_plugin_int *plugin) plugin->name.str); goto err; } + + /* Make sure the plugin name is not set inside the init() function. */ + schema_table->table_name= plugin->name.str; } DBUG_RETURN(0);