Compare commits
No commits in common. "c9s" and "c9-beta" have entirely different histories.
@ -1 +0,0 @@
|
|||||||
1
|
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
|||||||
/*.rpm
|
SOURCES/DBD-MariaDB-1.21.tar.gz
|
||||||
/*.tar.gz
|
|
||||||
|
1
.perl-DBD-MariaDB.metadata
Normal file
1
.perl-DBD-MariaDB.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
fe2b6703d1340d82d219b056bf9a6feadf8904bd SOURCES/DBD-MariaDB-1.21.tar.gz
|
@ -1,83 +0,0 @@
|
|||||||
From 9743bec52db5e8f1beb2b31e4a55d6ea1a4edcdd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pali <pali@cpan.org>
|
|
||||||
Date: Fri, 8 Apr 2022 21:36:47 +0200
|
|
||||||
Subject: [PATCH] Fix mysql_get_client_version() function
|
|
||||||
|
|
||||||
MariaDB Connector/C 3.1.10 changed API of mysql_get_client_version()
|
|
||||||
function. Before that release it returned client version. With that release
|
|
||||||
it started returning Connector/C package version.
|
|
||||||
|
|
||||||
So when compiling with MariaDB Connector/C client library, redefine
|
|
||||||
mysql_get_client_version() to always returns client version via function
|
|
||||||
mariadb_get_infov(MARIADB_CLIENT_VERSION_ID) call.
|
|
||||||
|
|
||||||
Driver code expects for a long time that mysql_get_client_version() call
|
|
||||||
returns client version and not something different.
|
|
||||||
|
|
||||||
Function mariadb_get_infov() is supported since MariaDB Connector/C 3.0+.
|
|
||||||
|
|
||||||
Fixes: https://github.com/perl5-dbi/DBD-mysql/issues/333
|
|
||||||
---
|
|
||||||
Makefile.PL | 8 +++++++-
|
|
||||||
dbdimp.h | 26 ++++++++++++++++++++++++++
|
|
||||||
2 files changed, 33 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile.PL b/Makefile.PL
|
|
||||||
index b9b046c..f28a8df 100644
|
|
||||||
--- a/Makefile.PL
|
|
||||||
+++ b/Makefile.PL
|
|
||||||
@@ -757,7 +757,13 @@ sub Configure {
|
|
||||||
# https://jira.mariadb.org/browse/MDEV-16478
|
|
||||||
$function .= "\n#if defined(MARIADB_BASE_VERSION) || defined(MARIADB_PACKAGE_VERSION)\nif (mysql_get_client_version() >= 100301 && mysql_get_client_version() < 100308) return 1;\n#endif\n";
|
|
||||||
}
|
|
||||||
- $function .= 'return (mysql_get_client_version() == MYSQL_VERSION_ID) ? 0 : 1;';
|
|
||||||
+ # MariaDB Connector/C 3.1.10+ has broken mysql_get_client_version() function, so use mariadb_get_infov(MARIADB_CLIENT_VERSION_ID) instead
|
|
||||||
+ $function .= "size_t version;\n";
|
|
||||||
+ $function .= "#if defined(MARIADB_PACKAGE_VERSION) && defined(MARIADB_PACKAGE_VERSION_ID) && MARIADB_PACKAGE_VERSION_ID >= 30000\n";
|
|
||||||
+ $function .= "if (mariadb_get_infov((void *)0, MARIADB_CLIENT_VERSION_ID, &version) != 0)\n";
|
|
||||||
+ $function .= "#endif\n";
|
|
||||||
+ $function .= "version = mysql_get_client_version();\n";
|
|
||||||
+ $function .= 'return (version == MYSQL_VERSION_ID) ? 0 : 1;';
|
|
||||||
# libmysqld is built using g++ rather than gcc and sometimes
|
|
||||||
# we have to use libstdc++ to resolve linking problems
|
|
||||||
foreach my $add_ldflags (undef, '-lstdc++') {
|
|
||||||
diff --git a/dbdimp.h b/dbdimp.h
|
|
||||||
index 41cc72a..aee608f 100644
|
|
||||||
--- a/dbdimp.h
|
|
||||||
+++ b/dbdimp.h
|
|
||||||
@@ -322,6 +322,32 @@ PERL_STATIC_INLINE UV SvUV_nomg(pTHX_ SV *sv)
|
|
||||||
#define my_bool bool
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * MariaDB Connector/C 3.1.10 changed API of mysql_get_client_version()
|
|
||||||
+ * function. Before that release it returned client version. With that release
|
|
||||||
+ * it started returning Connector/C package version.
|
|
||||||
+ *
|
|
||||||
+ * So when compiling with MariaDB Connector/C client library, redefine
|
|
||||||
+ * mysql_get_client_version() to always returns client version via function
|
|
||||||
+ * mariadb_get_infov(MARIADB_CLIENT_VERSION_ID) call.
|
|
||||||
+ *
|
|
||||||
+ * Driver code expects for a long time that mysql_get_client_version() call
|
|
||||||
+ * returns client version and not something different.
|
|
||||||
+ *
|
|
||||||
+ * Function mariadb_get_infov() is supported since MariaDB Connector/C 3.0+.
|
|
||||||
+ */
|
|
||||||
+#if defined(MARIADB_PACKAGE_VERSION) && defined(MARIADB_PACKAGE_VERSION_ID) && MARIADB_PACKAGE_VERSION_ID >= 30000
|
|
||||||
+PERL_STATIC_INLINE unsigned long mariadb_get_client_version(void)
|
|
||||||
+{
|
|
||||||
+ /* MARIADB_CLIENT_VERSION_ID really expects size_t type, documentation is wrong and says unsigned int. */
|
|
||||||
+ size_t version;
|
|
||||||
+ if (mariadb_get_infov(NULL, MARIADB_CLIENT_VERSION_ID, &version) != 0)
|
|
||||||
+ version = mysql_get_client_version(); /* On error fallback to mysql_get_client_version() */
|
|
||||||
+ return version;
|
|
||||||
+}
|
|
||||||
+#define mysql_get_client_version() mariadb_get_client_version()
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/* MYSQL_SECURE_AUTH became a no-op from MySQL 5.7.5 and is removed from MySQL 8.0.3 */
|
|
||||||
#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID <= 50704
|
|
||||||
#define HAVE_SECURE_AUTH
|
|
||||||
--
|
|
||||||
2.49.0
|
|
||||||
|
|
@ -7,12 +7,9 @@
|
|||||||
%bcond_without perl_DBD_MariaDB_enables_net_ssleay_test
|
%bcond_without perl_DBD_MariaDB_enables_net_ssleay_test
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# mariadb is not built for %%{ix86}
|
|
||||||
ExcludeArch: %{ix86}
|
|
||||||
|
|
||||||
Name: perl-DBD-MariaDB
|
Name: perl-DBD-MariaDB
|
||||||
Version: 1.21
|
Version: 1.21
|
||||||
Release: 17%{?dist}
|
Release: 16%{?dist}
|
||||||
Summary: MariaDB and MySQL driver for the Perl5 Database Interface (DBI)
|
Summary: MariaDB and MySQL driver for the Perl5 Database Interface (DBI)
|
||||||
License: GPL+ or Artistic
|
License: GPL+ or Artistic
|
||||||
URL: https://metacpan.org/release/DBD-MariaDB/
|
URL: https://metacpan.org/release/DBD-MariaDB/
|
||||||
@ -24,9 +21,6 @@ Patch0: DBD-MariaDB-1.21-Run-test-setup-and-clean.patch
|
|||||||
# Fix test for changed value of mariadb_clientversion
|
# Fix test for changed value of mariadb_clientversion
|
||||||
# mariadb-connector-c 3.2.x version number changed mariadb_clientversion to 3020x
|
# mariadb-connector-c 3.2.x version number changed mariadb_clientversion to 3020x
|
||||||
Patch1: DBD-MariaDB-fix-mariadb-connector-c-32x-test.patch
|
Patch1: DBD-MariaDB-fix-mariadb-connector-c-32x-test.patch
|
||||||
# Fix mysql_get_client_version() function for MariaDB Connector/C 3.1.10
|
|
||||||
# and higher, in upstream since 1.22
|
|
||||||
Patch2: DBD-MariaDB-1.21-Fix-mysql_get_client_version-function.patch
|
|
||||||
BuildRequires: findutils
|
BuildRequires: findutils
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
@ -114,9 +108,8 @@ with "%{_libexecdir}/%{name}/test".
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n DBD-MariaDB-%{version}
|
%setup -q -n DBD-MariaDB-%{version}
|
||||||
%patch -P0 -p1
|
%patch0 -p1
|
||||||
%patch -P1 -p1
|
%patch1 -p1
|
||||||
%patch -P2 -p1
|
|
||||||
cp %{SOURCE1} %{SOURCE2} t/
|
cp %{SOURCE1} %{SOURCE2} t/
|
||||||
|
|
||||||
# Help file to recognise the Perl scripts and normalize shebangs
|
# Help file to recognise the Perl scripts and normalize shebangs
|
||||||
@ -181,9 +174,6 @@ make test %{?with_perl_DBD_MariaDB_enables_leak_test:EXTENDED_TESTING=1}
|
|||||||
%{_libexecdir}/%{name}
|
%{_libexecdir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Apr 02 2025 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-17
|
|
||||||
- Resolves: RHEL-85011
|
|
||||||
|
|
||||||
* Thu Feb 17 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-16
|
* Thu Feb 17 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1.21-16
|
||||||
- Fix test for mariadb-connector-c 3.2.x
|
- Fix test for mariadb-connector-c 3.2.x
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-9
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
|
@ -1,5 +0,0 @@
|
|||||||
summary: Sanity tests
|
|
||||||
discover:
|
|
||||||
how: fmf
|
|
||||||
execute:
|
|
||||||
how: tmt
|
|
1
sources
1
sources
@ -1 +0,0 @@
|
|||||||
SHA512 (DBD-MariaDB-1.21.tar.gz) = 0378b33e9cd31ced6f2331967c7ea63a233340bb4a60ef2bbece4843b3a62624875aa1a5e61a9fa1b709ecc8d67810c6fa4fb9ccc01df341e6d94325078f360a
|
|
@ -1,4 +0,0 @@
|
|||||||
summary: Upstream tests
|
|
||||||
component: perl-DBD-MariaDB
|
|
||||||
require: perl-DBD-MariaDB-tests
|
|
||||||
test: /usr/libexec/perl-DBD-MariaDB/test
|
|
Loading…
Reference in New Issue
Block a user