From 93e420621a9b367081dcfab17fd1a8340c411cf2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 25 Jan 2025 19:57:46 +0100 Subject: [PATCH] CONC-746 parsec plugin not unloaded during mtr test run * check for client's parsec.so before installing server's auth_parsec.so * find the plugin using the default connection (that has MYSQL_PLUGIN_DIR set) * copy is_mariadb check from ed25519 tests, just in case --- unittest/libmariadb/connection.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/unittest/libmariadb/connection.c b/unittest/libmariadb/connection.c index b3dc08b4..636075f4 100644 --- a/unittest/libmariadb/connection.c +++ b/unittest/libmariadb/connection.c @@ -2341,6 +2341,20 @@ static int test_parsec(MYSQL *my) int rc; int verify= 0; MYSQL *mysql; + + if (!is_mariadb) + { + diag("feature not supported by MySQL server"); + return SKIP; + } + + if (!mysql_client_find_plugin(my, "parsec", MYSQL_CLIENT_AUTHENTICATION_PLUGIN)) + { + diag("parsec plugin not available"); + diag("error: %s", mysql_error(my)); + return SKIP; + } + rc= mysql_query(my, "INSTALL soname 'auth_parsec'"); if (rc) { @@ -2351,14 +2365,6 @@ static int test_parsec(MYSQL *my) check_mysql_rc(rc, my); mysql= mysql_init(NULL); - if (!mysql_client_find_plugin(mysql, "parsec", MYSQL_CLIENT_AUTHENTICATION_PLUGIN)) - { - diag("parsec plugin not available"); - diag("error: %s", mysql_error(mysql)); - mysql_close(mysql); - return SKIP; - } - mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &verify); if (!my_test_connect(mysql, hostname, "test1", "123", NULL, port, socketname, 0, 0)) {