summaryrefslogtreecommitdiff
path: root/sql/wsrep_thd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/wsrep_thd.cc')
-rw-r--r--sql/wsrep_thd.cc44
1 files changed, 9 insertions, 35 deletions
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index 0f72c132d84..023da27c3c1 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -22,7 +22,6 @@
#include "rpl_rli.h"
#include "log_event.h"
#include "sql_parse.h"
-#include "sql_base.h" // close_thread_tables()
#include "mysqld.h" // start_wsrep_THD();
#include "wsrep_applier.h" // start_wsrep_THD();
#include "mysql/service_wsrep.h"
@@ -126,11 +125,7 @@ bool wsrep_create_appliers(long threads, bool mutex_protected)
return false;
}
- if (!wsrep_cluster_address || wsrep_cluster_address[0]== 0)
- {
- WSREP_DEBUG("wsrep_create_appliers exit due to empty address");
- return false;
- }
+ DBUG_ASSERT(wsrep_cluster_address[0]);
long wsrep_threads=0;
@@ -285,16 +280,14 @@ static void wsrep_rollback_process(THD *rollbacker,
void wsrep_create_rollbacker()
{
- if (wsrep_cluster_address && wsrep_cluster_address[0] != 0)
- {
- Wsrep_thd_args* args(new Wsrep_thd_args(wsrep_rollback_process,
- WSREP_ROLLBACKER_THREAD,
- pthread_self()));
-
- /* create rollbacker */
- if (create_wsrep_THD(args, false))
- WSREP_WARN("Can't create thread to manage wsrep rollback");
- }
+ DBUG_ASSERT(wsrep_cluster_address[0]);
+ Wsrep_thd_args* args(new Wsrep_thd_args(wsrep_rollback_process,
+ WSREP_ROLLBACKER_THREAD,
+ pthread_self()));
+
+ /* create rollbacker */
+ if (create_wsrep_THD(args, false))
+ WSREP_WARN("Can't create thread to manage wsrep rollback");
}
/*
@@ -375,25 +368,6 @@ bool wsrep_bf_abort(const THD* bf_thd, THD* victim_thd)
return ret;
}
-/*
- Get auto increment variables for THD. Use global settings for
- applier threads.
- */
-void wsrep_thd_auto_increment_variables(THD* thd,
- unsigned long long* offset,
- unsigned long long* increment)
-{
- if (wsrep_thd_is_applying(thd) &&
- thd->wsrep_trx().state() != wsrep::transaction::s_replaying)
- {
- *offset= global_system_variables.auto_increment_offset;
- *increment= global_system_variables.auto_increment_increment;
- return;
- }
- *offset= thd->variables.auto_increment_offset;
- *increment= thd->variables.auto_increment_increment;
-}
-
int wsrep_create_threadvars()
{
int ret= 0;