From 7f9fcfe00efa7262b0b95e00a595083ab0e21426 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Mon, 27 Jun 2016 18:07:43 -0400 Subject: [PATCH] Code cleanup (wsrep patch). --- sql/wsrep_mysqld.cc | 10 +++++++--- sql/wsrep_mysqld.h | 5 ----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 1d96176a70d..2f35e6cc623 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -1260,7 +1260,7 @@ wsrep_alter_query_string(THD *thd, String *buf) return 0; } -int wsrep_alter_event_query(THD *thd, uchar** buf, size_t* buf_len) +static int wsrep_alter_event_query(THD *thd, uchar** buf, size_t* buf_len) { String log_query; @@ -1356,6 +1356,10 @@ create_view_query(THD *thd, uchar** buf, size_t* buf_len) return wsrep_to_buf_helper(thd, buff.ptr(), buff.length(), buf, buf_len); } +/* Forward declarations. */ +static int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len); +static int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len); + /* returns: 0: statement was replicated as TOI @@ -2167,7 +2171,7 @@ void wsrep_kill_mysql(THD *thd) } -int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len) +static int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len) { String log_query; sp_head *sp = thd->lex->sphead; @@ -2494,7 +2498,7 @@ error: } -int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len) +static int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len) { LEX *lex= thd->lex; String stmt_query; diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index e91ed2302a2..ea81384da75 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -280,10 +280,7 @@ void wsrep_to_isolation_end(THD *thd); void wsrep_cleanup_transaction(THD *thd); int wsrep_to_buf_helper( THD* thd, const char *query, uint query_len, uchar** buf, size_t* buf_len); -int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len); -int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len); int wsrep_create_event_query(THD *thd, uchar** buf, size_t* buf_len); -int wsrep_alter_event_query(THD *thd, uchar** buf, size_t* buf_len); extern bool wsrep_grant_mdl_exception(MDL_context *requestor_ctx, @@ -304,14 +301,12 @@ void wsrep_close_applier_threads(int count); void wsrep_wait_appliers_close(THD *thd); void wsrep_kill_mysql(THD *thd); void wsrep_close_threads(THD *thd); -int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len); void wsrep_copy_query(THD *thd); bool wsrep_is_show_query(enum enum_sql_command command); void wsrep_replay_transaction(THD *thd); bool wsrep_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, HA_CREATE_INFO *create_info); -int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len); #else /* WITH_WSREP */