Added error output wsrep_print_version
This helps to determinate why galera library doesn't load
This commit is contained in:
parent
bc89105496
commit
cd2c0e013c
@ -1,5 +1,4 @@
|
|||||||
/* Copyright (c) 2009, 2019, MariaDB
|
/*
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; version 2 of the License.
|
the Free Software Foundation; version 2 of the License.
|
||||||
@ -86,12 +85,24 @@ int main(int argc, char **argv)
|
|||||||
int rc = EINVAL;
|
int rc = EINVAL;
|
||||||
void *dlh;
|
void *dlh;
|
||||||
wsrep_loader_fun dlfun;
|
wsrep_loader_fun dlfun;
|
||||||
|
const char *provider= getenv("WSREP_PROVIDER");
|
||||||
|
|
||||||
if (!(dlh = dlopen(getenv("WSREP_PROVIDER"), RTLD_NOW | RTLD_LOCAL))) {
|
if (!provider)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "WSREP_PROVIDER is not set\n");
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
if (!(dlh = dlopen(provider, RTLD_NOW | RTLD_LOCAL)))
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Can't open WSREP_PROVIDER (%s) library, error: %s\n",
|
||||||
|
provider, dlerror());
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(dlfun = wsrep_dlf(dlh, "wsrep_loader"))) {
|
if (!(dlfun = wsrep_dlf(dlh, "wsrep_loader")))
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Can't find 'wsrep_loader' symbol in %s\n",
|
||||||
|
provider);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user