]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
When enlarging the size of a StrAccum object, use sqlite3DbMallocSize() to
authordrh <drh@noemail.net>
Mon, 3 Nov 2014 13:24:12 +0000 (13:24 +0000)
committerdrh <drh@noemail.net>
Mon, 3 Nov 2014 13:24:12 +0000 (13:24 +0000)
record the entire size of the allocation, not just the requested size.

FossilOrigin-Name: 3dda3c937469ce661d1cd0e8d8963a03e698ee39

manifest
manifest.uuid
src/printf.c

index 8ab904b8d23174236ea10ce552fb9c6041c028d2..3034b1c1804f1993e8581d0d0cade934eee79d4b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\srequirements\smarks\sand\smake\sminor\stweaks\sto\sdocumentation.
-D 2014-11-01T18:32:18.050
+C When\senlarging\sthe\ssize\sof\sa\sStrAccum\sobject,\suse\ssqlite3DbMallocSize()\sto\nrecord\sthe\sentire\ssize\sof\sthe\sallocation,\snot\sjust\sthe\srequested\ssize.
+D 2014-11-03T13:24:12.668
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -223,7 +223,7 @@ F src/pcache.h 9b559127b83f84ff76d735c8262f04853be0c59a
 F src/pcache1.c e412cb585f777c840ddce0500eddc5c6043c2bb5
 F src/pragma.c 3f3e959390a10c0131676f0e307acce372777e0f
 F src/prepare.c b7b7bf020bd4c962f7c8aed5a3c542c7dfe9f9c7
-F src/printf.c 10a2493593c8e4a538915cd3674bd7a67f70c488
+F src/printf.c ee13daccd49ddf767d057bc98395c9e83d4e2067
 F src/random.c ba2679f80ec82c4190062d756f22d0c358180696
 F src/resolve.c 4965007d6497b6a4d7a6d98751cc39712885f952
 F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e
@@ -1210,7 +1210,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 67f0d469da28c023200239a1f3d0c6cef9ef0e45
-R dbf6a8dc4a878d1b1a7b9b3874ca58fb
+P 49188b2bb53a92b0b0b6aaf8247edeb0c1bcd1f5
+R 041ffec3947ff9e90700478ea54978f5
 U drh
-Z 455c35adeade418fab0456b1b175d27f
+Z 42c888343c3ca87538d56b9b17ae76ab
index 02f906627f19381853180be3b59056a410974228..8be6ab985634186ad4d1b8aa21cc4423eb895161 100644 (file)
@@ -1 +1 @@
-49188b2bb53a92b0b0b6aaf8247edeb0c1bcd1f5
\ No newline at end of file
+3dda3c937469ce661d1cd0e8d8963a03e698ee39
\ No newline at end of file
index 85d237f0e7704376cdb2ce6c778d02148efc66ea..e20619f9a715010d7634353d08df40af56fad227 100644 (file)
@@ -786,6 +786,7 @@ static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
       assert( p->zText!=0 || p->nChar==0 );
       if( zOld==0 && p->nChar>0 ) memcpy(zNew, p->zText, p->nChar);
       p->zText = zNew;
+      p->nAlloc = sqlite3DbMallocSize(p->db, zNew);
     }else{
       sqlite3StrAccumReset(p);
       setStrAccumError(p, STRACCUM_NOMEM);