Commit 1351ff34 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Julien Muchembled

perl-DBD-mysql: fix compilation issue with MariaDB 10.2.6

Because this does not seem to be enough:
https://github.com/perl5-dbi/DBD-mysql/pull/133

We should keep using MariaDB 10.1 for ERP5 as long as perl-DBD-mysql
is not fixed properly.
parent f9a2d619
diff -u DBD-mysql-4.042/dbdimp.c DBD-mysql-4.042/dbdimp.c
--- DBD-mysql-4.042/dbdimp.c 2017-02-28 14:36:40.000000000 +0100
+++ DBD-mysql-4.042/dbdimp.c 2017-06-08 12:43:39.704228470 +0200
@@ -2139,6 +2139,7 @@
if (result)
{
+ my_bool reconnect= 0;
#if MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
/* connection succeeded. */
/* imp_dbh == NULL when mysql_dr_connect() is called from mysql.xs
@@ -2155,7 +2156,7 @@
we turn off Mysql's auto reconnect and handle re-connecting ourselves
so that we can keep track of when this happens.
*/
- result->reconnect=0;
+ mysql_options(result, MYSQL_OPT_RECONNECT, &reconnect);
}
else {
/*
diff -u DBD-mysql-4.042/dbdimp.h DBD-mysql-4.042/dbdimp.h
--- DBD-mysql-4.042/dbdimp.h 2017-02-28 14:36:40.000000000 +0100
+++ DBD-mysql-4.042/dbdimp.h 2017-06-08 12:44:21.233948264 +0200
@@ -67,6 +67,12 @@
#define SSL_LAST_VERIFY_VERSION 50799
#define MYSQL_VERSION_5_0 50001
/* This is to avoid the ugly #ifdef mess in dbdimp.c */
+
+/* MariaDB Connector/C has MARIADB_VERSION_ID instead of MYSQL_VERSION_ID */
+#if !defined(MYSQL_VERSION_ID) && defined(MARIADB_VERSION_ID)
+#define MYSQL_VERSION_ID MARIADB_VERSION_ID
+#endif
+
#if MYSQL_VERSION_ID < SQL_STATE_VERSION
#define mysql_sqlstate(svsock) (NULL)
#endif
......@@ -17,6 +17,8 @@ url = http://www.cpan.org/modules/by-module/DBD/DBD-mysql-4.042.tar.gz
md5sum = a144bd950b55af68835d44bc4ea6e5aa
patches =
${:_profile_base_location_}/DBD-mysql-4.027.rpathsupport.patch#a932982b7725e6621cfce3a3d7917e03
${:_profile_base_location_}/DBD-mysql-4.042.mariadb.patch#5864d36d19c4a05034b3a4873f7c659a
patch-options = -p1
[perl-DBD-MySQL]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment