← Back to team overview

maria-developers team mailing list archive

Re: e687577: MDEV-10340: support COM_RESET_CONNECTION

 

Hi, Oleksandr!

On Dec 12, Oleksandr Byelkin wrote:
> revision-id: e6875772b0d65a6341456a6f4aca3353bbdae3e4 (mariadb-10.2.2-131-ge687577)
> parent(s): 7ca1e2abad42a7436e6b668b4568d6fadc2ca165
> committer: Oleksandr Byelkin
> timestamp: 2016-12-12 14:41:45 +0100
> message:
> 
> MDEV-10340: support COM_RESET_CONNECTION
> 
> draft to check with client
> 
> diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
> index a2a4ed2..b760aeb 100644
> --- a/sql/sql_parse.cc
> +++ b/sql/sql_parse.cc
> @@ -1679,6 +1680,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
>      break;
>    }
>  #endif
> +  case COM_RESET_CONNECTION:
> +  {
> +    thd->status_var.com_other++;
> +    thd->change_user();
> +    my_ok(thd, 0, 0, 0);
> +    break;
> +  }

Looks ok, but I suspect that, just like for COM_CHANGE_USER, you might
need here:

      thd->clear_error();          // if errors from rollback

ok to push with the change as above. But please make sure that C/C part
is pushed too

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx