]>
Commit | Line | Data |
---|---|---|
b4e1fa2c AM |
1 | # name : log_connection_error.patch |
2 | # introduced : 12 | |
3 | # maintainer : Oleg | |
4 | # | |
5 | #!!! notice !!! | |
6 | # Any small change to this file in the main branch | |
7 | # should be done or reviewed by the maintainer! | |
11822e22 AM |
8 | diff -ruN /dev/null b/patch_info/log_connection_error.patch |
9 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | |
10 | +++ b/patch_info/log_connection_error.patch 2011-04-09 18:48:54.000000000 +0400 | |
b4e1fa2c AM |
11 | @@ -0,0 +1,6 @@ |
12 | +File=log_connection_error.patch | |
13 | +Name=logging abandoned connections | |
14 | +Version=1.0 | |
15 | +Author=Percona <info@percona.com> | |
16 | +License=GPL | |
17 | +Comment= | |
18 | diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc | |
11822e22 AM |
19 | --- a/sql/mysqld.cc 2011-04-09 18:48:53.000000000 +0400 |
20 | +++ b/sql/mysqld.cc 2011-04-09 18:48:54.000000000 +0400 | |
21 | @@ -5044,6 +5044,10 @@ | |
b4e1fa2c AM |
22 | |
23 | DBUG_PRINT("error",("Too many connections")); | |
d8778560 | 24 | close_connection(thd, ER_CON_COUNT_ERROR); |
b4e1fa2c AM |
25 | + if (global_system_variables.log_warnings) |
26 | + { | |
27 | + sql_print_warning("%s", ER_DEFAULT(ER_CON_COUNT_ERROR)); | |
28 | + } | |
29 | delete thd; | |
30 | DBUG_VOID_RETURN; | |
31 | } | |
11822e22 | 32 | @@ -5424,6 +5428,10 @@ |
b4e1fa2c AM |
33 | if (!(thd->net.vio= vio_new_win32pipe(hConnectedPipe)) || |
34 | my_net_init(&thd->net, thd->net.vio)) | |
35 | { | |
36 | + if (global_system_variables.log_warnings) | |
37 | + { | |
38 | + sql_print_warning("%s", ER_DEFAULT(ER_OUT_OF_RESOURCES)); | |
39 | + } | |
d8778560 | 40 | close_connection(thd, ER_OUT_OF_RESOURCES); |
b4e1fa2c AM |
41 | delete thd; |
42 | continue; | |
11822e22 | 43 | @@ -5619,6 +5627,10 @@ |
b4e1fa2c AM |
44 | event_conn_closed)) || |
45 | my_net_init(&thd->net, thd->net.vio)) | |
46 | { | |
47 | + if (global_system_variables.log_warnings) | |
48 | + { | |
49 | + sql_print_warning("%s", ER_DEFAULT(ER_OUT_OF_RESOURCES)); | |
50 | + } | |
d8778560 | 51 | close_connection(thd, ER_OUT_OF_RESOURCES); |
b4e1fa2c AM |
52 | errmsg= 0; |
53 | goto errorconn; |