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

Preliminary fix for ticket #2518. Make sure the VACUUM command

increments the change counter. (CVS 4163)

FossilOrigin-Name: 75263797e29af437290c09e85cd5fd2aea08694f
This commit is contained in:
drh
2007-07-19 16:35:17 +00:00
parent 21f06723fb
commit f85953edd0
4 changed files with 29 additions and 13 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.349 2007/06/26 22:10:12 drh Exp $
** @(#) $Id: pager.c,v 1.350 2007/07/19 16:35:17 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -3872,10 +3872,8 @@ static int pager_incr_changecounter(Pager *pPager){
rc = sqlite3PagerWrite(pPgHdr);
if( rc!=SQLITE_OK ) return rc;
/* Read the current value at byte 24. */
change_counter = retrieve32bits(pPgHdr, 24);
/* Increment the value just read and write it back to byte 24. */
change_counter = sqlite3Get4byte(pPager->dbFileVers);
change_counter++;
put32bits(((char*)PGHDR_TO_DATA(pPgHdr))+24, change_counter);
/* Release the page reference. */