summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2017-09-27 23:55:26 +0300
committerDmitry Shachnev <mitya57@gmail.com>2017-09-27 23:55:26 +0300
commitceec90b616ab234c78d699dd9f8d369139f3e42a (patch)
tree32db3bda3626326dfff097ae0a798b5be8994df7
parent9a8fe28c22580da8f59a67c962ea4c1dea98dbab (diff)
downloadqtbase-ceec90b616ab234c78d699dd9f8d369139f3e42a.tar.gz
Backport upstream patch to call mysql_library_end() only once.
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/mariadb_library_end.diff35
-rw-r--r--debian/patches/series1
3 files changed, 38 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 798d6fa..21ad050 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ qtbase-opensource-src (5.9.1+dfsg-11) UNRELEASED; urgency=medium
[ Dmitry Shachnev ]
* Backport upstream patch to fix crash in qglx_findConfig() function
(qglxconvenience_nullptr.diff, closes: #841951).
+ * Backport upstream patch to call mysql_library_end() only once when
+ using MariaDB (mariadb_library_end.diff).
-- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Wed, 27 Sep 2017 23:45:09 +0300
diff --git a/debian/patches/mariadb_library_end.diff b/debian/patches/mariadb_library_end.diff
new file mode 100644
index 0000000..2c77d69
--- /dev/null
+++ b/debian/patches/mariadb_library_end.diff
@@ -0,0 +1,35 @@
+Description: call mysql_library_end() only once when using MariaDB
+Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=d25346417238b7dc
+Last-Update: 2017-09-27
+
+--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
++++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+@@ -1158,16 +1158,22 @@
+ }
+ # endif // MYSQL_VERSION_ID
+ #endif // Q_NO_MYSQL_EMBEDDED
++
++#ifdef MARIADB_BASE_VERSION
++ qAddPostRoutine(mysql_server_end);
++#endif
+ }
+
+ static void qLibraryEnd()
+ {
+-#ifndef Q_NO_MYSQL_EMBEDDED
+-# if MYSQL_VERSION_ID > 40000
+-# if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003
+- mysql_library_end();
+-# else
+- mysql_server_end();
++#if !defined(MARIADB_BASE_VERSION)
++# if !defined(Q_NO_MYSQL_EMBEDDED)
++# if MYSQL_VERSION_ID > 40000
++# if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003
++ mysql_library_end();
++# else
++ mysql_server_end();
++# endif
+ # endif
+ # endif
+ #endif
diff --git a/debian/patches/series b/debian/patches/series
index b24bc33..10c00e2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,7 @@
# Backported from upstream.
fix_atspi_condition.diff
qglxconvenience_nullptr.diff
+mariadb_library_end.diff
# Debian specific.
gnukfreebsd.diff