1 # name : log_connection_error.patch
6 # Any small change to this file in the main branch
7 # should be done or reviewed by the maintainer!
9 +++ b/patch_info/log_connection_error.patch
11 +File=log_connection_error.patch
12 +Name=logging abandoned connections
14 +Author=Percona <info@percona.com>
19 @@ -5098,6 +5098,10 @@
21 DBUG_PRINT("error",("Too many connections"));
22 close_connection(thd, ER_CON_COUNT_ERROR);
23 + if (global_system_variables.log_warnings)
25 + sql_print_warning("%s", ER_DEFAULT(ER_CON_COUNT_ERROR));
30 @@ -5481,6 +5485,10 @@
31 if (!(thd->net.vio= vio_new_win32pipe(hConnectedPipe)) ||
32 my_net_init(&thd->net, thd->net.vio))
34 + if (global_system_variables.log_warnings)
36 + sql_print_warning("%s", ER_DEFAULT(ER_OUT_OF_RESOURCES));
38 close_connection(thd, ER_OUT_OF_RESOURCES);
41 @@ -5676,6 +5684,10 @@
42 event_conn_closed)) ||
43 my_net_init(&thd->net, thd->net.vio))
45 + if (global_system_variables.log_warnings)
47 + sql_print_warning("%s", ER_DEFAULT(ER_OUT_OF_RESOURCES));
49 close_connection(thd, ER_OUT_OF_RESOURCES);