Skip to content

Commit

Permalink
Add support of vanilla Galera v.3 (api v25)
Browse files Browse the repository at this point in the history
Now we could work with 'libgalera_smm.so' from mysql 5.x
(but not from mariadb, as it uses galera with api v26).
  • Loading branch information
alexey committed Jan 22, 2024
1 parent 6bbbb2c commit 55cdce3
Show file tree
Hide file tree
Showing 5 changed files with 523 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/replication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ADD_LIBRARY ( repli_stuff STATIC wsrep_cxx.cpp wsrep_cxx.h wsrep_cxx_int.h
send_files.h send_files.cpp
cluster_commands.h
recv_state.h recv_state.cpp
wsrep_v25.cpp
wsrep_v31.cpp
)

Expand Down
3 changes: 3 additions & 0 deletions src/replication/wsrep_cxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ Wsrep::Provider_i* Wsrep::MakeProvider ( Wsrep::Cluster_i* pCluster, CSphString
if ( !tLoader.m_pLibrary )
return nullptr;

if ( tLoader.m_iIfaceVer == 25 )
return MakeProviderV25 ( std::move ( tLoader ), pCluster, std::move ( sName ), szListenAddr, szIncoming, szPath, szOptions );

if ( tLoader.m_iIfaceVer == 31 )
return MakeProviderV31 ( std::move ( tLoader ), pCluster, std::move ( sName ), szListenAddr, szIncoming, szPath, szOptions );

Expand Down
2 changes: 2 additions & 0 deletions src/replication/wsrep_cxx_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,4 +449,6 @@ Wsrep::Provider_i* MakeProvider ( WsrepLoader_t tLoader, Wsrep::Cluster_i* pClus
return pProvider.release();
}

Wsrep::Provider_i* MakeProviderV25 ( WsrepLoader_t tLoader, Wsrep::Cluster_i* pCluster, CSphString sName, const char* szListenAddr, const char* szIncoming, const char* szPath, const char* szOptions );

Wsrep::Provider_i* MakeProviderV31 ( WsrepLoader_t tLoader, Wsrep::Cluster_i* pCluster, CSphString sName, const char* szListenAddr, const char* szIncoming, const char* szPath, const char* szOptions );
2 changes: 2 additions & 0 deletions src/replication/wsrep_documentation/wsrep_api_h.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
wsrep v31: https://raw.githubusercontent.com/percona/wsrep-API/2c211e1aad315e3118969beada4d4767118be88f/wsrep_api.h
wsrep v25: https://raw.githubusercontent.com/codership/wsrep-API/eab2d5d5a31672c0b7d116ef1629ff18392fd7d0/wsrep_api.h
wsrep v26: https://raw.githubusercontent.com/codership/wsrep-API/694d6ca47f5eec7873be99b7d6babccf633d1231/wsrep_api.h
Loading

0 comments on commit 55cdce3

Please # to comment.