From a25165fa6852e71b3346e6d9457a50bd8332e0e8 Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 4 Dec 2014 04:50:59 +0000 Subject: [PATCH] Add an implementation mark and fix a comment describing the OP_Checkpoint opcode. FossilOrigin-Name: 7475b90c558157802b036162376fceacc1b9ab4a --- manifest | 14 +++++++------- manifest.uuid | 2 +- src/vdbe.c | 4 ++-- src/wal.c | 6 ++++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/manifest b/manifest index d4db2a78e1..07b9de4c3d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sevidence\smarks\sand\sassert()s\sused\sas\sevidence\sfor\scheckpoint\srequirements. -D 2014-12-03T19:25:41.425 +C Add\san\simplementation\smark\sand\sfix\sa\scomment\sdescribing\sthe\sOP_Checkpoint\nopcode. +D 2014-12-04T04:50:59.682 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in a226317fdf3f4c895fb3cfedc355b4d0868ce1fb F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -291,7 +291,7 @@ F src/update.c 3c4ecc282accf12d39edb8d524cf089645e55a13 F src/utf.c fc6b889ba0779b7722634cdeaa25f1930d93820c F src/util.c 3b627daa45c7308c1e36e3dbaa3f9ce7e5c7fa73 F src/vacuum.c 9b30ec729337dd012ed88d4c292922c8ef9cf00c -F src/vdbe.c 60217f3b8ab984b2e2bb9e3965276dd29e5efe5d +F src/vdbe.c 1a9e671c9cfc259e4d2affc71f7df4a4c00a842c F src/vdbe.h 6fc69d9c5e146302c56e163cb4b31d1ee64a18c3 F src/vdbeInt.h 9bb69ff2447c34b6ccc58b34ec35b615f86ead78 F src/vdbeapi.c 07acb615d1e4170e71fc1b0d087f3c53a1ad8e83 @@ -301,7 +301,7 @@ F src/vdbemem.c 31d8eabb0cd78bfeab4e5124c7363c3e9e54db9f F src/vdbesort.c 42c166f7ca78cb643c7f4e4bdfa83c59d363d1a6 F src/vdbetrace.c 7e4222955e07dd707a2f360c0eb73452be1cb010 F src/vtab.c c08ec66f45919eaa726bf88aa53eb08379d607f9 -F src/wal.c fc62ec9dc7dfa08dbe08801332230cf28130a159 +F src/wal.c 847692349eb6e1fb8543dbc97e69ddbfa4cc7ea7 F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4 F src/walker.c c253b95b4ee44b21c406e2a1052636c31ea27804 F src/where.c a0b16f9d78321cb340a977287d19f826555c7d3b @@ -1223,7 +1223,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P cbd357fd8c25c9c6043063710a3e2a89ff8b4575 -R bf75abced12e09ba377b1add0a3ea61a +P b2da8afc7657266fbe8e683c6e50fe18216cbcf3 +R f07d202428c907151b75d8e97783127c U drh -Z 0545aa7eaccc2c8413582324bb7aef19 +Z fc5c85b33aac137327215d4078c65229 diff --git a/manifest.uuid b/manifest.uuid index e429b5d1e1..8653d4ff34 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b2da8afc7657266fbe8e683c6e50fe18216cbcf3 \ No newline at end of file +7475b90c558157802b036162376fceacc1b9ab4a \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index 7f661b42b1..3dac74dfd4 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -5705,8 +5705,8 @@ case OP_AggFinal: { /* Opcode: Checkpoint P1 P2 P3 * * ** ** Checkpoint database P1. This is a no-op if P1 is not currently in -** WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL -** or RESTART. Write 1 or 0 into mem[P3] if the checkpoint returns +** WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL, +** RESTART, or TRUNCATE. Write 1 or 0 into mem[P3] if the checkpoint returns ** SQLITE_BUSY or not, respectively. Write the number of pages in the ** WAL after the checkpoint into mem[P3+1] and the number of pages ** in the WAL that have been checkpointed after the checkpoint diff --git a/src/wal.c b/src/wal.c index 8ba5ce823f..2b80c7a95e 100644 --- a/src/wal.c +++ b/src/wal.c @@ -1824,8 +1824,10 @@ static int walCheckpoint( rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(1), WAL_NREADER-1); if( rc==SQLITE_OK ){ if( eMode==SQLITE_CHECKPOINT_TRUNCATE ){ - /* If this is a TRUNCATE checkpoint, also truncate the wal file - ** to zero bytes in size on disk. + /* IMPLEMENTATION-OF: R-44699-57140 This mode works the same way as + ** SQLITE_CHECKPOINT_RESTART with the addition that it also + ** truncates the log file to zero bytes just prior to a + ** successful return. ** ** In theory, it might be safe to do this without updating the ** wal-index header in shared memory, as all subsequent reader or