summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-10-19 22:50:45 +0200
committerSergei Golubchik <sergii@pisem.net>2011-10-19 22:50:45 +0200
commit42b8235788f7556fef1295dc281a29da4afe0f7d (patch)
treed3eff679ca6e85c187aa26218c78e89e3e4710d3 /sql
parent533d274c03fe424dacfb9e119ea5f98799373b73 (diff)
downloadmariadb-git-42b8235788f7556fef1295dc281a29da4afe0f7d.tar.gz
cleanups
Diffstat (limited to 'sql')
-rw-r--r--sql/mdl.cc3
-rw-r--r--sql/set_var.cc1
-rw-r--r--sql/slave.cc7
-rw-r--r--sql/sql_parse.cc5
-rw-r--r--sql/sql_show.cc2
-rw-r--r--sql/sql_table.cc2
6 files changed, 7 insertions, 13 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc
index 21410db2d22..45f0c02338e 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -2223,9 +2223,6 @@ bool MDL_context::visit_subgraph(MDL_wait_for_graph_visitor *gvisitor)
@note If during deadlock resolution context which performs deadlock
detection is chosen as a victim it will be informed about the
fact by setting VICTIM status to its wait slot.
-
- @retval TRUE A deadlock is found.
- @retval FALSE No deadlock found.
*/
void MDL_context::find_deadlock()
diff --git a/sql/set_var.cc b/sql/set_var.cc
index a229002282b..3494d5b1694 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -39,7 +39,6 @@
#include "tztime.h" // my_tz_find, my_tz_SYSTEM, struct Time_zone
#include "sql_acl.h" // SUPER_ACL
#include "sql_select.h" // free_underlaid_joins
-#include "sql_show.h" // make_default_log_name
#include "sql_view.h" // updatable_views_with_limit_typelib
#include "lock.h" // lock_global_read_lock,
// make_global_read_lock_block_commit,
diff --git a/sql/slave.cc b/sql/slave.cc
index 26d57353084..7e60b0ef3ec 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -2206,11 +2206,8 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
simulate_error|= (1 << SLAVE_THD_IO););
DBUG_EXECUTE_IF("simulate_sql_slave_error_on_init",
simulate_error|= (1 << SLAVE_THD_SQL););
-#if !defined(DBUG_OFF)
- if (init_thr_lock() || thd->store_globals() || simulate_error & (1<< thd_type))
-#else
- if (init_thr_lock() || thd->store_globals())
-#endif
+ if (init_thr_lock() || thd->store_globals() ||
+ IF_DBUG(simulate_error & (1<< thd_type), 0))
{
thd->cleanup();
DBUG_RETURN(-1);
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index a952c596a8b..ad5aa281ea7 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -49,9 +49,8 @@
// mysql_restore_table
#include "sql_reload.h" // reload_acl_and_cache
#include "sql_admin.h" // mysql_assign_to_keycache
-#include "sql_connect.h" // check_user,
- // decrease_user_connections,
- // thd_init_client_charset, check_mqh,
+#include "sql_connect.h" // decrease_user_connections,
+ // check_mqh,
// reset_mqh
#include "sql_rename.h" // mysql_rename_table
#include "sql_tablespace.h" // mysql_alter_tablespace
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 78503faa68c..4485991cdaf 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1984,7 +1984,7 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
CHARSET_INFO *cs= system_charset_info;
char *user;
my_hrtime_t unow= my_hrtime();
- DBUG_ENTER("fill_process_list");
+ DBUG_ENTER("fill_schema_processlist");
user= thd->security_ctx->master_access & PROCESS_ACL ?
NullS : thd->security_ctx->priv_user;
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 2ead7a167e5..a5ef2c4b7fc 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -3876,6 +3876,7 @@ void sp_prepare_create_field(THD *thd, Create_field *sql_field)
}
+#ifdef WITH_PARTITION_STORAGE_ENGINE
/**
Auxiliary function which allows to check if freshly created .FRM
file for table can be opened.
@@ -3913,6 +3914,7 @@ static bool check_if_created_table_can_be_opened(THD *thd,
(void) file->ha_create_handler_files(path, NULL, CHF_DELETE_FLAG, create_info);
return result;
}
+#endif
/**