maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #11162
Re: d975226a0d6: MDEV-15241: make SIGNAL maximum MESSAGE_TEXT length a larger value
Hi, Varun!
On Mar 22, Varun wrote:
> revision-id: d975226a0d668775062151c9f30676db3d81c93b (mariadb-10.3.0-642-gd975226a0d6)
> parent(s): 85ddd9e8ce11bef089ccc6c86745142d09639c14
> author: Varun Gupta
> committer: Varun Gupta
> timestamp: 2018-03-22 12:45:55 +0530
> message:
>
> MDEV-15241: make SIGNAL maximum MESSAGE_TEXT length a larger value
>
> Increasing the length of MESSAGE_TEXT from 128 to MYSQL_ERRMSG_SIZE
> which is the max length of the error message
ok to push.
Don't forget to document your change, please.
> diff --git a/sql/sql_signal.cc b/sql/sql_signal.cc
> index 1da8b145151..13dc3db1f10 100644
> --- a/sql/sql_signal.cc
> +++ b/sql/sql_signal.cc
> @@ -262,12 +262,12 @@ int Sql_cmd_common_signal::eval_signal_informations(THD *thd, Sql_condition *con
> }
> /*
> Enforce that SET MESSAGE_TEXT = <value> evaluates the value
> - as VARCHAR(128) CHARACTER SET UTF8.
> + as VARCHAR(MYSQL_ERRMSG_SIZE) CHARACTER SET UTF8.
> */
> bool truncated;
> String utf8_text;
> str= set->val_str(& str_value);
> - truncated= assign_fixed_string(thd->mem_root, & my_charset_utf8_bin, 128,
> + truncated= assign_fixed_string(thd->mem_root, & my_charset_utf8_bin, MYSQL_ERRMSG_SIZE,
> & utf8_text, str);
> if (truncated)
> {
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx