1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Modifications to the VDBE to support more than one database file. (CVS 878)

FossilOrigin-Name: 875da9eed981bfa27b98e95025f9fdbed74b4098
This commit is contained in:
drh
2003-03-19 03:14:00 +00:00
parent 9468c7f489
commit 001bbcbb8f
19 changed files with 451 additions and 266 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.78 2003/02/16 19:13:37 drh Exp $
** @(#) $Id: pager.c,v 1.79 2003/03/19 03:14:02 drh Exp $
*/
#include "os.h" /* Must be first to enable large file support */
#include "sqliteInt.h"
@@ -1722,6 +1722,25 @@ int sqlitepager_iswriteable(void *pData){
return pPg->dirty;
}
/*
** Replace the content of a single page with the information in the third
** argument.
*/
int sqlitepager_overwrite(Pager *pPager, Pgno pgno, void *pData){
void *pPage;
int rc;
rc = sqlitepager_get(pPager, pgno, &pPage);
if( rc==SQLITE_OK ){
rc = sqlitepager_write(pPage);
if( rc==SQLITE_OK ){
memcpy(pPage, pData, SQLITE_PAGE_SIZE);
}
sqlitepager_unref(pPage);
}
return rc;
}
/*
** A call to this routine tells the pager that it is not necessary to
** write the information on page "pgno" back to the disk, even though