]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a crash that could follow an OOM condition. sorter-coalesce-writes
authordan <dan@noemail.net>
Mon, 6 Aug 2012 19:12:17 +0000 (19:12 +0000)
committerdan <dan@noemail.net>
Mon, 6 Aug 2012 19:12:17 +0000 (19:12 +0000)
FossilOrigin-Name: 2e5741f774248abc678b50711c43e38ca30c9091

manifest
manifest.uuid
src/vdbesort.c

index 34d8efeb558c22fe9f925d8209880f032519c213..39fe08007e36442e328752bac5703339aa9ba4aa 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C When\sreusing\spages\sas\spart\sof\screating\sa\snew\sindex,\sallocate\sthe\sleaves\sfrom\seach\sfree-list\strunk\spage\sin\sascending\sorder,\sinstead\sof\strying\sto\smaximize\slocalization\sfor\seach\sindividual\sallocation.\sThis\sincreases\sthe\schance\sthat\spages\swill\sbe\swritten\sto\sdisk\sin\sascending\sorder\sby\sa\slarge\sCREATE\sINDEX\sstatement,\simproving\soverall\sperformance.
-D 2012-08-06T18:50:11.492
+C Fix\sa\scrash\sthat\scould\sfollow\san\sOOM\scondition.
+D 2012-08-06T19:12:17.500
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in abd5c10d21d1395f140d9e50ea999df8fa4d6376
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -244,7 +244,7 @@ F src/vdbeapi.c 88ea823bbcb4320f5a6607f39cd7c2d3cc4c26b1
 F src/vdbeaux.c dce80038c3c41f2680e5ab4dd0f7e0d8b7ff9071
 F src/vdbeblob.c 32f2a4899d67f69634ea4dd93e3f651936d732cb
 F src/vdbemem.c cb55e84b8e2c15704968ee05f0fae25883299b74
-F src/vdbesort.c ad3078561072cc3faaf8084b5d7d3cd6affb5f42
+F src/vdbesort.c 1de867bfa04a54c217bfe467f43206c801912921
 F src/vdbetrace.c 8bd5da325fc90f28464335e4cc4ad1407fe30835
 F src/vtab.c bb8ea3a26608bb1357538a5d2fc72beba6638998
 F src/wal.c 9294df6f96aae5909ae1a9b733fd1e1b4736978b
@@ -1009,7 +1009,7 @@ F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9
-P 214f8cda1727e0eee51605be487d4cf4f2dfb6db
-R 3158683ecf6a85f9d8794482d2318bc6
+P d045f8b2d44e388d8c4549ff02d4ca7eff4e2038
+R 271a84ad323420f7636b49c9d4c7979c
 U dan
-Z 52fb98b324ddd516442d0480eabbc4d5
+Z da2600161cd5536c31009989e6b616b4
index c85d23ae1e301b018e5822487f71ff72465c3eff..5e7b941fbe3d96596231d00be38e6cdf1f577e09 100644 (file)
@@ -1 +1 @@
-d045f8b2d44e388d8c4549ff02d4ca7eff4e2038
\ No newline at end of file
+2e5741f774248abc678b50711c43e38ca30c9091
\ No newline at end of file
index 1fcf0ddd27340eaed6ec12c9afc167b94462432a..7433e3e08ca8841b3fc99212696387c11fdc0277 100644 (file)
@@ -919,8 +919,9 @@ int sqlite3VdbeSorterRewind(sqlite3 *db, const VdbeCursor *pCsr, int *pbEof){
         rc = vdbeSorterOpenTempFile(db, &pTemp2);
       }
 
-      rc = fileWriterInit(db, pTemp2, &writer, iWrite2);
-
+      if( rc==SQLITE_OK ){
+        rc = fileWriterInit(db, pTemp2, &writer, iWrite2);
+      }
       if( rc==SQLITE_OK ){
         rc = fileWriterWriteVarint(&writer, nWrite);
       }