-C Cause\ssqlite3_exec()\sto\sreturn\sSQLITE_NOMEM\sif\sit\scannot\sallocate\smemory\sto\nhold\sthe\serror\smessage\sfor\ssome\sother\serror.\s(CVS\s6844)
-D 2009-07-03T19:18:43
+C Remove\sunused\scode\s(that\swas\scommented\sout)\sfrom\sprepare.c.\s\sRemove\san\nincorrect\sNEVER()\smacro.\s\sFix\sthe\scomment\son\sschemaIsValid()\sto\scorrectly\ndescribe\sits\sreturn\sbehavior.\s(CVS\s6845)
+D 2009-07-03T19:19:50
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/pcache.h 9b927ccc5a538e31b4c3bc7eec4f976db42a1324
F src/pcache1.c 97e7e8e6e34026fb43b47d08532b0c02e959c26c
F src/pragma.c 9eb44ac1d3dc1ac3ea4f444abe1a10ae8acaa16c
-F src/prepare.c 1f658bc796f2be51b898dc6cc913bca1911ca839
+F src/prepare.c 12e556fc9f72a6563db7099697f657d75d4bb91c
F src/printf.c 508a1c59433353552b6553cba175eaa7331f8fc1
F src/random.c 676b9d7ac820fe81e6fb2394ac8c10cff7f38628
F src/resolve.c 4a61d03e49b15440878096e6030863fc628828f0
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P 9e35bec9ef924ec44e87294a549238e0104bb27b
-R 341fe26eb0dd386449a0180ebccb8c6e
+P e9849292ab741f4c86203b2629dbe116f9b527c8
+R 587ce2327c9513e978edc633162d7539
U drh
-Z f0ad1e3c22a8b7adfeeb6fcc68876a62
+Z bd714fe85ba5b195da90521b32b83698
** interface, and routines that contribute to loading the database schema
** from disk.
**
-** $Id: prepare.c,v 1.127 2009/07/02 17:21:58 danielk1977 Exp $
+** $Id: prepare.c,v 1.128 2009/07/03 19:19:50 drh Exp $
*/
#include "sqliteInt.h"
/*
** Check schema cookies in all databases. If any cookie is out
-** of date, return 0. If all schema cookies are current, return 1.
+** of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies
+** make no changes to pParse->rc.
*/
static void schemaIsValid(Parse *pParse){
sqlite3 *db = pParse->db;
** will be closed immediately after reading the meta-value. */
if( !sqlite3BtreeIsInReadTrans(pBt) ){
rc = sqlite3BtreeBeginTrans(pBt, 0);
- if( NEVER(rc==SQLITE_NOMEM) || rc==SQLITE_IOERR_NOMEM ){
+ if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){
db->mallocFailed = 1;
}
if( rc!=SQLITE_OK ) return;
sqlite3BtreeCommit(pBt);
}
}
-
-#if 0
- curTemp = (BtCursor *)sqlite3Malloc(sqlite3BtreeCursorSize());
- if( curTemp ){
- assert( sqlite3_mutex_held(db->mutex) );
- for(iDb=0; allOk && iDb<db->nDb; iDb++){
- Btree *pBt;
- pBt = db->aDb[iDb].pBt;
- if( pBt==0 ) continue;
- memset(curTemp, 0, sqlite3BtreeCursorSize());
- rc = sqlite3BtreeCursor(pBt, MASTER_ROOT, 0, 0, curTemp);
- if( rc==SQLITE_OK ){
- rc = sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&cookie);
- if( ALWAYS(rc==SQLITE_OK)
- && cookie!=db->aDb[iDb].pSchema->schema_cookie ){
- allOk = 0;
- }
- sqlite3BtreeCloseCursor(curTemp);
- }
- if( NEVER(rc==SQLITE_NOMEM) || rc==SQLITE_IOERR_NOMEM ){
- db->mallocFailed = 1;
- }
- }
- sqlite3_free(curTemp);
- }else{
- allOk = 0;
- db->mallocFailed = 1;
- }
- return allOk;
-#endif
}
/*