summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-02-11 20:56:51 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-02-11 20:56:51 +0300
commit599b245ed0ab5679d693e6d6a09bfc0a2c300335 (patch)
tree222721bb006a7776f07b619301f988541921c7b2 /plugins/Dbx_sqlite/src
parent598ab008025d6cbb2709e81a33bd712c5268fdb2 (diff)
Sqlite: fix for improper old file records
Diffstat (limited to 'plugins/Dbx_sqlite/src')
-rw-r--r--plugins/Dbx_sqlite/src/dbintf.cpp7
1 files changed, 6 insertions, 1 deletions
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);