diff options
author | Tatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com> | 2012-01-02 06:25:48 +0000 |
---|---|---|
committer | Tatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com> | 2012-01-02 06:25:48 +0000 |
commit | 251fa88afacbd03a00894c04037d987b62f3ca58 (patch) | |
tree | 166ea464c43de4bd21caf0ccaeab2a383a182dff /mysql-test/t/init_connect.test | |
parent | e498a1bf65101878f51d0b2ca3eb0d05a8d3d01c (diff) | |
download | mariadb-git-251fa88afacbd03a00894c04037d987b62f3ca58.tar.gz |
BUG#11755281/47032: ERROR 2006 / ERROR 2013 INSTEAD OF PROPER ERROR MESSAGE
If init_command was incorrect, we couldn't let users execute
queries, but we couldn't report the issue to the client either
as it does not expect error messages before even sending a
command. Thus, we simply disconnected them without throwing
a clear error.
We now go through the proper sequence once (without executing
any user statements) so we can report back what the problem
is. Only then do we disconnect the user.
As always, root remains unaffected by this as init_command is
(still) not executed for them.
mysql-test/r/init_connect.result:
We now report a proper error if init_command fails.
Expect as much.
mysql-test/t/init_connect.test:
We now report a proper error if init_command fails.
Expect as much.
sql/sql_connect.cc:
If init_command fails, throw an error explaining this to
the user.
Diffstat (limited to 'mysql-test/t/init_connect.test')
-rw-r--r-- | mysql-test/t/init_connect.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/init_connect.test b/mysql-test/t/init_connect.test index b6bac5f65fa..e96d02fe0d1 100644 --- a/mysql-test/t/init_connect.test +++ b/mysql-test/t/init_connect.test @@ -36,6 +36,14 @@ connection con0; set GLOBAL init_connect="adsfsdfsdfs"; connect (con5,localhost,user_1,,); connection con5; +# BUG#11755281/47032: ERROR 2006 / ERROR 2013 INSTEAD OF PROPER ERROR MESSAGE +# We now throw a proper error message here: +--replace_regex /connection .* to/connection to/ +--error ER_NEW_ABORTING_CONNECTION +select @a; +# We got disconnected after receiving the above error message; any further +# requests should fail with a notice that no one's listening to us. +# --error CR_SERVER_GONE_ERROR,CR_SERVER_LOST --error 2013,2006 select @a; connection con0; |