mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
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.
This commit is contained in:
parent
9d6ec6d14a
commit
93efa48a7b
1 changed files with 2 additions and 2 deletions
|
|
@ -768,7 +768,7 @@ static void do_verify_prepare_field(MYSQL_RES *result,
|
||||||
{
|
{
|
||||||
MYSQL_FIELD *field;
|
MYSQL_FIELD *field;
|
||||||
CHARSET_INFO *cs;
|
CHARSET_INFO *cs;
|
||||||
ulonglong expected_field_length;
|
ulonglong expected_field_length= length;
|
||||||
|
|
||||||
if (!(field= mysql_fetch_field_direct(result, no)))
|
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);
|
cs= get_charset(field->charsetnr, 0);
|
||||||
DIE_UNLESS(cs);
|
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;
|
expected_field_length= UINT_MAX32;
|
||||||
if (!opt_silent)
|
if (!opt_silent)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue