From 599b245ed0ab5679d693e6d6a09bfc0a2c300335 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 11 Feb 2025 20:56:51 +0300 Subject: Sqlite: fix for improper old file records --- plugins/Dbx_sqlite/src/dbintf.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/Dbx_sqlite/src') diff --git a/plugins/Dbx_sqlite/src/dbintf.cpp b/plugins/Dbx_sqlite/src/dbintf.cpp index 048fab793c..6d557f3dce 100644 --- a/plugins/Dbx_sqlite/src/dbintf.cpp +++ b/plugins/Dbx_sqlite/src/dbintf.cpp @@ -29,7 +29,7 @@ CDbxSQLite::~CDbxSQLite() ///////////////////////////////////////////////////////////////////////////////////////// -#define CURRVER 8 +#define CURRVER 9 int CDbxSQLite::Create() { @@ -211,6 +211,11 @@ void CDbxSQLite::CheckConversion() logError(rc, __FILE__, __LINE__); } + if (dbv.bVal < 9) { + int rc = sqlite3_exec(m_db, "DELETE FROM events WHERE length(data) > 1000000 AND type=1002;", 0, 0, 0); + logError(rc, __FILE__, __LINE__); + } + dbv.bVal = CURRVER; WriteContactSetting(0, "Compatibility", "Sqlite", &dbv); -- cgit v1.2.3