Fix SQLite backend foreign key PRAGMAs
ClosedPublic

Authored by konradr on Feb 6 2019, 9:07 AM.

Details

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.

CCBUG: 402229

Diff Detail

Repository
R165 Akonadi
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
konradr created this revision.Feb 6 2019, 9:07 AM
Restricted Application added a project: KDE PIM. · View Herald TranscriptFeb 6 2019, 9:07 AM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
konradr requested review of this revision.Feb 6 2019, 9:07 AM

I notice it, because i use SQLite backend, LGTM to me +1

dvratil accepted this revision.Feb 6 2019, 10:19 AM

Ouch, many thanks for the fix. Do you have commit access? If so, please commit to Applications/18.12 branch, otherwise I can push it for you.

This revision is now accepted and ready to land.Feb 6 2019, 10:19 AM

No I haven't. I'm in Phabricator just because I was asked on bugzilla to put this patch here. So commit it on your own.

Please note that this patch doesn't resolve whole bug, so don't close it.

If that's the case, just adjust the summary to use CCBUG: instead of BUG:.

konradr retitled this revision from Fix SQLite backend foregin key PRAGMAs to Fix SQLite backend foreign key PRAGMAs.Feb 6 2019, 11:44 AM
konradr edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.