diff --git a/unittest/libmariadb/my_test.h b/unittest/libmariadb/my_test.h index 5fc8b1a5..10fff941 100644 --- a/unittest/libmariadb/my_test.h +++ b/unittest/libmariadb/my_test.h @@ -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++; diff --git a/unittest/libmariadb/ps_bugs.c b/unittest/libmariadb/ps_bugs.c index 43a614d5..9a2af916 100644 --- a/unittest/libmariadb/ps_bugs.c +++ b/unittest/libmariadb/ps_bugs.c @@ -5423,6 +5423,8 @@ static int test_mdev19838(MYSQL *mysql) char charvalue[] = "012345678901234567890123456789012345"; MYSQL_STMT *stmt; + SKIP_MAXSCALE; + rc = mysql_query(mysql, "CREATE temporary TABLE mdev19838(" "f1 char(36)," "f2 char(36),"