Package: opensips / 2.2.2-3.1

mysql-fixes.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Description: Fix build failure with new Mariadb-10.3
Bug-Debian: https://bugs.debian.org/918393
Author: Gianfranco Costamagna <locutusofborg@debian.org>
Last-Update: 2019-08-12

--- opensips-2.2.2.orig/modules/db_mysql/dbase.c
+++ opensips-2.2.2/modules/db_mysql/dbase.c
@@ -35,7 +35,6 @@
 #include <mysql/mysql.h>
 #include <mysql/errmsg.h>
 #include <mysql/mysqld_error.h>
-#include <mysql/mysql_version.h>
 #include "../../mem/mem.h"
 #include "../../dprint.h"
 #include "../../db/db_query.h"
--- opensips-2.2.2.orig/modules/db_mysql/my_con.c
+++ opensips-2.2.2/modules/db_mysql/my_con.c
@@ -22,7 +22,7 @@
 #include "my_con.h"
 #include "db_mysql.h"
 #include "dbase.h"
-#include <mysql/mysql_version.h>
+#include <mysql/mysql.h>
 #include "../../mem/mem.h"
 #include "../../dprint.h"
 #include "../../ut.h"
@@ -65,7 +65,8 @@ int db_mysql_connect(struct my_con* ptr)
 		return -1;
 	}
 	/* force no auto reconnection */
-	ptr->con->reconnect = 0;
+	my_bool reconnect = 0;
+	mysql_options(ptr->con, MYSQL_OPT_RECONNECT, &reconnect);
 
 	LM_DBG("connection type is %s\n", mysql_get_host_info(ptr->con));
 	LM_DBG("protocol version is %d\n", mysql_get_proto_info(ptr->con));