summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-13 18:50:21 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-15 12:10:48 +0200
commit93efa48a7b972fc463406603574a4d508eefe792 (patch)
treed4dfb1028468d40327725a633081664acd043543 /tests
parent9d6ec6d14a25293201670a97664ea3f60584d3cb (diff)
downloadmariadb-git-93efa48a7b972fc463406603574a4d508eefe792.tar.gz
fix failing main.mysql_client_test test on 32bit
in `ulonglong=ulong*uint` multiplication is done in ulong, wrapping around on 32bit. This became visible after C/C changed the default charset to utf8, thus changing mbmaxlem from 1 to 3.
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_fw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c
index f69eb28a287..4d036887629 100644
--- a/tests/mysql_client_fw.c
+++ b/tests/mysql_client_fw.c
@@ -768,7 +768,7 @@ static void do_verify_prepare_field(MYSQL_RES *result,
{
MYSQL_FIELD *field;
CHARSET_INFO *cs;
- ulonglong expected_field_length;
+ ulonglong expected_field_length= length;
if (!(field= mysql_fetch_field_direct(result, no)))
{
@@ -777,7 +777,7 @@ static void do_verify_prepare_field(MYSQL_RES *result,
}
cs= get_charset(field->charsetnr, 0);
DIE_UNLESS(cs);
- if ((expected_field_length= length * cs->mbmaxlen) > UINT_MAX32)
+ if ((expected_field_length*= cs->mbmaxlen) > UINT_MAX32)
expected_field_length= UINT_MAX32;
if (!opt_silent)
{