|
|
d054d0 |
From 051748825e77172677d9e3b319b870c3c0a70a38 Mon Sep 17 00:00:00 2001
|
|
|
d054d0 |
From: Jitka Plesnikova <jplesnik@redhat.com>
|
|
|
d054d0 |
Date: Fri, 14 Jul 2017 14:13:50 +0200
|
|
|
d054d0 |
Subject: [PATCH] Fix build failures for MariaDB 10.2
|
|
|
d054d0 |
MIME-Version: 1.0
|
|
|
d054d0 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d054d0 |
Content-Transfer-Encoding: 8bit
|
|
|
d054d0 |
|
|
|
d054d0 |
<mariadb_version.h> does not exist in mariadb-5.5.26. Do not include
|
|
|
d054d0 |
it explicitly. Instead rely on including <mysql.h> that transitively
|
|
|
d054d0 |
includes <mariadb_version.h> or <mysql_version.h>. This makes this
|
|
|
d054d0 |
patch more portable.
|
|
|
d054d0 |
|
|
|
d054d0 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
d054d0 |
---
|
|
|
d054d0 |
dbdimp.c | 7 +++++++
|
|
|
d054d0 |
mysql.xs | 4 ++--
|
|
|
d054d0 |
2 files changed, 9 insertions(+), 2 deletions(-)
|
|
|
d054d0 |
|
|
|
d054d0 |
# Fixed in 4.045
|
|
|
d054d0 |
#diff --git a/dbdimp.c b/dbdimp.c
|
|
|
d054d0 |
#index 71251da..97fa9c4 100644
|
|
|
d054d0 |
#--- a/dbdimp.c
|
|
|
d054d0 |
#+++ b/dbdimp.c
|
|
|
d054d0 |
#@@ -2104,6 +2104,9 @@ MYSQL *mysql_dr_connect(
|
|
|
d054d0 |
#
|
|
|
d054d0 |
# if (result)
|
|
|
d054d0 |
# {
|
|
|
d054d0 |
#+#if MYSQL_VERSION_ID >= 50013
|
|
|
d054d0 |
#+ my_bool reconnect= 1;
|
|
|
d054d0 |
#+#endif
|
|
|
d054d0 |
# #if MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
|
|
|
d054d0 |
# /* connection succeeded. */
|
|
|
d054d0 |
# /* imp_dbh == NULL when mysql_dr_connect() is called from mysql.xs
|
|
|
d054d0 |
#@@ -2122,7 +2125,11 @@ MYSQL *mysql_dr_connect(
|
|
|
d054d0 |
# we turn off Mysql's auto reconnect and handle re-connecting ourselves
|
|
|
d054d0 |
# so that we can keep track of when this happens.
|
|
|
d054d0 |
# */
|
|
|
d054d0 |
#+#if MYSQL_VERSION_ID >= 50013
|
|
|
d054d0 |
#+ mysql_options(result, MYSQL_OPT_RECONNECT, &reconnect);
|
|
|
d054d0 |
#+#else
|
|
|
d054d0 |
# result->reconnect=0;
|
|
|
d054d0 |
#+#endif
|
|
|
d054d0 |
# }
|
|
|
d054d0 |
# else {
|
|
|
d054d0 |
# /*
|
|
|
d054d0 |
diff --git a/mysql.xs b/mysql.xs
|
|
|
d054d0 |
index 60cf9c6..750c763 100644
|
|
|
d054d0 |
--- a/mysql.xs
|
|
|
d054d0 |
+++ b/mysql.xs
|
|
|
d054d0 |
@@ -787,7 +787,7 @@ dbd_mysql_get_info(dbh, sql_info_type)
|
|
|
d054d0 |
D_imp_dbh(dbh);
|
|
|
d054d0 |
IV type = 0;
|
|
|
d054d0 |
SV* retsv=NULL;
|
|
|
d054d0 |
-#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 50709
|
|
|
d054d0 |
+#if MYSQL_VERSION_ID >= 50709
|
|
|
d054d0 |
/* MariaDB 10 is not MySQL source level compatible so this only applies to MySQL*/
|
|
|
d054d0 |
IV buffer_len;
|
|
|
d054d0 |
#endif
|
|
|
d054d0 |
@@ -819,7 +819,7 @@ dbd_mysql_get_info(dbh, sql_info_type)
|
|
|
d054d0 |
retsv = newSVpvn("`", 1);
|
|
|
d054d0 |
break;
|
|
|
d054d0 |
case SQL_MAXIMUM_STATEMENT_LENGTH:
|
|
|
d054d0 |
-#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 50709
|
|
|
d054d0 |
+#if MYSQL_VERSION_ID >= 50709
|
|
|
d054d0 |
/* MariaDB 10 is not MySQL source level compatible so this
|
|
|
d054d0 |
only applies to MySQL*/
|
|
|
d054d0 |
/* mysql_get_option() was added in mysql 5.7.3 */
|
|
|
d054d0 |
--
|
|
|
d054d0 |
2.13.6
|
|
|
d054d0 |
|