diff options
author | Monty <monty@mariadb.org> | 2020-01-29 17:31:08 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-01-29 23:14:41 +0200 |
commit | cd2c0e013ccb5f9b009743dfd7188585a539d9b5 (patch) | |
tree | 5b359ded06c23ce974cfc0c1b5f89cf252922334 | |
parent | bc891054962bc7cbd249f1ff75c64adb3b5bbc59 (diff) | |
download | mariadb-git-cd2c0e013ccb5f9b009743dfd7188585a539d9b5.tar.gz |
Added error output wsrep_print_version
This helps to determinate why galera library doesn't load
-rw-r--r-- | mysql-test/lib/My/SafeProcess/wsrep_check_version.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/mysql-test/lib/My/SafeProcess/wsrep_check_version.c b/mysql-test/lib/My/SafeProcess/wsrep_check_version.c index 616548d4f2d..52dfbe6d2df 100644 --- a/mysql-test/lib/My/SafeProcess/wsrep_check_version.c +++ b/mysql-test/lib/My/SafeProcess/wsrep_check_version.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2009, 2019, MariaDB - +/* 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 the Free Software Foundation; version 2 of the License. @@ -86,12 +85,24 @@ int main(int argc, char **argv) int rc = EINVAL; void *dlh; wsrep_loader_fun dlfun; + const char *provider= getenv("WSREP_PROVIDER"); - if (!(dlh = dlopen(getenv("WSREP_PROVIDER"), RTLD_NOW | RTLD_LOCAL))) { - goto err; + 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; } - 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; } |