summaryrefslogtreecommitdiffstats
path: root/libmariadb/unittest
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
commit86fbb58c3ac0865482819c10a3e81f2eea001c36 (patch)
tree28c9e526ea739c6f9b89e36115e1e2698bddf981 /libmariadb/unittest
parentReleasing progress-linux version 1:10.11.6-2~progress7.99u1. (diff)
downloadmariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.tar.xz
mariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.zip
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libmariadb/unittest')
-rw-r--r--libmariadb/unittest/libmariadb/charset.c3
-rw-r--r--libmariadb/unittest/libmariadb/connection.c6
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;