diff options
Diffstat (limited to 'community/bareos/mariadb.patch')
-rw-r--r-- | community/bareos/mariadb.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/community/bareos/mariadb.patch b/community/bareos/mariadb.patch new file mode 100644 index 0000000000..6a207ea00e --- /dev/null +++ b/community/bareos/mariadb.patch @@ -0,0 +1,21 @@ +diff --git a/src/cats/mysql.c b/src/cats/mysql.c +index be910fb..7675cd4 100644 +--- a/src/cats/mysql.c ++++ b/src/cats/mysql.c +@@ -156,6 +156,7 @@ bool B_DB_MYSQL::open_database(JCR *jcr) + { + bool retval = false; + int errstat; ++ my_bool reconnect = 1; + + P(mutex); + if (m_connected) { +@@ -200,7 +201,7 @@ bool B_DB_MYSQL::open_database(JCR *jcr) + bmicrosleep(5,0); + } + +- m_instance.reconnect = 1; /* so connection does not timeout */ ++ mysql_options(&m_instance, MYSQL_OPT_RECONNECT, &reconnect); /* so connection does not timeout */ + Dmsg0(50, "mysql_real_connect done\n"); + Dmsg3(50, "db_user=%s db_name=%s db_password=%s\n", m_db_user, m_db_name, + (m_db_password == NULL) ? "(NULL)" : m_db_password); |