diff options
| author | Alexander Nozdrin <alik@ibmvm> | 2010-08-04 12:18:32 +0400 |
|---|---|---|
| committer | Alexander Nozdrin <alik@ibmvm> | 2010-08-04 12:18:32 +0400 |
| commit | 7d0c4cb5c65e4e882ad20e7e317400fa527df9e9 (patch) | |
| tree | 512613b578f3b028a4c6b6272b2dc4820676ad8b /sql/sql_plugin.cc | |
| parent | 711b6618c439e89dc70688959721562708a6ee83 (diff) | |
| parent | a34236947817013339787f4bf6252112a1d97e0c (diff) | |
| download | mariadb-git-7d0c4cb5c65e4e882ad20e7e317400fa527df9e9.tar.gz | |
Auto-merge from mysql-5.5.
Diffstat (limited to 'sql/sql_plugin.cc')
| -rw-r--r-- | sql/sql_plugin.cc | 62 |
1 files changed, 2 insertions, 60 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 2b6be403fc6..7e8c1fed999 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -21,7 +21,7 @@ #include "sql_locale.h" #include "sql_plugin.h" #include "sql_parse.h" // check_table_access -#include "sql_base.h" // close_thread_tables +#include "sql_base.h" // close_mysql_tables #include "key.h" // key_copy #include "sql_show.h" // remove_status_vars, add_status_vars #include "strfunc.h" // find_set @@ -901,19 +901,6 @@ static void plugin_del(struct st_plugin_int *plugin) DBUG_VOID_RETURN; } -#ifdef NOT_USED - -static void plugin_del(const LEX_STRING *name) -{ - struct st_plugin_int *plugin; - DBUG_ENTER("plugin_del(name)"); - if ((plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN))) - plugin_del(plugin); - DBUG_VOID_RETURN; -} - -#endif - static void reap_plugins(void) { uint count, idx; @@ -1394,51 +1381,6 @@ static bool register_builtin(struct st_mysql_plugin *plugin, DBUG_RETURN(0); } -#ifdef NOT_USED_YET -/* - Register a plugin at run time. (note, this doesn't initialize a plugin) - Will be useful for embedded applications. - - SYNOPSIS - plugin_register_builtin() - thd current thread (used to store scratch data in mem_root) - plugin static plugin to install - - RETURN - false - plugin registered successfully -*/ -bool plugin_register_builtin(THD *thd, struct st_mysql_plugin *plugin) -{ - struct st_plugin_int tmp, *ptr; - bool result= true; - int dummy_argc= 0; - DBUG_ENTER("plugin_register_builtin"); - - bzero(&tmp, sizeof(tmp)); - tmp.plugin= plugin; - tmp.name.str= (char *)plugin->name; - tmp.name.length= strlen(plugin->name); - - mysql_mutex_lock(&LOCK_plugin); - mysql_rwlock_wrlock(&LOCK_system_variables_hash); - - if (test_plugin_options(thd->mem_root, &tmp, &dummy_argc, NULL)) - goto end; - tmp.state= PLUGIN_IS_UNINITIALIZED; - if ((result= register_builtin(plugin, &tmp, &ptr))) - { - mysql_del_sys_var_chain(tmp.system_vars); - restore_pluginvar_names(tmp.system_vars); - } - -end: - mysql_rwlock_unlock(&LOCK_system_variables_hash); - mysql_mutex_unlock(&LOCK_plugin); - - DBUG_RETURN(result);; -} -#endif /* NOT_USED_YET */ - /* called only by plugin_init() @@ -1511,8 +1453,8 @@ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv) sql_print_error(ER(ER_GET_ERRNO), my_errno); end_read_record(&read_record_info); table->m_needs_reopen= TRUE; // Force close to free memory + close_mysql_tables(new_thd); end: - close_thread_tables(new_thd); /* Remember that we don't have a THD */ my_pthread_setspecific_ptr(THR_THD, 0); DBUG_VOID_RETURN; |
