From 9762839b783257d787090050a98e455bc5a83965 Mon Sep 17 00:00:00 2001 From: tux3 Date: Sat, 19 Dec 2015 04:40:31 +0100 Subject: [PATCH] Fix batches bigger than limit on import --- src/persistence/history.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/persistence/history.cpp b/src/persistence/history.cpp index 0e9ac9ec3..f61ee86ab 100644 --- a/src/persistence/history.cpp +++ b/src/persistence/history.cpp @@ -219,7 +219,7 @@ void History::import(const HistoryKeeper &oldHistory) for (const HistoryKeeper::HistMessage& msg : oldMessages) { queries += generateNewMessageQueries(msg.chat, msg.message, msg.sender, msg.timestamp, true, msg.dispName); - if (queries.size() == batchSize) + if (queries.size() >= batchSize) { db.execLater(queries); queries.clear();