From f7633e9d68e2e4281a93cfb427b643725833134b Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Thu, 27 Feb 2025 09:33:35 +0100 Subject: [PATCH] Test fix: pipe name Instead of relying on default (MySQL), we check @@socket and pass the correct pipe name. --- unittest/libmariadb/connection.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unittest/libmariadb/connection.c b/unittest/libmariadb/connection.c index 2d6ef838..6eae64d8 100644 --- a/unittest/libmariadb/connection.c +++ b/unittest/libmariadb/connection.c @@ -2050,6 +2050,7 @@ static int test_conc760(MYSQL *my) MYSQL_RES *result; MYSQL_ROW row; int rc; + char named_pipe_name[128]; my_bool reconnect= 1, verify= 0; unsigned long last_thread_id= 0; unsigned int protocol= MYSQL_PROTOCOL_PIPE; @@ -2057,13 +2058,15 @@ static int test_conc760(MYSQL *my) SKIP_MAXSCALE; - rc= mysql_query(my, "select @@named_pipe"); + rc= mysql_query(my, "select @@named_pipe, @@socket"); check_mysql_rc(rc, mysql); if ((result= mysql_store_result(my))) { if((row= mysql_fetch_row(result))) have_named_pipe= atoi(row[0]); + strncpy(named_pipe_name, row[1], sizeof(named_pipe_name)-1); + named_pipe_name[sizeof(named_pipe_name)-1]= '\0'; mysql_free_result(result); } @@ -2078,7 +2081,7 @@ static int test_conc760(MYSQL *my) mysql_options(mysql, MYSQL_OPT_PROTOCOL, &protocol); if (!my_test_connect(mysql, hostname, username, - password, schema, port, socketname, CLIENT_REMEMBER_OPTIONS)) + password, schema, port, named_pipe_name, CLIENT_REMEMBER_OPTIONS)) { diag("error: %s", mysql_error(mysql)); return FAIL;