List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:April 7 2011 2:40pm
Subject:Re: bzr commit into mysql-trunk branch (Dmitry.Shulga:3328) Bug#11764168
View as plain text  
On 4/5/11 12:04 PM, Dmitry Shulga wrote:
> #Atfile:///Users/shulga/projects/mysql/mysql-trunk/  based
> onrevid:alfranio.correia@stripped
>
>   3328 Dmitry Shulga	2011-04-05
>        follow-up for patch for
>        Bug#11764168: 56976: SEVERE DENIAL OF SERVICE IN PREPARED STATEMENTS
>
>        Removed using of max-long-data-size variable since
>        it was marked as deprecated. Use max-allowed-packet instead.
>
>        Variable max-long-data-size was introduced as temporal solution
>        in order to make possible send of BLOB with size greater than 1GB.

OK to push.

>      modified:
>        sql/item.cc
>        sql/mysqld.cc
>        sql/sys_vars.cc
> === modified file 'sql/item.cc'
> --- a/sql/item.cc	2011-04-04 08:47:25 +0000
> +++ b/sql/item.cc	2011-04-05 15:04:16 +0000
> @@ -2979,12 +2979,12 @@ bool Item_param::set_longdata(const char
>       (here), and first have to concatenate all pieces together,
>       write query to the binary log and only then perform conversion.
>     */
> -  if (str_value.length() + length>  max_long_data_size)
> +  if (str_value.length() + length> 
> current_thd->variables.max_allowed_packet)
>     {
>       my_message(ER_UNKNOWN_ERROR,
>                  "Parameter of prepared statement which is set through "
>                  "mysql_send_long_data() is longer than "
> -               "'max_long_data_size' bytes",
> +               "'max_allowed_packet' bytes",
>                  MYF(0));

We could use ER_WARN_ALLOWED_PACKET_OVERFLOWED here on 5.5.

     push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_WARN_ALLOWED_PACKET_OVERFLOWED,
                         ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
                         "mysql_send_long_data()",
                         current_thd->variables.max_allowed_packet);

Regards,

Davi

Thread
bzr commit into mysql-trunk branch (Dmitry.Shulga:3328) Bug#11764168Dmitry Shulga5 Apr
  • Re: bzr commit into mysql-trunk branch (Dmitry.Shulga:3328) Bug#11764168Davi Arnaut7 Apr