mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-18899: Server crashes in Field::set_warning_truncated_wrong_value
To fix the crash there we need to make sure that the server while storing the statistical values in statistical tables should do it in a multi-byte safe way. Also there is no need to throw warnings if there is truncation while storing values from statistical fields.
This commit is contained in:
@ -7027,8 +7027,11 @@ Field_longstr::check_string_copy_error(const String_copier *copier,
|
||||
if (!(pos= copier->most_important_error_pos()))
|
||||
return FALSE;
|
||||
|
||||
convert_to_printable(tmp, sizeof(tmp), pos, (end - pos), cs, 6);
|
||||
set_warning_truncated_wrong_value("string", tmp);
|
||||
if (!is_stat_field)
|
||||
{
|
||||
convert_to_printable(tmp, sizeof(tmp), pos, (end - pos), cs, 6);
|
||||
set_warning_truncated_wrong_value("string", tmp);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user