diff --git a/include/wsrep/provider.hpp b/include/wsrep/provider.hpp index 0ad861b..45c3a76 100644 --- a/include/wsrep/provider.hpp +++ b/include/wsrep/provider.hpp @@ -275,6 +275,11 @@ namespace wsrep virtual std::vector status() const = 0; + /** + * Return pointer to native provider handle. + */ + virtual void* native() const = 0; + /** * Create a new provider. * diff --git a/src/wsrep_provider_v26.cpp b/src/wsrep_provider_v26.cpp index 4f27770..ce9ca39 100644 --- a/src/wsrep_provider_v26.cpp +++ b/src/wsrep_provider_v26.cpp @@ -673,3 +673,8 @@ wsrep::wsrep_provider_v26::status() const } return ret; } + +void* wsrep::wsrep_provider_v26::native() const +{ + return wsrep_; +} diff --git a/src/wsrep_provider_v26.hpp b/src/wsrep_provider_v26.hpp index 498b870..b7898b1 100644 --- a/src/wsrep_provider_v26.hpp +++ b/src/wsrep_provider_v26.hpp @@ -46,6 +46,7 @@ namespace wsrep int sst_received(const wsrep::gtid& gtid, int); std::vector status() const; + void* native() const; private: wsrep_provider_v26(const wsrep_provider_v26&); wsrep_provider_v26& operator=(const wsrep_provider_v26); diff --git a/test/mock_provider.hpp b/test/mock_provider.hpp index 50b246f..9d3ee1a 100644 --- a/test/mock_provider.hpp +++ b/test/mock_provider.hpp @@ -199,8 +199,11 @@ namespace wsrep { return std::vector(); } + void* native() const { return 0; } + // // Methods to modify mock state + // /** Inject BF abort event into the provider. * * @param bf_seqno Aborter sequence number