Merge lp:~aauzi/midori/fix-1197518 into lp:midori

Proposed by André Auzi
Status: Merged
Approved by: Cris Dywan
Approved revision: 6245
Merged at revision: 6249
Proposed branch: lp:~aauzi/midori/fix-1197518
Merge into: lp:midori
Diff against target: 20 lines (+10/-0)
1 file modified
midori/midori-bookmarks.c (+10/-0)
To merge this branch: bzr merge lp:~aauzi/midori/fix-1197518
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Review via email: mp+172885@code.launchpad.net

Commit message

Set FOREIGN_KEYS pragma on db initialization

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

As per me understanding, without this pragma foreign keys may be skipped depending on the sqlite3 build and the pragma also enables stricter error handling.

So this seems the right thing to do.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'midori/midori-bookmarks.c'
--- midori/midori-bookmarks.c 2013-06-13 16:53:19 +0000
+++ midori/midori-bookmarks.c 2013-07-03 19:48:25 +0000
@@ -250,6 +250,16 @@
250250
251 if (newfile_did_exist)251 if (newfile_did_exist)
252 {252 {
253 const gchar* setup_stmt = "PRAGMA foreign_keys = ON;";
254 /* initial setup */
255 if (sqlite3_exec (db, setup_stmt, NULL, NULL, &sql_errmsg) != SQLITE_OK)
256 {
257 *errmsg = g_strdup_printf (_("Couldn't setup bookmarks: %s\n"),
258 sql_errmsg ? sql_errmsg : "(err = NULL)");
259 sqlite3_free (sql_errmsg);
260 goto init_failed;
261 }
262
253 /* we are done */263 /* we are done */
254 goto init_success;264 goto init_success;
255 }265 }

Subscribers

People subscribed via source and target branches

to all changes: