diff options
author | 2019-07-26 17:25:16 +0200 | |
---|---|---|
committer | 2019-07-26 18:43:38 +0200 | |
commit | ef72a86e4ea8465c58af50314f403a1602b3e086 (patch) | |
tree | 61445a075c7a11275a90f856cb533437eec4ec0a /kde-apps/akonadi/files | |
parent | dev-libs/pkcs11-helper: arm64 stable (diff) | |
download | gentoo-ef72a86e4ea8465c58af50314f403a1602b3e086.tar.gz gentoo-ef72a86e4ea8465c58af50314f403a1602b3e086.tar.bz2 gentoo-ef72a86e4ea8465c58af50314f403a1602b3e086.zip |
kde-apps/akonadi: Fix non-lowercase external QMYSQL dbs
Package-Manager: Portage-2.3.66, Repoman-2.3.16
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps/akonadi/files')
-rw-r--r-- | kde-apps/akonadi/files/akonadi-19.04.3-qmysql-fix.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/kde-apps/akonadi/files/akonadi-19.04.3-qmysql-fix.patch b/kde-apps/akonadi/files/akonadi-19.04.3-qmysql-fix.patch new file mode 100644 index 000000000000..c26d3d993b2b --- /dev/null +++ b/kde-apps/akonadi/files/akonadi-19.04.3-qmysql-fix.patch @@ -0,0 +1,44 @@ +From 8b8db29d10b2ef92deb2d87ff613f3d7f39af34e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvratil@kde.org> +Date: Fri, 26 Jul 2019 13:31:58 +0200 +Subject: Fix compatibility with QMYSQL driver after 74aed95 + +Summary: +QPSQL requires the table name passed to QSqlDatabase::record() to be lowercase +since Qt 5.13, but doing that breaks QMYSQL, so only adjust the name when +using QPSQL. + +CCBUG: 409234 + +Reviewers: #kde_pim, vkrause + +Reviewed By: #kde_pim, vkrause + +Subscribers: kde-pim + +Tags: #kde_pim + +Differential Revision: https://phabricator.kde.org/D22677 +--- + src/server/storage/dbintrospector.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/server/storage/dbintrospector.cpp b/src/server/storage/dbintrospector.cpp +index 70d952a..932444c 100644 +--- a/src/server/storage/dbintrospector.cpp ++++ b/src/server/storage/dbintrospector.cpp +@@ -76,7 +76,10 @@ bool DbIntrospector::hasColumn(const QString &tableName, const QString &columnNa + QStringList columns = m_columnCache.value(tableName); + + if (columns.isEmpty()) { +- const QSqlRecord table = m_database.record(tableName.toLower()); ++ // QPSQL requires the name to be lower case, but it breaks compatibility with existing ++ // tables with other drivers (see BKO#409234). Yay for abstraction... ++ const auto name = (DbType::type(m_database) == DbType::PostgreSQL) ? tableName.toLower() : tableName; ++ const QSqlRecord table = m_database.record(name); + const int numTables = table.count(); + columns.reserve(numTables); + for (int i = 0; i < numTables; ++i) { +-- +cgit v1.1 + |