summaryrefslogtreecommitdiff
path: root/dev-db/kdb/files/kdb-3.1.0-crashfix.patch
blob: dcc114d49915f6c19937a67ce4841f039d806479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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