mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Rig sqlite3_serialize() so that it will initialize a previously uninitialized
database prior to serializing it, so that it does not have a zero-byte size and does not return NULL (except for OOM). [forum:/forumpost/498777780e16880a|Forum thread 498777780e16880a]. FossilOrigin-Name: e638d5e408ea2e189b6771d16bbc2e42c606e88e05fbea78079b6e39e41f344c
This commit is contained in:
@ -267,4 +267,16 @@ if {[wal_is_capable]} {
|
||||
} {1 {database disk image is malformed}}
|
||||
}
|
||||
|
||||
# 2024-01-20
|
||||
# https://sqlite.org/forum/forumpost/498777780e16880a
|
||||
#
|
||||
# Make sure a database is initialized before serializing it.
|
||||
#
|
||||
reset_db
|
||||
sqlite3 dbempty :memory:
|
||||
do_test 900 {
|
||||
set len [string length [dbempty serialize]]
|
||||
expr {$len>0}
|
||||
} 1
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user