-C Fix\sa\stypo\sin\sthe\sdate/time\sfunction\stests.\s\sAdd\sadditional\scases\sto\nthe\szeroblob\stests\sto\smake\ssure\ssqlite3_bind_zeroblob()\sdoes\snot\suse\nexcess\smemory.\s(CVS\s5216)
-D 2008-06-12T18:05:40
+C Enhance\szeroblob\stests\sto\suse\sthe\ssqlite3_memory_highwater\sin\sorder\sto\ndouble-check\sthat\sno\slarge\sallocations\sare\soccurring.\s(CVS\s5217)
+D 2008-06-12T18:17:40
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in ce92ea8dc7adfb743757794f51c10d1b0d9c55e4
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F test/where4.test e9b9e2f2f98f00379e6031db6a6fca29bae782a2
F test/where5.test fdf66f96d29a064b63eb543e28da4dfdccd81ad2
F test/where6.test 42c4373595f4409d9c6a9987b4a60000ad664faf
-F test/zeroblob.test 2f4f8c80d4fc63fe74ba51f63028ea432f37445a
+F test/zeroblob.test 92c3e7dabd2a5ceabc305f7ff5f4441a913366ca
F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439
F tool/lemon.c a9c51c1ede7f35dc8746894e7f8cc7e3704ecef8
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P ed35f8a98323dadb64b423615287fb24ea262ffb
-R 6d3a5f7e9e66d13c1835b9bd637681e5
+P c1006fb1c817bc0b7fada873edb772abbf972012
+R dc9288951ccf4af2026b613e380c37a1
U drh
-Z ad27c56d832bced711a43dcd785d84f4
+Z a943c68dc8f656dcf324d2907bc83041
# including the sqlite3_bind_zeroblob(), sqlite3_result_zeroblob(),
# and the built-in zeroblob() SQL function.
#
-# $Id: zeroblob.test,v 1.11 2008/06/12 18:05:40 drh Exp $
+# $Id: zeroblob.test,v 1.12 2008/06/12 18:17:40 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
# content of the zeroblob is never instantiated on the VDBE stack.
# But it does get inserted into the database correctly.
#
+db eval {PRAGMA cache_size=10}
+sqlite3_memory_highwater
+unset -nocomplain memused
+set memused [sqlite3_memory_used]
do_test zeroblob-1.1 {
execsql {
CREATE TABLE t1(a,b,c,d);
}
set ::sqlite3_max_blobsize 0
execsql {
- INSERT INTO t1 VALUES(2,3,4,zeroblob(10000));
+ INSERT INTO t1 VALUES(2,3,4,zeroblob(1000000));
}
set ::sqlite3_max_blobsize
} {10}
+do_test zeroblob-1.1.1 {
+ expr {[sqlite3_memory_highwater]<$::memused+25000}
+} {1}
do_test zeroblob-1.2 {
execsql {
SELECT length(d) FROM t1
}
-} {10000}
+} {1000000}
# If a non-NULL column follows the zeroblob, then the content of
# the zeroblob must be instantiated.
execsql {
SELECT length(c), length(d) FROM t1
}
-} {1 10000 10000 1}
+} {1 1000000 10000 1}
# Multiple zeroblobs can appear at the end of record. No instantiation
# of the blob content occurs on the stack.
execsql {
SELECT length(c), length(d) FROM t1
}
-} {1 10000 10000 1 10000 10000}
+} {1 1000000 10000 1 10000 10000}
# NULLs can follow the zeroblob() or be intermixed with zeroblobs and
# no instantiation of the zeroblobs occurs on the stack.