mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix a file corruption bug in CREATE INDEX in auto-vacuum databases. (CVS 2368)
FossilOrigin-Name: 64c4c717d35c8fce9b4be073196c507f6d471188
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.249 2005/02/26 17:31:27 drh Exp $
|
||||
** $Id: btree.c,v 1.250 2005/03/09 13:09:44 danielk1977 Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** For a detailed discussion of BTrees, refer to
|
||||
@@ -4699,6 +4699,11 @@ int sqlite3BtreeCreateTable(Btree *pBt, int *piTable, int flags){
|
||||
}
|
||||
assert( eType!=PTRMAP_ROOTPAGE );
|
||||
assert( eType!=PTRMAP_FREEPAGE );
|
||||
rc = sqlite3pager_write(pRoot->aData);
|
||||
if( rc!=SQLITE_OK ){
|
||||
releasePage(pRoot);
|
||||
return rc;
|
||||
}
|
||||
rc = relocatePage(pBt, pRoot, eType, iPtrPage, pgnoMove);
|
||||
releasePage(pRoot);
|
||||
if( rc!=SQLITE_OK ){
|
||||
|
Reference in New Issue
Block a user