mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Initial version of dbms_simulator, partial wsrep provider loading
This commit is contained in:
23
src/wsrep_provider_v26.cpp
Normal file
23
src/wsrep_provider_v26.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
//
|
||||
// Copyright (C) 2018 Codership Oy <info@codership.com>
|
||||
//
|
||||
|
||||
#include "wsrep_provider_v26.hpp"
|
||||
#include "exception.hpp"
|
||||
|
||||
#include <wsrep_api.h>
|
||||
|
||||
trrep::wsrep_provider_v26::wsrep_provider_v26(
|
||||
const char* path,
|
||||
struct wsrep_init_args* args)
|
||||
: wsrep_()
|
||||
{
|
||||
if (wsrep_load(path, &wsrep_, 0))
|
||||
{
|
||||
throw trrep::runtime_error("Failed to load wsrep library");
|
||||
}
|
||||
if (wsrep_->init(wsrep_, args) != WSREP_OK)
|
||||
{
|
||||
throw trrep::runtime_error("Failed to initialize wsrep provider");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user