summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-09-26 17:02:47 +0200
committerSergei Golubchik <serg@mariadb.org>2014-10-01 23:38:28 +0200
commit8877adb773abeafafcdee18fe30fca1c8589ee2c (patch)
tree2142118f745da6a729301361da9a8a01aea940ce /sql
parentc6b95222c3c614342575f752a6787b83fe6ffaa4 (diff)
downloadmariadb-git-8877adb773abeafafcdee18fe30fca1c8589ee2c.tar.gz
fixing embedded: first set of changes (storage engines don't work yet)
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_class.cc21
-rw-r--r--sql/sql_class.h80
-rw-r--r--sql/wsrep_var.h2
3 files changed, 50 insertions, 53 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 82e4f99eed0..56c14613829 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -891,15 +891,6 @@ THD::THD(bool is_wsrep_applier)
bootstrap(0),
derived_tables_processing(FALSE),
spcont(NULL),
-#ifdef WITH_WSREP
- wsrep_applier(is_wsrep_applier),
- wsrep_applier_closing(false),
- wsrep_client_thread(false),
- wsrep_apply_toi(false),
- wsrep_po_handle(WSREP_PO_INITIALIZER),
- wsrep_po_cnt(0),
- wsrep_apply_format(0),
-#endif
m_parser_state(NULL),
#if defined(ENABLED_DEBUG_SYNC)
debug_sync_control(0),
@@ -907,6 +898,15 @@ THD::THD(bool is_wsrep_applier)
wait_for_commit_ptr(0),
main_da(0, false, false),
m_stmt_da(&main_da)
+#ifdef WITH_WSREP
+ ,wsrep_applier(is_wsrep_applier)
+ ,wsrep_applier_closing(false)
+ ,wsrep_client_thread(false)
+ ,wsrep_apply_toi(false)
+ ,wsrep_po_handle(WSREP_PO_INITIALIZER)
+ ,wsrep_po_cnt(0)
+ ,wsrep_apply_format(0)
+#endif
{
ulong tmp;
@@ -1030,6 +1030,7 @@ THD::THD(bool is_wsrep_applier)
wsrep_mysql_replicated = 0;
wsrep_TOI_pre_query = NULL;
wsrep_TOI_pre_query_len = 0;
+ wsrep_info[sizeof(wsrep_info) - 1] = '\0'; /* make sure it is 0-terminated */
#endif
/* Call to init() below requires fully initialized Open_tables_state. */
reset_open_tables_state(this);
@@ -1072,8 +1073,6 @@ THD::THD(bool is_wsrep_applier)
thr_lock_info_init(&lock_info); /* safety: will be reset after start */
lock_info.mysql_thd= (void *)this;
- wsrep_info[sizeof(wsrep_info) - 1] = '\0'; /* make sure it is 0-terminated */
-
m_internal_handler= NULL;
m_binlog_invoker= INVOKER_NONE;
arena_for_cached_items= 0;
diff --git a/sql/sql_class.h b/sql/sql_class.h
index ed447d9fc8f..2db9618a824 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -640,12 +640,11 @@ typedef struct system_variables
ulong wt_timeout_short, wt_deadlock_search_depth_short;
ulong wt_timeout_long, wt_deadlock_search_depth_long;
-#ifdef WITH_WSREP
my_bool wsrep_on;
my_bool wsrep_causal_reads;
uint wsrep_sync_wait;
ulong wsrep_retry_autocommit;
-#endif
+
double long_query_time_double;
my_bool pseudo_slave_mode;
@@ -2737,45 +2736,6 @@ public:
query_id_t first_query_id;
} binlog_evt_union;
-#ifdef WITH_WSREP
- const bool wsrep_applier; /* dedicated slave applier thread */
- bool wsrep_applier_closing; /* applier marked to close */
- bool wsrep_client_thread; /* to identify client threads*/
- bool wsrep_PA_safe;
- bool wsrep_converted_lock_session;
- bool wsrep_apply_toi; /* applier processing in TOI */
- enum wsrep_exec_mode wsrep_exec_mode;
- query_id_t wsrep_last_query_id;
- enum wsrep_query_state wsrep_query_state;
- enum wsrep_conflict_state wsrep_conflict_state;
- mysql_mutex_t LOCK_wsrep_thd;
- mysql_cond_t COND_wsrep_thd;
- // changed from wsrep_seqno_t to wsrep_trx_meta_t in wsrep API rev 75
- // wsrep_seqno_t wsrep_trx_seqno;
- wsrep_trx_meta_t wsrep_trx_meta;
- uint32 wsrep_rand;
- Relay_log_info* wsrep_rli;
- rpl_group_info* wsrep_rgi;
- wsrep_ws_handle_t wsrep_ws_handle;
- ulong wsrep_retry_counter; // of autocommit
- char* wsrep_retry_query;
- size_t wsrep_retry_query_len;
- enum enum_server_command wsrep_retry_command;
- enum wsrep_consistency_check_mode
- wsrep_consistency_check;
- wsrep_stats_var* wsrep_status_vars;
- int wsrep_mysql_replicated;
- const char* wsrep_TOI_pre_query; /* a query to apply before
- the actual TOI query */
- size_t wsrep_TOI_pre_query_len;
- wsrep_po_handle_t wsrep_po_handle;
- size_t wsrep_po_cnt;
-#ifdef GTID_SUPPORT
- rpl_sid wsrep_po_sid;
-#endif /* GTID_SUPPORT */
- void* wsrep_apply_format;
-#endif /* WITH_WSREP */
- char wsrep_info[128]; /* string for dynamic proc info */
/**
Internal parser state.
Note that since the parser is not re-entrant, we keep only one parser
@@ -3782,6 +3742,44 @@ public:
return (temporary_tables ||
(rgi_slave && rgi_have_temporary_tables()));
}
+
+#ifdef WITH_WSREP
+ const bool wsrep_applier; /* dedicated slave applier thread */
+ bool wsrep_applier_closing; /* applier marked to close */
+ bool wsrep_client_thread; /* to identify client threads*/
+ bool wsrep_PA_safe;
+ bool wsrep_converted_lock_session;
+ bool wsrep_apply_toi; /* applier processing in TOI */
+ enum wsrep_exec_mode wsrep_exec_mode;
+ query_id_t wsrep_last_query_id;
+ enum wsrep_query_state wsrep_query_state;
+ enum wsrep_conflict_state wsrep_conflict_state;
+ mysql_mutex_t LOCK_wsrep_thd;
+ mysql_cond_t COND_wsrep_thd;
+ wsrep_trx_meta_t wsrep_trx_meta;
+ uint32 wsrep_rand;
+ Relay_log_info* wsrep_rli;
+ rpl_group_info* wsrep_rgi;
+ wsrep_ws_handle_t wsrep_ws_handle;
+ ulong wsrep_retry_counter; // of autocommit
+ char* wsrep_retry_query;
+ size_t wsrep_retry_query_len;
+ enum enum_server_command wsrep_retry_command;
+ enum wsrep_consistency_check_mode
+ wsrep_consistency_check;
+ wsrep_stats_var* wsrep_status_vars;
+ int wsrep_mysql_replicated;
+ const char* wsrep_TOI_pre_query; /* a query to apply before
+ the actual TOI query */
+ size_t wsrep_TOI_pre_query_len;
+ wsrep_po_handle_t wsrep_po_handle;
+ size_t wsrep_po_cnt;
+#ifdef GTID_SUPPORT
+ rpl_sid wsrep_po_sid;
+#endif /* GTID_SUPPORT */
+ void* wsrep_apply_format;
+ char wsrep_info[128]; /* string for dynamic proc info */
+#endif /* WITH_WSREP */
};
diff --git a/sql/wsrep_var.h b/sql/wsrep_var.h
index 654b76be617..6914204148d 100644
--- a/sql/wsrep_var.h
+++ b/sql/wsrep_var.h
@@ -93,7 +93,7 @@ extern bool wsrep_desync_update UPDATE_ARGS;
#define WSREP_NONE
#define wsrep_provider_init(X)
-#define wsrep_init_vars() (1)
+#define wsrep_init_vars() (0)
#define wsrep_start_position_init(X)
#define wsrep_sst_auth_init(X)