1
0
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:
Georg Richter
2022-03-01 10:23:34 +01:00
parent 82de6eeb44
commit abc1cf89f1

View File

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