]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
A bug report coming from from Firefox
authordrh <drh@noemail.net>
Tue, 12 Feb 2013 22:09:48 +0000 (22:09 +0000)
committerdrh <drh@noemail.net>
Tue, 12 Feb 2013 22:09:48 +0000 (22:09 +0000)
([https://bugzilla.mozilla.org/show_bug.cgi?id=840377])
describes an infinite recursion.  We are unable to reproduce the problem.
Nevertheless, this check-in should prevent the problem from ever occurring
again.

FossilOrigin-Name: b7222a2bd035e7a32dc9416b25a488d9d017aad1

manifest
manifest.uuid
src/select.c

index e3e5b6fe2978293e88fc2c658f7080c7cf443663..511049e41b4205fe0c3865b8a010fd5bf16ea1bf 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sextended\serror\scodes\sfor\sall\sSQLITE_CONSTRAINT\serrors.
-D 2013-02-11T13:47:39.039
+C A\sbug\sreport\scoming\sfrom\sfrom\sFirefox\s\n([https://bugzilla.mozilla.org/show_bug.cgi?id=840377])\ndescribes\san\sinfinite\srecursion.\s\sWe\sare\sunable\sto\sreproduce\sthe\sproblem.\nNevertheless,\sthis\scheck-in\sshould\sprevent\sthe\sproblem\sfrom\sever\soccurring\nagain.
+D 2013-02-12T22:09:48.258
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in a48faa9e7dd7d556d84f5456eabe5825dd8a6282
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -174,7 +174,7 @@ F src/printf.c 4a9f882f1c1787a8b494a2987765acf9d97ac21f
 F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50
 F src/resolve.c 652ae6dc0f185b01b4536bb2fa7d878f13f0f1df
 F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
-F src/select.c 741c623c70c09b5fbe55d8ae6413d9215c1dedbf
+F src/select.c 7818b5c9b497499d8bd8c6d0e347a3cf67724867
 F src/shell.c 266791241d7add796ccce2317977ae6c3c67d77f
 F src/sqlite.h.in 6296506a8fba279d8fa31f4abf01ab0cc92738a6
 F src/sqlite3.rc fea433eb0a59f4c9393c8e6d76a6e2596b1fe0c0
@@ -1034,7 +1034,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P 4a7b4ee011fea911b981206c242e3d5553303b52 3f67437536591a1b0742a25b983707933aaa16d5
-R 3e5bf93d528119a300b3cfbe9643fae2
+P 939d8282748b00a7032cdd72e5d3bf3086ebfc97
+R 315866cdde25bff040d2fc0949d76051
 U drh
-Z 3a7fd1a084dac5a1a2f87b7b22126c80
+Z 1ea5eb7aafa433a1482988aad7ac5a55
index 08d4410474f061820d5ef735529479fd767cf1c6..9ad0e0b1969e2249ee24afe78974ebd9c9f8c283 100644 (file)
@@ -1 +1 @@
-939d8282748b00a7032cdd72e5d3bf3086ebfc97
\ No newline at end of file
+b7222a2bd035e7a32dc9416b25a488d9d017aad1
\ No newline at end of file
index ef88eac286260c0cdd3a19e00ad25c2d4eedf27b..2e778a57d55f54397c183cc5d495136a1951ad30 100644 (file)
@@ -3298,14 +3298,15 @@ static int selectExpander(Walker *pWalker, Select *p){
   struct SrcList_item *pFrom;
   sqlite3 *db = pParse->db;
   Expr *pE, *pRight, *pExpr;
+  u16 selFlags = p->selFlags;
 
+  p->selFlags |= SF_Expanded;
   if( db->mallocFailed  ){
     return WRC_Abort;
   }
-  if( NEVER(p->pSrc==0) || (p->selFlags & SF_Expanded)!=0 ){
+  if( NEVER(p->pSrc==0) || (selFlags & SF_Expanded)!=0 ){
     return WRC_Prune;
   }
-  p->selFlags |= SF_Expanded;
   pTabList = p->pSrc;
   pEList = p->pEList;
 
@@ -3666,6 +3667,7 @@ void sqlite3SelectPrep(
   sqlite3 *db;
   if( NEVER(p==0) ) return;
   db = pParse->db;
+  if( db->mallocFailed ) return;
   if( p->selFlags & SF_HasTypeInfo ) return;
   sqlite3SelectExpand(pParse, p);
   if( pParse->nErr || db->mallocFailed ) return;