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)
8 patch -p0 <1.38.7-mysql.patch
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
20 mysql_server_init(0, NULL, NULL);
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++) {
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);