aboutsummaryrefslogtreecommitdiff
path: root/src/pragma.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pragma.c')
-rw-r--r--src/pragma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pragma.c b/src/pragma.c
index 65a0550bc..c3aaaf9b3 100644
--- a/src/pragma.c
+++ b/src/pragma.c
@@ -1408,7 +1408,7 @@ void sqlite3Pragma(
*/
if( sqlite3StrICmp(zLeft, "wal_checkpoint")==0 ){
if( sqlite3ReadSchema(pParse) ) goto pragma_out;
- sqlite3VdbeAddOp3(v, OP_Checkpoint, iDb, 0, 0);
+ sqlite3VdbeAddOp3(v, OP_Checkpoint, pId2->z?iDb:SQLITE_MAX_ATTACHED, 0, 0);
}else
/*