diff --git a/dbsim/db_client_service.cpp b/dbsim/db_client_service.cpp index 11448cf..6d28d1e 100644 --- a/dbsim/db_client_service.cpp +++ b/dbsim/db_client_service.cpp @@ -38,8 +38,7 @@ enum wsrep::provider::status db::client_service::replay() { wsrep::high_priority_context high_priority_context(client_state_); - auto ret(provider_.replay(const_cast( - client_state_.transaction().ws_handle()), + auto ret(provider_.replay(client_state_.transaction().ws_handle(), &client_state_)); if (ret == wsrep::provider::success) { diff --git a/include/wsrep/provider.hpp b/include/wsrep/provider.hpp index b9f45cf..0ad861b 100644 --- a/include/wsrep/provider.hpp +++ b/include/wsrep/provider.hpp @@ -268,7 +268,7 @@ namespace wsrep * @return Zero in case of success, non-zero on failure. */ virtual enum status replay( - wsrep::ws_handle& ws_handle, void* applier_ctx) = 0; + const wsrep::ws_handle& ws_handle, void* applier_ctx) = 0; virtual int sst_sent(const wsrep::gtid&, int) = 0; virtual int sst_received(const wsrep::gtid&, int) = 0; diff --git a/src/wsrep_provider_v26.cpp b/src/wsrep_provider_v26.cpp index 82e892e..4f27770 100644 --- a/src/wsrep_provider_v26.cpp +++ b/src/wsrep_provider_v26.cpp @@ -600,10 +600,10 @@ int wsrep::wsrep_provider_v26::release(wsrep::ws_handle& ws_handle) } enum wsrep::provider::status -wsrep::wsrep_provider_v26::replay(wsrep::ws_handle& ws_handle, +wsrep::wsrep_provider_v26::replay(const wsrep::ws_handle& ws_handle, void* applier_ctx) { - mutable_ws_handle mwsh(ws_handle); + const_ws_handle mwsh(ws_handle); return map_return_value( wsrep_->replay_trx(wsrep_, mwsh.native(), applier_ctx)); } diff --git a/src/wsrep_provider_v26.hpp b/src/wsrep_provider_v26.hpp index 5a4a3db..498b870 100644 --- a/src/wsrep_provider_v26.hpp +++ b/src/wsrep_provider_v26.hpp @@ -41,7 +41,7 @@ namespace wsrep int commit_order_leave(const wsrep::ws_handle&, const wsrep::ws_meta&); int release(wsrep::ws_handle&); - enum wsrep::provider::status replay(wsrep::ws_handle&, void*); + enum wsrep::provider::status replay(const wsrep::ws_handle&, void*); int sst_sent(const wsrep::gtid&,int); int sst_received(const wsrep::gtid& gtid, int); diff --git a/test/mock_client_state.hpp b/test/mock_client_state.hpp index 9bcd20f..f93d2b4 100644 --- a/test/mock_client_state.hpp +++ b/test/mock_client_state.hpp @@ -89,8 +89,7 @@ namespace wsrep replay() WSREP_OVERRIDE { enum wsrep::provider::status ret( - provider_.replay(const_cast( - client_state_.transaction().ws_handle()), + provider_.replay(client_state_.transaction().ws_handle(), &client_state_)); ++replays_; return ret; diff --git a/test/mock_provider.hpp b/test/mock_provider.hpp index 3e0c9c8..50b246f 100644 --- a/test/mock_provider.hpp +++ b/test/mock_provider.hpp @@ -152,7 +152,8 @@ namespace wsrep return release_result_; } - enum wsrep::provider::status replay(wsrep::ws_handle&, void* ctx) + enum wsrep::provider::status replay(const wsrep::ws_handle&, + void* ctx) { wsrep::client_state& cc( *static_cast(ctx)); diff --git a/wsrep-API/v26 b/wsrep-API/v26 index 7b2ee90..a306d72 160000 --- a/wsrep-API/v26 +++ b/wsrep-API/v26 @@ -1 +1 @@ -Subproject commit 7b2ee90d67a80f15f16ab95184bfabe1b2a338b3 +Subproject commit a306d72fd930e4cb39cba6308f05ace4584919cf