aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2023-10-17 11:57:36 +0000
committerdrh <>2023-10-17 11:57:36 +0000
commit5e0b11bda77dc6d48932601ffded969faec75aad (patch)
treeb2c143eac285761215ad66fcfd99567158a4567c /src
parent11095bcb89a2386698743b948387bf46611b0d8f (diff)
downloadsqlite-5e0b11bda77dc6d48932601ffded969faec75aad.tar.gz
sqlite-5e0b11bda77dc6d48932601ffded969faec75aad.zip
Enhance the documentation of sqlite3_deserialize() to make it clear that
the input database may not be in WAL mode. [forum:/forumpost/a7e272cee9ac469f|Forum post a7e272cee9ac469f] FossilOrigin-Name: e754789971e019647e7068f76dc6f9778675e4849fe51d8b25b39d3edf2379e5
Diffstat (limited to 'src')
-rw-r--r--src/sqlite.h.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index 54192422d..af648829d 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -10676,6 +10676,13 @@ unsigned char *sqlite3_serialize(
** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
** function returns SQLITE_ERROR.
**
+** The deserialized database should not be in [WAL mode]. If the database
+** is in WAL mode, then any attempt to use the database file will result
+** in an [SQLITE_CANTOPEN] error. The application can set the
+** [file format version numbers] (bytes 18 and 19) of the input database P
+** to 0x01 prior to invoking sqlite3_deserialize(D,S,P,N,M,F) to force the
+** database file into rollback mode and work around this limitation.
+**
** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then
** [sqlite3_free()] is invoked on argument P prior to returning.