summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-08-30 18:07:40 +0400
committerAlexander Nozdrin <alik@sun.com>2010-08-30 18:07:40 +0400
commitf0fe6e4dac44c9555de1193990e9d2cbc77be62e (patch)
tree0a5202757c09044f2c476f93621c75c9df31e32d /sql/sql_show.cc
parentb7ed981f3793b4464b99c98b7baa3c511b52b6a5 (diff)
parent9ab0759ea4534c1581dfb62f2f7e3a6e06d3c3c3 (diff)
downloadmariadb-git-f0fe6e4dac44c9555de1193990e9d2cbc77be62e.tar.gz
Auto-merge from mysql-5.5-merge.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc52
1 files changed, 11 insertions, 41 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 749bef8e930..6b24e3db7bc 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3275,8 +3275,8 @@ static int fill_schema_table_from_frm(THD *thd, TABLE_LIST *tables,
/*
TODO: investigate if in this particular situation we can get by
- simply obtaining internal lock of data-dictionary (ATM it
- is LOCK_open) instead of obtaning full-blown metadata lock.
+ simply obtaining internal lock of the data-dictionary
+ instead of obtaining full-blown metadata lock.
*/
if (try_acquire_high_prio_shared_mdl_lock(thd, &table_list, can_deadlock))
{
@@ -7492,13 +7492,16 @@ int finalize_schema_table(st_plugin_int *plugin)
ST_SCHEMA_TABLE *schema_table= (ST_SCHEMA_TABLE *)plugin->data;
DBUG_ENTER("finalize_schema_table");
- if (schema_table && plugin->plugin->deinit)
+ if (schema_table)
{
- DBUG_PRINT("info", ("Deinitializing plugin: '%s'", plugin->name.str));
- if (plugin->plugin->deinit(NULL))
+ if (plugin->plugin->deinit)
{
- DBUG_PRINT("warning", ("Plugin '%s' deinit function returned error.",
- plugin->name.str));
+ DBUG_PRINT("info", ("Deinitializing plugin: '%s'", plugin->name.str));
+ if (plugin->plugin->deinit(NULL))
+ {
+ DBUG_PRINT("warning", ("Plugin '%s' deinit function returned error.",
+ plugin->name.str));
+ }
}
my_free(schema_table);
}
@@ -7659,7 +7662,7 @@ static bool show_create_trigger_impl(THD *thd,
*/
static
-TABLE_LIST *get_trigger_table_impl(THD *thd, const sp_name *trg_name)
+TABLE_LIST *get_trigger_table(THD *thd, const sp_name *trg_name)
{
char trn_path_buff[FN_REFLEN];
LEX_STRING trn_path= { trn_path_buff, 0 };
@@ -7696,39 +7699,6 @@ TABLE_LIST *get_trigger_table_impl(THD *thd, const sp_name *trg_name)
return table;
}
-/**
- Read TRN and TRG files to obtain base table name for the specified
- trigger name and construct TABE_LIST object for the base table. Acquire
- LOCK_open when doing this.
-
- @param thd Thread context.
- @param trg_name Trigger name.
-
- @return TABLE_LIST object corresponding to the base table.
-*/
-
-static
-TABLE_LIST *get_trigger_table(THD *thd, const sp_name *trg_name)
-{
- /* Acquire LOCK_open (stop the server). */
-
- mysql_mutex_lock(&LOCK_open);
-
- /*
- Load base table name from the TRN-file and create TABLE_LIST object.
- */
-
- TABLE_LIST *lst= get_trigger_table_impl(thd, trg_name);
-
- /* Release LOCK_open (continue the server). */
-
- mysql_mutex_unlock(&LOCK_open);
-
- /* That's it. */
-
- return lst;
-}
-
/**
SHOW CREATE TRIGGER high-level implementation.