summaryrefslogtreecommitdiff
path: root/dev-db/kdb/files/kdb-3.1.0-crashfix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/kdb/files/kdb-3.1.0-crashfix.patch')
-rw-r--r--dev-db/kdb/files/kdb-3.1.0-crashfix.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/dev-db/kdb/files/kdb-3.1.0-crashfix.patch b/dev-db/kdb/files/kdb-3.1.0-crashfix.patch
new file mode 100644
index 000000000000..dcc114d49915
--- /dev/null
+++ b/dev-db/kdb/files/kdb-3.1.0-crashfix.patch
@@ -0,0 +1,29 @@
+From 386375b6dd9841fdb24a56dcd637be38fcb4c175 Mon Sep 17 00:00:00 2001
+From: Jaroslaw Staniek <staniek@kde.org>
+Date: Tue, 27 Mar 2018 00:20:34 +0200
+Subject: Fix crash in KDbConnection::recordCount(KDbTableSchema)
+
+FIXED-IN:3.1.1
+---
+ src/KDbConnection.cpp | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/KDbConnection.cpp b/src/KDbConnection.cpp
+index e53bb33..d416d12 100644
+--- a/src/KDbConnection.cpp
++++ b/src/KDbConnection.cpp
+@@ -3420,10 +3420,8 @@ int KDbConnection::recordCount(const KDbTableSchema& tableSchema)
+ {
+ //! @todo does not work with non-SQL data sources
+ int count = -1; // will be changed only on success of querySingleNumber()
+- const tristate result
+- = querySingleNumber(KDbEscapedString("SELECT COUNT(*) FROM ")
+- + tableSchema.connection()->escapeIdentifier(tableSchema.name()),
+- &count);
++ const tristate result = querySingleNumber(
++ KDbEscapedString("SELECT COUNT(*) FROM ") + escapeIdentifier(tableSchema.name()), &count);
+ if (~result) {
+ count = 0;
+ }
+--
+cgit v0.11.2