1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Have sqlite3_wal_checkpoint() handle a zero-length string in the same way as a NULL pointer. Fix "PRAGMA wal_checkpoint" so that it checkpoints all attached databases.

FossilOrigin-Name: 7fecd21f45b9ce773ffbcef6c84066474e8cd01c
This commit is contained in:
dan
2010-05-03 15:58:50 +00:00
parent b7e8ea2015
commit af0cfd366a
5 changed files with 77 additions and 23 deletions

View File

@@ -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
/*