File perl-DBD-mysql-mariadb-compatibility.patch of Package perl-DBD-mysql

From 5caeeb0aa19d72a506f03c711da2faf2956a5a62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= <git@myname.nl>
Date: Sat, 8 Feb 2025 12:55:35 +0100
Subject: [PATCH] Fix build issue with MariaDB related to
 mysql_real_escape_string_quote()

Closes #462
---
 dbdimp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dbdimp.c b/dbdimp.c
index 135696da..7cb78281 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -766,7 +766,11 @@ static char *parse_params(
             if (!is_num)
             {
               *ptr++ = '\'';
+#if (MYSQL_VERSION_ID >= 50704) && !defined(MARIADB_BASE_VERSION)
               ptr += mysql_real_escape_string_quote(sock, ptr, valbuf, vallen, '\'');
+#else
+              ptr += mysql_real_escape_string(sock, ptr, valbuf, vallen);
+#endif
               *ptr++ = '\'';
             }
             else

openSUSE Build Service is sponsored by