mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Allow only a single recursive reference in a recursive CTE. Also require that this reference is not part of a sub-query.
FossilOrigin-Name: a296b73360d34c9364eceb2cc09a9a92adc4abb8
This commit is contained in:
@@ -5654,13 +5654,7 @@ WhereInfo *sqlite3WhereBegin(
|
||||
iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
|
||||
pLoop = pLevel->pWLoop;
|
||||
if( (pTab->tabFlags & TF_Ephemeral)!=0 || pTab->pSelect ){
|
||||
#ifndef SQLITE_OMIT_CTE
|
||||
if( pTab->tabFlags & TF_Recursive ){
|
||||
int iCur = pTabItem->iCursor;
|
||||
sqlite3VdbeAddOp2(v, OP_OpenEphreader, iCur, pTab->tnum);
|
||||
}
|
||||
#endif
|
||||
/* Otherwise do nothing */
|
||||
/* Do nothing */
|
||||
}else
|
||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||
if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 ){
|
||||
|
||||
Reference in New Issue
Block a user