[82949] trunk/base/src/cregistry/registry.c
raimue at macports.org
raimue at macports.org
Mon Aug 22 08:25:10 PDT 2011
Revision: 82949
http://trac.macports.org/changeset/82949
Author: raimue at macports.org
Date: 2011-08-22 08:25:08 -0700 (Mon, 22 Aug 2011)
Log Message:
-----------
Enable extended status codes for sqlite3,
http://www.sqlite.org/capi3ref.html#SQLITE_BUSY_RECOVERY
This might help to get more useful error messages in some cases,
for example opening a corrupted database read-only as described at
http://lists.macosforge.org/pipermail/macports-users/2011-August/025281.html
Modified Paths:
--------------
trunk/base/src/cregistry/registry.c
Modified: trunk/base/src/cregistry/registry.c
===================================================================
--- trunk/base/src/cregistry/registry.c 2011-08-22 14:54:55 UTC (rev 82948)
+++ trunk/base/src/cregistry/registry.c 2011-08-22 15:25:08 UTC (rev 82949)
@@ -109,6 +109,9 @@
return 0;
}
if (sqlite3_open(NULL, ®->db) == SQLITE_OK) {
+ /* Enable extended status codes*/
+ sqlite3_extended_result_codes(®->db, 1);
+
if (init_db(reg->db, errPtr)) {
reg->status = reg_none;
*regPtr = reg;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110822/0cc3591e/attachment.html>
More information about the macports-changes
mailing list