1
0
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:
Teemu Ollakka
2018-04-18 18:16:55 +03:00
parent cd21425e07
commit 557d43657c
8 changed files with 228 additions and 9 deletions

View 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");
}
}