mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
A cleanup for MDEV-8844: Fixing compilation failure on Windows
Fixing lossy type conversions: - from int64 to int - from size_t to uint
This commit is contained in:
@ -781,13 +781,14 @@ void Static_binary_string::qs_append(ulonglong i)
|
||||
bool Binary_string::copy_printable_hhhh(CHARSET_INFO *to_cs,
|
||||
CHARSET_INFO *from_cs,
|
||||
const char *from,
|
||||
uint32 from_length)
|
||||
size_t from_length)
|
||||
{
|
||||
DBUG_ASSERT(from_length < UINT_MAX32);
|
||||
uint errors;
|
||||
uint one_escaped_char_length= MY_CS_PRINTABLE_CHAR_LENGTH * to_cs->mbminlen;
|
||||
uint one_char_length= MY_MAX(one_escaped_char_length, to_cs->mbmaxlen);
|
||||
uint32 bytes_needed= (uint32) from_length * one_char_length;
|
||||
if (alloc(bytes_needed))
|
||||
ulonglong bytes_needed= from_length * one_char_length;
|
||||
if (bytes_needed >= UINT_MAX32 || alloc((size_t) bytes_needed))
|
||||
return true;
|
||||
str_length= my_convert_using_func(Ptr, Alloced_length, to_cs,
|
||||
my_wc_to_printable_generic,
|
||||
|
Reference in New Issue
Block a user