1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fix "enforce no trailing \n in Diagnostic_area messages"

cannot have an assert in Warning_info::push_warning()
because SQL command SIGNAL can set an absolutely arbitrary
message, even an empty one or ending with '\n'

move the assert into push_warning() and my_message_sql().

followup for 9508a44c37
This commit is contained in:
Sergei Golubchik
2025-01-08 18:42:37 +01:00
parent 505b7127c9
commit 82fd202fa4
3 changed files with 6 additions and 1 deletions

View File

@ -3086,6 +3086,8 @@ err:
}
else if (info->errmsg != NULL)
safe_strcpy(info->error_text, sizeof(info->error_text), info->errmsg);
else if (info->error_text[0] == 0)
safe_strcpy(info->error_text, sizeof(info->error_text), ER(info->error));
my_message(info->error, info->error_text, MYF(0));