summaryrefslogtreecommitdiff
path: root/debian/patches/mariadb_library_end.diff
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 /debian/patches/mariadb_library_end.diff
parent9a8fe28c22580da8f59a67c962ea4c1dea98dbab (diff)
downloadqtbase-ceec90b616ab234c78d699dd9f8d369139f3e42a.tar.gz
Backport upstream patch to call mysql_library_end() only once.
Diffstat (limited to 'debian/patches/mariadb_library_end.diff')
-rw-r--r--debian/patches/mariadb_library_end.diff35
1 files changed, 35 insertions, 0 deletions
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