mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-27 08:52:26 +03:00
Fix an infinite loop in the code generator for INSERT. Ticket #1140. (CVS 2410)
FossilOrigin-Name: 876d09d9145775956913e975c29e81d7553839ac
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle INSERT statements in SQLite.
|
||||
**
|
||||
** $Id: insert.c,v 1.137 2005/03/16 12:15:21 danielk1977 Exp $
|
||||
** $Id: insert.c,v 1.138 2005/03/21 01:20:58 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -108,7 +108,7 @@ static int selectReadsTable(Select *p, int iDb, int iTab){
|
||||
if( p->pSrc==0 ) return 0;
|
||||
for(i=0, pItem=p->pSrc->a; i<p->pSrc->nSrc; i++, pItem++){
|
||||
if( pItem->pSelect ){
|
||||
if( selectReadsTable(p, iDb, iTab) ) return 1;
|
||||
if( selectReadsTable(pItem->pSelect, iDb, iTab) ) return 1;
|
||||
}else{
|
||||
if( pItem->pTab->iDb==iDb && pItem->pTab->tnum==iTab ) return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user