mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Refactored a number of engines to have correct init/deinit. Added pass support for "data" from plugin to plugin generic init to use memory location.
plugin/daemon_example/plug.in: Switched the plug.in type (corrected) sql/handler.h: Added data pointer to use for engines. sql/sql_plugin.cc: Passing plugin to generic handlers to allow them to add data to "data" storage/archive/ha_archive.cc: Refactored. Now uses less logic for startup/shutdown. storage/csv/ha_tina.cc: Refactored init/deinit to use less code. storage/example/ha_example.cc: Refactored example to show correct behavior for init/deinit. storage/example/ha_example.h: Removed unneeded references to methods that do not need to be implemened. storage/federated/ha_federated.cc: Refactored to use less code and startup/shutdown correctly.
This commit is contained in:
@ -515,7 +515,7 @@ void plugin_deinitialize(struct st_plugin_int *plugin)
|
||||
else if (plugin->plugin->deinit)
|
||||
{
|
||||
DBUG_PRINT("info", ("Deinitializing plugin: '%s'", plugin->name.str));
|
||||
if (plugin->plugin->deinit(NULL))
|
||||
if (plugin->plugin->deinit(plugin))
|
||||
{
|
||||
DBUG_PRINT("warning", ("Plugin '%s' deinit function returned error.",
|
||||
plugin->name.str));
|
||||
@ -575,7 +575,7 @@ static int plugin_initialize(struct st_plugin_int *plugin)
|
||||
}
|
||||
else if (plugin->plugin->init)
|
||||
{
|
||||
if (plugin->plugin->init(NULL))
|
||||
if (plugin->plugin->init(plugin))
|
||||
{
|
||||
sql_print_error("Plugin '%s' init function returned error.",
|
||||
plugin->name.str);
|
||||
|
Reference in New Issue
Block a user