-C Add\shyperlink\sanchors\sto\sthe\slockingv3.html\sdocument.\s(CVS\s3685)
-D 2007-03-13T16:33:43
+C Modify\sthe\sbehaviour\sof\swritable_schema\sto\signore\sschema\sparsing\serrors.\s(CVS\s3686)
+D 2007-03-14T15:37:04
F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/pager.c 680bf115aa1678a011ce046f2a1ef4cad45576cb
F src/pager.h 8881591ca23d1e5fd83c95fa8317245fbcf64227
F src/parse.y bcfe366c1fd61cfc40e5344eb69a31997a821af0
-F src/pragma.c 5091300911670ddaa552bfa12c45cbca1bb7e7d6
-F src/prepare.c 484389c6811415b8f23d259ac9c029613e1c72c3
+F src/pragma.c b52dcf2fbb46f3266f9d00b88054c684df3af2e7
+F src/prepare.c 4e075fe28591b7d4ffbf818fb88a7e19bbe98065
F src/printf.c aade23a789d7cc88b397ec0d33a0a01a33a7a9c1
F src/random.c 6119474a6f6917f708c1dee25b9a8e519a620e88
F src/select.c 4d68a0d7f98fb59bcedd0be69750e0445b05899c
F src/shell.c 3ae4654560e91220a95738a73d135d91d937cda1
F src/sqlite.h.in 6b7383baf76070214f6381f603328ca9b22a7fae
F src/sqlite3ext.h 011c75fd6459a61454514af07c7a4f1f5c767f27
-F src/sqliteInt.h 50ea4ff5df788c7ea66a9183ece84bb972a06014
+F src/sqliteInt.h 6e3ac7a1a8f51e24ce4784236aa957e9bd11217f
F src/table.c 6d0da66dde26ee75614ed8f584a1996467088d06
F src/tclsqlite.c cd2b3b86ab07c0e0779f6c6e71e72c6c7dc1e704
F src/test1.c b4ff8f82f84d2ccdf07a2db5acae7b47c12f60d7
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 48b2a40008a09881ed9da3548095495a3d4a6647
-R 71fd10c40372f71bc80b6c2d2832c818
-U drh
-Z c1407752a27a9f8ad9c30a93e200acaf
+P 3e66ea6f61abc0f95af3bb46ebc0e10b4dcd069b
+R 0b1c631304a4b999548c4f37d3474b4f
+U danielk1977
+Z ecfae2838ed01abd8679701901a6da11
-3e66ea6f61abc0f95af3bb46ebc0e10b4dcd069b
\ No newline at end of file
+a8d6d935fbe32a759a55c1ef90adda7fe534acc1
\ No newline at end of file
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
-** $Id: pragma.c,v 1.127 2007/01/27 02:24:56 drh Exp $
+** $Id: pragma.c,v 1.128 2007/03/14 15:37:04 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
{ "ignore_check_constraints", SQLITE_IgnoreChecks },
#endif
/* The following is VERY experimental */
- { "writable_schema", SQLITE_WriteSchema },
+ { "writable_schema", SQLITE_WriteSchema|SQLITE_RecoveryMode },
{ "omit_readlock", SQLITE_NoReadlock },
/* TODO: Maybe it shouldn't be possible to change the ReadUncommitted
** interface, and routines that contribute to loading the database schema
** from disk.
**
-** $Id: prepare.c,v 1.43 2007/01/09 14:01:13 drh Exp $
+** $Id: prepare.c,v 1.44 2007/03/14 15:37:04 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
rc = SQLITE_NOMEM;
sqlite3ResetInternalSchema(db, 0);
}
- if( rc==SQLITE_OK ){
+ if( rc==SQLITE_OK || (db->flags&SQLITE_RecoveryMode)){
+ /* Black magic: If the SQLITE_RecoveryMode flag is set, then consider
+ ** the schema loaded, even if errors occured. In this situation the
+ ** current sqlite3_prepare() operation will fail, but the following one
+ ** will attempt to compile the supplied statement against whatever subset
+ ** of the schema was loaded before the error occured. The primary
+ ** purpose of this is to allow access to the sqlite_master table
+ ** even when it's contents have been corrupted.
+ */
DbSetProperty(db, iDb, DB_SchemaLoaded);
- }else{
- sqlite3ResetInternalSchema(db, iDb);
+ rc = SQLITE_OK;
}
return rc;
}
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.541 2007/03/02 06:24:19 danielk1977 Exp $
+** @(#) $Id: sqliteInt.h,v 1.542 2007/03/14 15:37:04 danielk1977 Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
#define SQLITE_FullFSync 0x00010000 /* Use full fsync on the backend */
#define SQLITE_LoadExtension 0x00020000 /* Enable load_extension */
+#define SQLITE_RecoveryMode 0x00040000 /* Ignore schema errors */
+
/*
** Possible values for the sqlite.magic field.
** The numbers are obtained at random and have no special meaning, other