You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Test fix:
For detecting if we test against MaxScale check also if mysql_get_server_info contains "maxScale".
This commit is contained in:
@@ -73,7 +73,12 @@ if (IS_SKYSQL(hostname)) \
|
||||
#define SKIP_NOTLS
|
||||
#endif
|
||||
|
||||
#define IS_MAXSCALE() (getenv("srv")!=NULL && (strcmp(getenv("srv"), "maxscale") == 0 || strcmp(getenv("srv"), "skysql-ha") == 0))
|
||||
MYSQL *mysql_default = NULL; /* default connection */
|
||||
|
||||
#define IS_MAXSCALE()\
|
||||
((mysql_default && strstr(mysql_get_server_info(mysql_default), "maxScale")) ||\
|
||||
(getenv("srv")!=NULL && (strcmp(getenv("srv"), "maxscale") == 0 ||\
|
||||
strcmp(getenv("srv"), "skysql-ha") == 0)))
|
||||
#define SKIP_MAXSCALE \
|
||||
if (IS_MAXSCALE()) \
|
||||
{ \
|
||||
@@ -644,7 +649,7 @@ MYSQL *my_test_connect(MYSQL *mysql,
|
||||
|
||||
void run_tests(struct my_tests_st *test) {
|
||||
int i, rc, total=0;
|
||||
MYSQL *mysql, *mysql_default= NULL; /* default connection */
|
||||
MYSQL *mysql;
|
||||
|
||||
while (test[total].function)
|
||||
total++;
|
||||
|
Reference in New Issue
Block a user