1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Test fix: pipe name

Instead of relying on default (MySQL), we check @@socket and
pass the correct pipe name.
This commit is contained in:
Georg Richter
2025-02-27 09:33:35 +01:00
parent aa240cd181
commit f7633e9d68

View File

@@ -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;