Since I love to debug code and I needed a distraction.... Problem was introduced on 2009-06-05 update Several SQLITE_CORRUPT_BKPT were inserted (so this corruption may have been going for a while). And here's where the corruption is returned: iPage = get4byte(&aData[8+closest*4]); printf("iPage=%p aData=%p\n",iPage,aData); if( iPage>mxPage ){ printf("X7 iPage=%p, closest=%d ",iPage,closest); rc = SQLITE_CORRUPT_BKPT; goto end_allocate_page; }
./sqlite3 test.db <log.txt delete X7 iPage=0x1200000, closest=0 SQL error near line 297: database disk image is malformed X7 iPage=0x1200000, closest=0 SQL error near line 301: database disk image is malformed X7 iPage=0x1200000, closest=0 SQL error near line 303: database disk image is malformed X7 iPage=0x2ba01e1, closest=0 SQL error near line 305: database disk image is malformed With the added printout of iPage it suddenly changes values.... iPage=0x2136 aData=0x5a04458 iPage=0x1c9c aData=0x5989ac8 iPage=0x1f6e aData=0x5c1c5e8 iPage=0x2136 aData=0x5a04458 iPage=0x1200000 aData=0x5a80508 X7 iPage=0x1200000, closest=0 SQL error near line 297: database disk image is malformed The aData where it bombs here is the first time this address has shown up. Michael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems ________________________________ From: sqlite-users-boun...@sqlite.org on behalf of Richard Hipp Sent: Mon 8/23/2010 8:57 AM To: General Discussion of SQLite Database; sqlite-annou...@sqlite.org Subject: EXTERNAL:[sqlite] Possible database corruption bug in SQLite A user has provided us with a script that appears to result in SQLite database corruption. The problem has existed in all versions of SQLite going back to 3.6.16 in June of 2009. A bisect shows that the problem was injected on 2009-06-17. The problem appears to be associated with incremental vacuum. We are still working to characterize the problem more precisely. The discovery of this bug so close to the release of version 3.7.1 is a coincidence. Nevertheless, we will likely be issuing version 3.7.2 within a few days in order to fix the problem. So if you are thinking of upgrading to 3.7.1, you might want to hold back for a day or two to see what our investigation of this new problem turns up. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users