diff options
Diffstat (limited to 'libmariadb/unittest')
-rw-r--r-- | libmariadb/unittest/libmariadb/charset.c | 3 | ||||
-rw-r--r-- | libmariadb/unittest/libmariadb/connection.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libmariadb/unittest/libmariadb/charset.c b/libmariadb/unittest/libmariadb/charset.c index b438f8d9..4d17731f 100644 --- a/libmariadb/unittest/libmariadb/charset.c +++ b/libmariadb/unittest/libmariadb/charset.c @@ -47,6 +47,9 @@ int bug_8378(MYSQL *mysql) { MYSQL_RES *res; MYSQL_ROW row; + /* MXS-4898: MaxScale sends utf8mb4 in handshake OK packet */ + SKIP_MAXSCALE; + len= mysql_real_escape_string(mysql, out, TEST_BUG8378_IN, 4); FAIL_IF(memcmp(out, TEST_BUG8378_OUT, len), "wrong result"); diff --git a/libmariadb/unittest/libmariadb/connection.c b/libmariadb/unittest/libmariadb/connection.c index 517bc538..fa232cad 100644 --- a/libmariadb/unittest/libmariadb/connection.c +++ b/libmariadb/unittest/libmariadb/connection.c @@ -1222,6 +1222,9 @@ static int test_mdev13100(MYSQL *my __attribute__((unused))) int rc; FILE *fp; + /* MXS-4898: MaxScale sends utf8mb4 in handshake OK packet */ + SKIP_MAXSCALE; + if (!(fp= fopen("./mdev13100.cnf", "w"))) return FAIL; @@ -1240,6 +1243,7 @@ static int test_mdev13100(MYSQL *my __attribute__((unused))) diag("Error: %s", mysql_error(mysql)); return FAIL; } + diag("Default charset: %s", mysql_character_set_name(mysql)); FAIL_IF(strcmp("latin2", mysql_character_set_name(mysql)), "Expected charset latin2"); mysql_close(mysql); @@ -2190,6 +2194,7 @@ void my_status_callback(void *ptr, enum enum_mariadb_status_info type, ...) { MARIADB_CONST_STRING *str= va_arg(ap, MARIADB_CONST_STRING *); strncpy(data->database, str->str, str->length); + data->database[str->length]= 0; } break; case SESSION_TRACK_SYSTEM_VARIABLES: @@ -2200,6 +2205,7 @@ void my_status_callback(void *ptr, enum enum_mariadb_status_info type, ...) if (!strncmp(key->str, "character_set_client", key->length)) { strncpy(data->charset, val->str, val->length); + data->charset[val->length]= 0; } } break; |