Summary: | Sqlite backend error with schema update 36 & 37 (5.10.0) | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Maël Kerbiriou <piezo.wdimd> |
Component: | server | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | REPORTED --- | ||
Severity: | major | CC: | asturm, elbin.p, hannibal, reuben_p, stupor_scurvy343 |
Priority: | NOR | ||
Version: | GIT (master) | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
sqlite_master.sql akonadiserver.err* fix_PartTable.sql akonadiserverrc
Patch witch PRAGMA changes suggested by Maël |
Description
Maël Kerbiriou
2018-12-17 08:42:00 UTC
This change in the code make it working for me: s/PRAGMA foreign_key_check=OFF/PRAGMA defer_foreign_keys=ON/ s/PRAGMA foreign_key_check=ON/PRAGMA defer_foreign_keys=OFF/ I have same problem in Slackware-current with alien KDE5/Plasma packages. @Maël: Are this PRAGMA changes are possible in compiled akonadi? Created attachment 117837 [details]
Patch witch PRAGMA changes suggested by Maël
I've attached patch with PRAGMA changes suggested by Maël. "PRAGMA foreign_key_check=OFF" is definitely wrong syntax according SQLite documentation. I have no idea if "PRAGMA defer_foreign_keys=ON" is a correct replacement, but as Maël wrote, it works.
Please submit your patch using phabricator.kde.org. You can find information here: https://community.kde.org/Infrastructure/Phabricator Git commit 42d6c38c4dc619f23ca00ad42d9c538fc9ca2f78 by Daniel Vrátil, on behalf of Konrad Rzepecki. Committed on 06/02/2019 at 17:14. Pushed by dvratil into branch 'Applications/18.12'. Fix SQLite backend foreign key PRAGMAs Summary: SQLite backend contain "PRAGMA foreign_key_check=OFF/ON" which ins't correct SQLite syntax. Author intention was probably disengage key checking. In SQLlite this can be achieved be temporary deffer key check. Correct syntax is in this case "PRAGMA defer_foreign_keys=ON/OFF". This partial resolves bug 402229. Reviewers: dvratil Reviewed By: dvratil Subscribers: lbeltrame, anthonyfieroni, kde-pim Tags: #kde_pim Differential Revision: https://phabricator.kde.org/D18781 M +46 -46 autotests/server/dbtest_data/dbinit_sqlite M +50 -50 autotests/server/dbtest_data/dbinit_sqlite_incremental M +2 -2 src/server/storage/dbinitializer_p.cpp https://commits.kde.org/akonadi/42d6c38c4dc619f23ca00ad42d9c538fc9ca2f78 |