]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
If a virtual table constructor returns SQLITE_NOMEM, set the mallocFailed
authordrh <drh@noemail.net>
Mon, 11 May 2009 23:37:59 +0000 (23:37 +0000)
committerdrh <drh@noemail.net>
Mon, 11 May 2009 23:37:59 +0000 (23:37 +0000)
flag in the corresponding database connection to insure that the error
is propagated back to the top layer. (CVS 6627)

FossilOrigin-Name: 5635666f20358e854a76d244768198734afd4299

manifest
manifest.uuid
src/vtab.c

index 3f4ad383fa6c2051bcde0d2faa80447f0c8ae03a..fc18b65ae89e7736b79be4ab332f48abaedc27dd 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Rework\sthe\slogic\sthat\sgenerates\sa\sschema\sfor\stables\screated\susing\r\n"CREATE\sTABLE\s...\sAS\sSELECT\s...".\s\sInstead\sof\strying\sto\scopy\sthe\sraw\r\ndatatype\sstring\sfrom\sthe\sright-hand\sside,\sjust\smake\sthe\stype\sone\s\r\nof\sTEXT,\sINT,\sREAL,\sNUM,\sor\snothing.\s\sThis\sis\smuch\ssimpler\sthan\s\r\ntrying\sto\sparse\sand\squote\sdatatype\sstrings.\s\sOther\sminor\s\r\nimplifications\sto\sbuild.c\sare\sbundled\swith\sthis\schange.\s(CVS\s6626)
-D 2009-05-11T20:53:29
+C If\sa\svirtual\stable\sconstructor\sreturns\sSQLITE_NOMEM,\sset\sthe\smallocFailed\nflag\sin\sthe\scorresponding\sdatabase\sconnection\sto\sinsure\sthat\sthe\serror\nis\spropagated\sback\sto\sthe\stop\slayer.\s(CVS\s6627)
+D 2009-05-11T23:38:00
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -210,7 +210,7 @@ F src/vdbeapi.c 86aa27a5f3493aaffb8ac051782aa3b22670d7ed
 F src/vdbeaux.c 1a07329bdf51cc3687f88d9f5b2bd3f1d47cc5a8
 F src/vdbeblob.c 5c5abe9af28316772e7829359f6f9cda2c737ebd
 F src/vdbemem.c d8b985eeb88214941380372466a30ca410043a93
-F src/vtab.c 53355aa2381ec3ef2eaad25672cfd5877a02fe45
+F src/vtab.c 1e285c90d04f27808709b42c428be628fb309b77
 F src/walker.c 7cdf63223c953d4343c6833e940f110281a378ee
 F src/where.c c5fa4a7a58880aecc657ebce5f8df98c9b67eec0
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -729,7 +729,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 93772bd7f56a5158eb46a992ba932f4695cb219f
-R de2290be2f61351bb90dbdb8627e4109
+P 33cf83591e6e13875ef6ada5b8ac8ab07619d8bc
+R 1e077e3ba746ae1ba5340b2bc353df44
 U drh
-Z 51732e5a860d760f0334992770c434bb
+Z bd311d11dec0024101d1628d00e7c29b
index 78845d8b8b6cb1d5d4016c1f57b4d6627656dac5..0c721a2b95c6e9a99e7b3874a4e6d904f25f44fb 100644 (file)
@@ -1 +1 @@
-33cf83591e6e13875ef6ada5b8ac8ab07619d8bc
\ No newline at end of file
+5635666f20358e854a76d244768198734afd4299
\ No newline at end of file
index 10d686035f4acf687e00aabc523a8afca3d068ca..036addfa1edfcd55510dd562bbe775badadaff7d 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** This file contains code used to help implement virtual tables.
 **
-** $Id: vtab.c,v 1.86 2009/04/28 13:01:09 drh Exp $
+** $Id: vtab.c,v 1.87 2009/05/11 23:38:00 drh Exp $
 */
 #ifndef SQLITE_OMIT_VIRTUALTABLE
 #include "sqliteInt.h"
@@ -377,6 +377,7 @@ static int vtabCallConstructor(
   assert( rc==SQLITE_OK );
   rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVtab, &zErr);
   rc2 = sqlite3SafetyOn(db);
+  if( rc==SQLITE_NOMEM ) db->mallocFailed = 1;
   if( rc==SQLITE_OK && pVtab ){
     pVtab->pModule = pMod->pModule;
     pVtab->nRef = 1;