Hi, Oleksandr!

On Oct 17, Oleksandr Byelkin wrote:
> revision-id: dabf6cac60987e88266396a28e40b341899704e6 
> (mariadb-10.2.2-49-gdabf6ca)
> parent(s): 8303aded294ce905bbc513e7ee42623d5f1fdb50
> committer: Oleksandr Byelkin
> timestamp: 2016-10-17 16:59:36 +0200
> message:
> 
> MDEV-10340: support COM_RESET_CONNECTION
> 
> draft to check with client
> 
> ---
>  include/mysql.h.pp                                 |  2 +
>  include/mysql_com.h                                |  2 +
>  mysql-test/r/mysqld--help.result                   |  2 +-
>  .../sys_vars/r/sysvars_server_embedded.result      |  4 +-
>  .../sys_vars/r/sysvars_server_notembedded.result   |  4 +-
>  sql/sql_class.cc                                   | 65 
> ++++++++++++++++++++++
>  sql/sql_class.h                                    |  1 +
>  sql/sql_parse.cc                                   | 13 ++++-
>  8 files changed, 86 insertions(+), 7 deletions(-)
> 
> diff --git a/include/mysql_com.h b/include/mysql_com.h
> index 461800f..e1b129a 100644
> --- a/include/mysql_com.h
> +++ b/include/mysql_com.h
> @@ -111,6 +111,8 @@ enum enum_server_command
>    COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
>    COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, 
> COM_STMT_CLOSE,
>    COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON,
> +  COM_UNIMPLEMENTED,
> +  COM_RESET_CONNECTION,

What's COM_UNIMPLEMENTED?

>    /* don't forget to update const char *command_name[] in sql_parse.cc */
>    COM_MDB_GAP_BEG,
>    COM_MDB_GAP_END=250,
> diff --git a/sql/sql_class.cc b/sql/sql_class.cc
> index 1af3b9a..0cb58d4 100644
> --- a/sql/sql_class.cc
> +++ b/sql/sql_class.cc
> @@ -1575,6 +1575,71 @@ void THD::change_user(void)
>  }
>  
>  
> +/*
> +  Do what's needed when one invokes change user
> +
> +  SYNOPSIS
> +    cleanup_connection()
> +
> +  IMPLEMENTATION
> +    Reset all resources that are connection specific
> +*/
> +
> +void THD::cleanup_connection(void)
> +{

Why do you need a dedicated method for that, instead of simply invoking
THD::change_user() for COM_RESET_CONNECTION?

> +}

Regards,
Sergei
Chief Architect MariaDB
and secur...@mariadb.org

_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to