summaryrefslogtreecommitdiffstats
path: root/test/memdb1.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/memdb1.test')
-rw-r--r--test/memdb1.test15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/memdb1.test b/test/memdb1.test
index 5e219a4..3a31c8e 100644
--- a/test/memdb1.test
+++ b/test/memdb1.test
@@ -84,7 +84,6 @@ do_test 152 {
catchsql {INSERT INTO t1 VALUES(3,4);}
} {1 {attempt to write a readonly database}}
-breakpoint
do_test 160 {
db deserialize -maxsize 32768 $db1
db eval {SELECT * FROM t1}
@@ -248,6 +247,7 @@ if {[wal_is_capable]} {
set fd [open test.db]
fconfigure $fd -translation binary -encoding binary
set data [read $fd [expr 20*1024]]
+ close $fd
sqlite3 db ""
db deserialize $data
@@ -267,4 +267,17 @@ 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
+dbempty close
+
finish_test