]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/1.38.7-mysql.patch
- fix : reload a bad configuration file doesn't kill director any more
[bacula/bacula] / bacula / patches / 1.38.7-mysql.patch
1
2 This patch (thanks to Frank Sweetser) should fix the timeout problem
3 users are experiencing with MySQL versions greater than 5.0.13.  
4 It can be applied to Bacula version 1.38.7 (and possibly 1.38.5 and 1.38.6)
5 with:
6
7   cd <bacula-source>
8   patch -p0 <1.38.7-mysql.patch
9   make
10   make install
11
12 Index: src/cats/mysql.c
13 ===================================================================
14 RCS file: /cvsroot/bacula/bacula/src/cats/mysql.c,v
15 retrieving revision 1.37.2.2
16 diff -u -r1.37.2.2 mysql.c
17 --- src/cats/mysql.c    4 Mar 2006 11:10:17 -0000       1.37.2.2
18 +++ src/cats/mysql.c    7 Apr 2006 14:10:23 -0000
19 @@ -132,7 +132,6 @@
20     mysql_server_init(0, NULL, NULL);
21  #endif
22     mysql_init(&(mdb->mysql));
23 -   mdb->mysql.reconnect = 1;             /* so connection does not timeout */
24     Dmsg0(50, "mysql_init done\n");
25     /* If connection fails, try at 5 sec intervals for 30 seconds. */
26     for (int retry=0; retry < 6; retry++) {
27 @@ -153,6 +152,7 @@
28        bmicrosleep(5,0);
29     }
30  
31 +   mdb->mysql.reconnect = 1;             /* so connection does not timeout */
32     Dmsg0(50, "mysql_real_connect done\n");
33     Dmsg3(50, "db_user=%s db_name=%s db_password=%s\n", mdb->db_user, mdb->db_name,
34              mdb->db_password==NULL?"(NULL)":mdb->db_password);