]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a problem in test script malloc5.test. (CVS 4455)
authordanielk1977 <danielk1977@noemail.net>
Wed, 3 Oct 2007 09:43:54 +0000 (09:43 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Wed, 3 Oct 2007 09:43:54 +0000 (09:43 +0000)
FossilOrigin-Name: 028ec36c71d6ac43c8f1cda77578d844c6955f68

manifest
manifest.uuid
test/malloc5.test

index fd3f1155e2c0efe2f0f33e53fccf5b12951da493..b7505325945f06f90da35341d88b31275f549b77 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sautomatic\srecovery\sfrom\sthe\spager\s"error-state".\sAlso\sadd\sa\snew\serror\scode\s-\sSQLITE_IOERR_NOMEM.\s(CVS\s4454)
-D 2007-10-03T08:46:44
+C Fix\sa\sproblem\sin\stest\sscript\smalloc5.test.\s(CVS\s4455)
+D 2007-10-03T09:43:55
 F Makefile.in cbfb898945536a8f9ea8b897e1586dd1fdbcc5db
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -353,7 +353,7 @@ F test/malloc.test 17366a4f76e7aac14cd709e8209ef840cd497410
 F test/malloc2.test 1506ab3a4490b38b8850a6fa3e12591235179872
 F test/malloc3.test cf2efe9d16194276f227f34ac341019e013fb17d
 F test/malloc4.test f0e5e0f639f61e2776a6c3f5308f836b3ad8b3c7
-F test/malloc5.test b2fd56b369dd5884ad88edfaef41304393809125
+F test/malloc5.test 18f3f71756e775a17ce4d0c49d76fb0027dda066
 F test/malloc6.test d05fd71ef3c5983d10e0a6d728ea4a502a45a9e4
 F test/malloc7.test 0d71bb6520b99934b551fa36a9c591404aeaad61
 F test/malloc8.test addc27d907fec1af429551b95c72caa47fce2974
@@ -580,7 +580,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 272959cc91d0c9299d6fca8a962eb563650af87b
-R e48ace1bd2100159c32ec15d9bfa3f76
+P 12eca32a6a3d68d5b20eed03afdffe7599e66014
+R ab778c4ccea4851cfb45b8ff8e4ecac9
 U danielk1977
-Z d1e46257f1f89b59b016148eed84362d
+Z 0b2e370c486d9ff351342955af404557
index 41b049d87a5e6eea7dc5eb374ab375fe24038c6f..afd09128df9ff6584dc0cda9a81070d8130e7568 100644 (file)
@@ -1 +1 @@
-12eca32a6a3d68d5b20eed03afdffe7599e66014
\ No newline at end of file
+028ec36c71d6ac43c8f1cda77578d844c6955f68
\ No newline at end of file
index 62ca241f748adab7862c51f99fd5e13fb41a09d3..6bb119b591b723f870565d87797588fcb14cbd00 100644 (file)
@@ -12,7 +12,7 @@
 # This file contains test cases focused on the two memory-management APIs, 
 # sqlite3_soft_heap_limit() and sqlite3_release_memory().
 #
-# $Id: malloc5.test,v 1.16 2007/09/03 16:12:10 drh Exp $
+# $Id: malloc5.test,v 1.17 2007/10/03 09:43:55 danielk1977 Exp $
 
 #---------------------------------------------------------------------------
 # NOTES ON EXPECTED BEHAVIOUR
@@ -214,7 +214,23 @@ do_test malloc5-4.2 {
   execsql {COMMIT;}
   set nMaxBytes [sqlite3_memory_highwater 1]
   puts -nonewline " (Highwater mark: $nMaxBytes) "
-  expr $nMaxBytes <= 100000
+
+  # We used to test ($nMaxBytes<100000), because the soft-heap-limit is
+  # 100000 bytes. But if an allocation that will exceed the 
+  # soft-heap-limit is requested from within the only pager instance in 
+  # the system, then there is no way to free memory and the limit has to 
+  # be exceeded. An exception is memory allocated to store actual page
+  # data (the code contains a special case for this).
+  #
+  # This is not a problem because all allocations apart from those
+  # used to store cached page data are both small and transient.
+  #
+  # Summary: the actual high-water mark for memory usage may be slightly 
+  # higher than the soft-heap-limit. The specific allocations that cause
+  # the problem are the calls to sqlite3_malloc() inserted into selected
+  # sqlite3OsXXX() functions in test builds.
+  #
+  expr $nMaxBytes <= 100100
 } {1}
 do_test malloc5-4.3 {
   # Check that the content of table abc is at least roughly as expected.