diff options
-rw-r--r-- | include/mysql/service_wsrep.h | 6 | ||||
-rw-r--r-- | include/service_versions.h | 2 | ||||
-rw-r--r-- | sql/wsrep_dummy.cc | 2 | ||||
-rw-r--r-- | sql/wsrep_hton.cc | 10 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 4 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 5 |
6 files changed, 12 insertions, 17 deletions
diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h index 11872469cc7..bc05559064a 100644 --- a/include/mysql/service_wsrep.h +++ b/include/mysql/service_wsrep.h @@ -80,7 +80,7 @@ extern struct wsrep_service_st { int (*wsrep_on_func)(MYSQL_THD); void (*wsrep_post_commit_func)(THD* thd, bool all); bool (*wsrep_prepare_key_func)(const unsigned char*, size_t, const unsigned char*, size_t, struct wsrep_buf*, size_t*); - enum wsrep_trx_status (*wsrep_run_wsrep_commit_func)(THD *thd, handlerton *hton, bool all); + enum wsrep_trx_status (*wsrep_run_wsrep_commit_func)(THD *thd, bool all); void (*wsrep_thd_LOCK_func)(THD *thd); void (*wsrep_thd_UNLOCK_func)(THD *thd); void (*wsrep_thd_awake_func)(THD *thd, my_bool signal); @@ -119,7 +119,7 @@ extern struct wsrep_service_st { #define wsrep_on(X) wsrep_service->wsrep_on_func(X) #define wsrep_post_commit(T,A) wsrep_service->wsrep_post_commit_func(T,A) #define wsrep_prepare_key(A,B,C,D,E,F) wsrep_service->wsrep_prepare_key_func(A,B,C,D,E,F) -#define wsrep_run_wsrep_commit(T,H,A) wsrep_service->wsrep_run_wsrep_commit_func(T,H,A) +#define wsrep_run_wsrep_commit(T,A) wsrep_service->wsrep_run_wsrep_commit_func(T,A) #define wsrep_thd_LOCK(T) wsrep_service->wsrep_thd_LOCK_func(T) #define wsrep_thd_UNLOCK(T) wsrep_service->wsrep_thd_UNLOCK_func(T) #define wsrep_thd_awake(T,S) wsrep_service->wsrep_thd_awake_func(T,S) @@ -167,7 +167,7 @@ enum wsrep_conflict_state wsrep_thd_conflict_state(MYSQL_THD thd, my_bool sync); enum wsrep_conflict_state wsrep_thd_get_conflict_state(MYSQL_THD thd); enum wsrep_exec_mode wsrep_thd_exec_mode(THD *thd); enum wsrep_query_state wsrep_thd_query_state(THD *thd); -enum wsrep_trx_status wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all); +enum wsrep_trx_status wsrep_run_wsrep_commit(THD *thd, bool all); int wsrep_is_wsrep_xid(const struct xid_t* xid); int wsrep_on(MYSQL_THD thd); int wsrep_thd_retry_counter(THD *thd); diff --git a/include/service_versions.h b/include/service_versions.h index acbd6a7d50b..ecc0d9c8266 100644 --- a/include/service_versions.h +++ b/include/service_versions.h @@ -30,7 +30,7 @@ #define VERSION_thd_timezone 0x0100 #define VERSION_my_sha1 0x0101 #define VERSION_my_md5 0x0100 -#define VERSION_wsrep 0x0100 +#define VERSION_wsrep 0x0200 #define VERSION_logger 0x0100 #define VERSION_thd_autoinc 0x0100 #define VERSION_thd_error_context 0x0100 diff --git a/sql/wsrep_dummy.cc b/sql/wsrep_dummy.cc index e937ef9be5c..1a6f5128e9e 100644 --- a/sql/wsrep_dummy.cc +++ b/sql/wsrep_dummy.cc @@ -71,7 +71,7 @@ int wsrep_on(THD *thd) void wsrep_post_commit(THD*, bool) { } -enum wsrep_trx_status wsrep_run_wsrep_commit(THD *, handlerton *, bool) +enum wsrep_trx_status wsrep_run_wsrep_commit(THD *, bool) { return WSREP_TRX_ERROR; } void wsrep_thd_LOCK(THD *) diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 2c14809db21..36be70249ca 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -27,9 +27,6 @@ extern ulonglong thd_to_trx_id(THD *thd); extern "C" int thd_binlog_format(const MYSQL_THD thd); // todo: share interface with ha_innodb.c -enum wsrep_trx_status wsrep_run_wsrep_commit(THD *thd, handlerton *hton, - bool all); - /* Cleanup after local transaction commit/rollback, replay or TOI. */ @@ -157,7 +154,7 @@ static int wsrep_prepare(handlerton *hton, THD *thd, bool all) !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) && (thd->variables.wsrep_on && !wsrep_trans_cache_is_empty(thd))) { - int res= wsrep_run_wsrep_commit(thd, hton, all); + int res= wsrep_run_wsrep_commit(thd, all); if (res != 0) { if (res == WSREP_TRX_SIZE_EXCEEDED) @@ -281,20 +278,19 @@ extern Rpl_filter* binlog_filter; extern my_bool opt_log_slave_updates; enum wsrep_trx_status -wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) +wsrep_run_wsrep_commit(THD *thd, bool all) { int rcode= -1; size_t data_len= 0; IO_CACHE *cache; int replay_round= 0; + DBUG_ENTER("wsrep_run_wsrep_commit"); if (thd->get_stmt_da()->is_error()) { WSREP_ERROR("commit issue, error: %d %s", thd->get_stmt_da()->sql_errno(), thd->get_stmt_da()->message()); } - DBUG_ENTER("wsrep_run_wsrep_commit"); - if (thd->slave_thread && !opt_log_slave_updates) DBUG_RETURN(WSREP_TRX_OK); if (thd->wsrep_exec_mode == REPL_RECV) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 3e5a14c5ccd..42111cb9f1f 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7641,7 +7641,7 @@ no_commit: } else if (src_table == prebuilt->table) { #ifdef WITH_WSREP if (wsrep_on(user_thd)) { - switch (wsrep_run_wsrep_commit(user_thd, wsrep_hton, 1)) + switch (wsrep_run_wsrep_commit(user_thd, 1)) { case WSREP_TRX_OK: break; @@ -7668,7 +7668,7 @@ no_commit: } else { #ifdef WITH_WSREP if (wsrep_on(user_thd)) { - switch (wsrep_run_wsrep_commit(user_thd, wsrep_hton, 1)) + switch (wsrep_run_wsrep_commit(user_thd, 1)) { case WSREP_TRX_OK: break; diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index de492e042d4..e2f5296f880 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -145,7 +145,6 @@ wsrep_ws_handle(THD* thd, const trx_t* trx) { (wsrep_trx_id_t)trx->id); } -extern handlerton * wsrep_hton; extern TC_LOG* tc_log; extern void wsrep_cleanup_transaction(THD *thd); static int @@ -8102,7 +8101,7 @@ no_commit: } else if (src_table == prebuilt->table) { #ifdef WITH_WSREP if (wsrep_on(user_thd)) { - switch (wsrep_run_wsrep_commit(user_thd, wsrep_hton, 1)) + switch (wsrep_run_wsrep_commit(user_thd, 1)) { case WSREP_TRX_OK: break; @@ -8129,7 +8128,7 @@ no_commit: } else { #ifdef WITH_WSREP if (wsrep_on(user_thd)) { - switch (wsrep_run_wsrep_commit(user_thd, wsrep_hton, 1)) + switch (wsrep_run_wsrep_commit(user_thd, 1)) { case WSREP_TRX_OK: break; |