]> git.pld-linux.org Git - packages/mysql.git/blob - log_connection_error.patch
- disable response-time-distribution patch on arch which has no atomic builtins even...
[packages/mysql.git] / log_connection_error.patch
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!
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
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
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 @@
22  
23      DBUG_PRINT("error",("Too many connections"));
24      close_connection(thd, ER_CON_COUNT_ERROR);
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    }
32 @@ -5424,6 +5428,10 @@
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 +      }
40        close_connection(thd, ER_OUT_OF_RESOURCES);
41        delete thd;
42        continue;
43 @@ -5619,6 +5627,10 @@
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 +      }
51        close_connection(thd, ER_OUT_OF_RESOURCES);
52        errmsg= 0;
53        goto errorconn;
This page took 0.560546 seconds and 3 git commands to generate.