From: Date: October 26 2006 11:51am Subject: bk commit into 5.0 tree (ramil:1.2323) BUG#22158 List-Archive: http://lists.mysql.com/commits/14418 X-Bug: 22158 Message-Id: <200610260951.k9Q9pgiM035927@myoffice.izhnet.ru> Below is the list of changes that have just been committed into a local 5.0 repository of ram. When ram does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2006-10-26 14:51:34+05:00, ramil@stripped +1 -0 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@stripped, 2006-10-26 14:51:30+05:00, ramil@stripped +7 -0 Fix for bug #22158: Errors in init_connect terminate connections silently - raise warnings if the init_connect execution fails. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: ramil # Host: myoffice.izhnet.ru # Root: /usr/home/ram/work/bug22158/my50-bug22158 --- 1.586/sql/sql_parse.cc 2006-10-26 14:51:42 +05:00 +++ 1.587/sql/sql_parse.cc 2006-10-26 14:51:42 +05:00 @@ -1168,7 +1168,14 @@ pthread_handler_t handle_one_connection( { 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();