summaryrefslogtreecommitdiffstats
path: root/src/memdb.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:38 +0000
commit8cb0288fa14ba73d0f6eea982bb7d30414460bfb (patch)
tree0ea6af723f53807b69ff4060b07381b45def1c15 /src/memdb.c
parentAdding debian version 3.45.1-1. (diff)
downloadsqlite3-8cb0288fa14ba73d0f6eea982bb7d30414460bfb.tar.xz
sqlite3-8cb0288fa14ba73d0f6eea982bb7d30414460bfb.zip
Merging upstream version 3.45.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/memdb.c')
-rw-r--r--src/memdb.c8
1 files changed, 8 insertions, 0 deletions
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;