diff options
author | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-10-26 14:51:34 +0500 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-10-26 14:51:34 +0500 |
commit | ac2f1cca69749f85e4436aaf39943b119c0a7f81 (patch) | |
tree | afec99a8b51d380a3a852822b4e122110429e14b /sql/sql_parse.cc | |
parent | 5a88282ec06c466218ea26ebbee43b0a50d25025 (diff) | |
download | mariadb-git-ac2f1cca69749f85e4436aaf39943b119c0a7f81.tar.gz |
Fix for bug #22158: Errors in init_connect terminate connections silently
When executing the init_connect statement, thd->net.vio is set to 0, to
forbid sending any results to the client. As a side effect we don't log
possible errors, either.
Now we write warnings to the error log if an init_connect query
fails.
sql/sql_parse.cc:
Fix for bug #22158: Errors in init_connect terminate connections silently
- raise warnings if the init_connect execution fails.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2f1aaea37d0..4992d2514c9 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1168,7 +1168,14 @@ pthread_handler_t handle_one_connection(void *arg) { execute_init_command(thd, &sys_init_connect, &LOCK_sys_init_connect); if (thd->query_error) + { thd->killed= THD::KILL_CONNECTION; + sql_print_warning(ER(ER_NEW_ABORTING_CONNECTION), + thd->thread_id,(thd->db ? thd->db : "unconnected"), + sctx->user ? sctx->user : "unauthenticated", + sctx->host_or_ip, "init_connect command failed"); + sql_print_warning("%s", net->last_error); + } thd->proc_info=0; thd->set_time(); thd->init_for_queries(); |