From 8cb0288fa14ba73d0f6eea982bb7d30414460bfb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 16:07:38 +0200 Subject: Merging upstream version 3.45.2. Signed-off-by: Daniel Baumann --- src/memdb.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/memdb.c') diff --git a/src/memdb.c b/src/memdb.c index 657cb9c..d83a51d 100644 --- a/src/memdb.c +++ b/src/memdb.c @@ -799,6 +799,14 @@ unsigned char *sqlite3_serialize( pOut = 0; }else{ sz = sqlite3_column_int64(pStmt, 0)*szPage; + if( sz==0 ){ + sqlite3_reset(pStmt); + sqlite3_exec(db, "BEGIN IMMEDIATE; COMMIT;", 0, 0, 0); + rc = sqlite3_step(pStmt); + if( rc==SQLITE_ROW ){ + sz = sqlite3_column_int64(pStmt, 0)*szPage; + } + } if( piSize ) *piSize = sz; if( mFlags & SQLITE_SERIALIZE_NOCOPY ){ pOut = 0; -- cgit v1.2.3