Below is the list of changes that have just been committed into a local
5.1 repository of serg. When serg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-09-07 17:31:29+02:00, serg@stripped +1 -0
simplify plugin_type_initialize[] and plugin_type_deinitialize[]
pass plugin as an argument to plugin->init/deinit
sql/sql_plugin.cc@stripped, 2006-09-07 17:31:26+02:00, serg@stripped +8 -8
simplify plugin_type_initialize[] and plugin_type_deinitialize[]
pass plugin as an argument to plugin->init/deinit
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: serg
# Host: janus.mylan
# Root: /usr/home/serg/Abk/mysql-5.1-arch
--- 1.32/sql/sql_plugin.cc 2006-09-07 17:31:35 +02:00
+++ 1.33/sql/sql_plugin.cc 2006-09-07 17:31:35 +02:00
@@ -30,14 +30,16 @@
{ C_STRING_WITH_LEN("FTPARSER") }
};
+int nothing_special(st_plugin_int *plugin) { return 0; }
+
plugin_type_init plugin_type_initialize[MYSQL_MAX_PLUGIN_TYPE_NUM]=
{
- 0,ha_initialize_handlerton,0
+ nothing_special, ha_initialize_handlerton, nothing_special
};
plugin_type_init plugin_type_deinitialize[MYSQL_MAX_PLUGIN_TYPE_NUM]=
{
- 0,ha_finalize_handlerton,0
+ nothing_special, ha_finalize_handlerton, nothing_special
};
static const char *plugin_interface_version_sym=
@@ -477,8 +479,7 @@
void plugin_deinitialize(struct st_plugin_int *plugin)
{
- if (plugin_type_deinitialize[plugin->plugin->type] &&
- (*plugin_type_deinitialize[plugin->plugin->type])(plugin))
+ if ((*plugin_type_deinitialize[plugin->plugin->type])(plugin))
{
sql_print_error("Plugin '%s' of type %s failed deinitialization",
plugin->name.str, plugin_type_names[plugin->plugin->type]);
@@ -507,7 +508,7 @@
if (plugin->plugin->deinit)
{
DBUG_PRINT("info", ("Deinitializing plugin: '%s'", plugin->name.str));
- if (plugin->plugin->deinit())
+ if (((plugin_type_init)(plugin->plugin->deinit))(plugin))
{
DBUG_PRINT("warning", ("Plugin '%s' deinit function returned error.",
plugin->name.str));
@@ -578,15 +579,14 @@
}
if (plugin->plugin->init)
{
- if (plugin->plugin->init())
+ if (((plugin_type_init)(plugin->plugin->init))(plugin))
{
sql_print_error("Plugin '%s' init function returned error.",
plugin->name.str);
goto err;
}
}
- if (plugin_type_initialize[plugin->plugin->type] &&
- (*plugin_type_initialize[plugin->plugin->type])(plugin))
+ if ((*plugin_type_initialize[plugin->plugin->type])(plugin))
{
sql_print_error("Plugin '%s' registration as a %s failed.",
plugin->name.str, plugin_type_names[plugin->plugin->type]);
| Thread |
|---|
| • bk commit into 5.1 tree (serg:1.2312) | Sergei Golubchik | 7 Sep |