3.5.2 from the ZIP file, Compiled under Visual Studio 2005. Static Library SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_AUTOVACUUM SQLITE_OMIT_BLOB_LITERAL SQLITE_OMIT_DATETIME_FUNCS _CRT_SECURE_NO_DEPRECATE SQLITE_MEMORY_SIZE=1000000 SQLITE_CORE
A couple weeks ago I reported a crash when I used the SQLITE_MEMORY_SIZE=1000000 compile time setting. I've now gotten a chance to look at it further. The reply on the list was it's working fine. I have several small DB's that I vacuum during startup. In most cases the vacuum works perfectly OK with this setting and there are no crashes. There is one DB though that, during the vacuum, It gets to here int sqlite3BtreeRollbackStmt(Btree *p){ int rc = SQLITE_OK; BtShared *pBt = p->pBt; sqlite3BtreeEnter(p); if( pBt->inStmt && !pBt->readOnly ){ rc = sqlite3PagerStmtRollback(pBt->pPager); assert( countWriteCursors(pBt)==0 ); pBt->inStmt = 0; } sqlite3BtreeLeave(p); return rc; } If I look at the pPager, I see fd.methods is NULL but, jfd.methods and stfd.methods aren't NULL. ** Ticket #1171: The statement journal might contain page content that is ** different from the page content at the start of the transaction. ** This occurs when a page is changed prior to the start of a statement ** then changed again within the statement. When rolling back such a ** statement we must not write to the original database unless we know ** for certain that original page contents are synced into the main rollback ** journal. Otherwise, a power loss might leave modified data in the ** database file without an entry in the rollback journal that can ** restore the database to its original form. Two conditions must be ** met before writing to the database files. (1) the database must be ** locked. (2) we know that the original page content is fully synced ** in the main journal either because the page is not in cache or else ** the page is marked as needSync==0. */ pPg = pager_lookup(pPager, pgno); PAGERTRACE4("PLAYBACK %d page %d hash(%08x)\n", PAGERID(pPager), pgno, pager_datahash(pPager->pageSize, aData)); if( pPager->state>=PAGER_EXCLUSIVE && (pPg==0 || pPg->needSync==0) ){ i64 offset = (pgno-1)*(i64)pPager->pageSize; rc = sqlite3OsWrite(pPager->fd, aData, pPager->pageSize, offset); if( pPg ){ makeClean(pPg); } } Here it attempts to write to the OS using pPager->fd and since fd.methods is null, there's a crash. I don't know the connection between the memory setting and the crash. The other DB's don't rollback during the vacuum which probably explains why they don't crash. I'm going to make a backup copy of the DB and then try to manually vacuum the file and see if the crashing goes away. I'm sitting in a hotel so, my connectivity is spotty. Sorry if any replies to the list are delayed till Saturday evening. C ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------