summaryrefslogtreecommitdiffstats
path: root/kde
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2017-09-17 22:13:09 +0200
committer Eric Hameleers <alien@slackware.com>2017-09-17 22:13:09 +0200
commit8e36fc0421507c3a60b64a04e754ef2b51cf7d29 (patch)
tree8b4e88dc38647a42309d97d04a4ad0f45c9287e1 /kde
parent6f1fae6fa57584669ac297402f28d7a1e3203605 (diff)
downloadktown-8e36fc0421507c3a60b64a04e754ef2b51cf7d29.tar.gz
ktown-8e36fc0421507c3a60b64a04e754ef2b51cf7d29.tar.xz
Bugfixes to KDE 5_17.09: akonadi
akonadi: re-patched to make it work with mariadb 10.2.8 This time, I used the official patch (written by our own pprkut) which was applied to the akonadi git repository today and which will be part of the next akonadi release (17.08.2).
Diffstat (limited to 'kde')
-rw-r--r--kde/build/akonadi2
-rw-r--r--kde/patch/akonadi/akonadi_mariadb_qtsql.patch90
2 files changed, 83 insertions, 9 deletions
diff --git a/kde/build/akonadi b/kde/build/akonadi
index 0cfbf08..00750ed 100644
--- a/kde/build/akonadi
+++ b/kde/build/akonadi
@@ -1 +1 @@
-2
+3
diff --git a/kde/patch/akonadi/akonadi_mariadb_qtsql.patch b/kde/patch/akonadi/akonadi_mariadb_qtsql.patch
index 67516c1..7ec6d7c 100644
--- a/kde/patch/akonadi/akonadi_mariadb_qtsql.patch
+++ b/kde/patch/akonadi/akonadi_mariadb_qtsql.patch
@@ -1,17 +1,91 @@
-Patch taken from https://bugs.gentoo.org/626464
-This is a temporary fix. The real bug is in qtsql and needs to be fixed there.
+Patch taken from https://cgit.kde.org/akonadi.git/patch/?id=b145f47f000978b9d39edc1882849ec7f6b3ef79
-Downstream bug reports:
+Upstream bug reports:
https://bugs.kde.org/show_bug.cgi?id=383991
https://bugreports.qt.io/browse/QTBUG-63108
---- akonadi-17.04.3/src/server/storage/dbconfigmysql.cpp 2017-08-11 23:29:02.088613966 +0800
-+++ akonadi-17.04.3/src/server/storage/dbconfigmysql.cpp 2017-08-11 23:22:18.808432643 +0800
-@@ -492,7 +492,7 @@
+From b145f47f000978b9d39edc1882849ec7f6b3ef79 Mon Sep 17 00:00:00 2001
+From: Heinz Wiesinger <pprkut@liwjatan.at>
+Date: Sun, 17 Sep 2017 10:56:44 +0200
+Subject: Only remove init connections to the database on server shutdown.
+
+Summary:
+With MariaDB 10.2 libmysqlclient was replaced with libmariadb that
+changed how establishing database connections behaves. The MySQL
+QSQL driver calls mysql_server_end() on QSqlDatabase::removeDatabase()
+if the overall connection count dropped to 0 (which it does when
+the init connection is removed).
+A future QSqlDatabase:addDatabase() would call mysql_server_init()
+again, but this no longer works with libmariadb as that one only
+allows calling mysql_server_init() once. Future calls are simply
+ignored.
+
+In order to prevent this from happening we have to keep the
+init connection open until the server shuts down, so the connection
+count only drops to 0 at shutdown and mysql_server_end() isn't
+called before.
+
+This is a workaround for QTBUG-63108
+
+CCBUG: 383991
+
+Reviewers: dvratil, mlaurent
+
+Reviewed By: dvratil
+
+Subscribers: #kde_pim
+
+Tags: #kde_pim
+
+Differential Revision: https://phabricator.kde.org/D7858
+---
+ src/server/akonadi.cpp | 3 ++-
+ src/server/storage/dbconfigmysql.cpp | 4 +++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/server/akonadi.cpp b/src/server/akonadi.cpp
+index 4364e63..bcb7e88 100644
+--- a/src/server/akonadi.cpp
++++ b/src/server/akonadi.cpp
+@@ -423,13 +423,14 @@ bool AkonadiServer::createDatabase()
+ success = false;
}
}
-
- QSqlDatabase::removeDatabase(initCon);
-+ //QSqlDatabase::removeDatabase(initCon);
return success;
}
+
+ void AkonadiServer::stopDatabaseProcess()
+ {
+ if (!DbConfig::configuredDatabase()->useInternalServer()) {
++ // closing initConnection this late to work around QTBUG-63108
++ QSqlDatabase::removeDatabase(QStringLiteral("initConnection"));
+ return;
+ }
+
+diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
+index 2bd231d..d565706 100644
+--- a/src/server/storage/dbconfigmysql.cpp
++++ b/src/server/storage/dbconfigmysql.cpp
+@@ -492,7 +492,6 @@ bool DbConfigMysql::startInternalServer()
+ }
+ }
+
+- QSqlDatabase::removeDatabase(initCon);
+ return success;
+ }
+
+@@ -520,6 +519,9 @@ void DbConfigMysql::stopInternalServer()
+ return;
+ }
+
++ // closing initConnection this late to work around QTBUG-63108
++ QSqlDatabase::removeDatabase(QStringLiteral("initConnection"));
++
+ disconnect(mDatabaseProcess, static_cast<void(QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
+ this, &DbConfigMysql::processFinished);
+
+--
+cgit v0.11.2
+
+