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/r/init_connect.result | |
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/r/init_connect.result')
-rw-r--r-- | mysql-test/r/init_connect.result | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mysql-test/r/init_connect.result b/mysql-test/r/init_connect.result index f5ec0bdc932..0ff6c206422 100644 --- a/mysql-test/r/init_connect.result +++ b/mysql-test/r/init_connect.result @@ -20,6 +20,8 @@ hex(a) 616263 set GLOBAL init_connect="adsfsdfsdfs"; select @a; +ERROR 08S01: Aborted connection to db: 'test' user: 'user_1' host: 'localhost' (init_connect command failed) +select @a; Got one of the listed errors drop table t1; End of 4.1 tests |