mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.2 into 10.3
This commit is contained in:
@ -4335,6 +4335,25 @@ bool validate_comment_length(THD *thd, LEX_CSTRING *comment, size_t max_len,
|
||||
Well_formed_prefix(system_charset_info, *comment, max_len).length();
|
||||
if (tmp_len < comment->length)
|
||||
{
|
||||
#if MARIADB_VERSION_ID < 100500
|
||||
if (comment->length <= max_len)
|
||||
{
|
||||
if (thd->is_strict_mode())
|
||||
{
|
||||
my_error(ER_INVALID_CHARACTER_STRING, MYF(0),
|
||||
system_charset_info->csname, comment->str);
|
||||
DBUG_RETURN(true);
|
||||
}
|
||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_INVALID_CHARACTER_STRING,
|
||||
ER_THD(thd, ER_INVALID_CHARACTER_STRING),
|
||||
system_charset_info->csname, comment->str);
|
||||
comment->length= tmp_len;
|
||||
DBUG_RETURN(false);
|
||||
}
|
||||
#else
|
||||
#error do it in TEXT_STRING_sys
|
||||
#endif
|
||||
if (thd->is_strict_mode())
|
||||
{
|
||||
my_error(err_code, MYF(0), name, static_cast<ulong>(max_len));
|
||||
|
Reference in New Issue
Block a user