1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Add code to handle recursive CTEs.

FossilOrigin-Name: a5c2a54a07d35166911abc792008c05dea897742
This commit is contained in:
dan
2014-01-14 20:14:09 +00:00
parent a9f5c13d0c
commit 8ce7184bc2
9 changed files with 262 additions and 33 deletions

View File

@@ -5653,7 +5653,11 @@ WhereInfo *sqlite3WhereBegin(
iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
pLoop = pLevel->pWLoop;
if( (pTab->tabFlags & TF_Ephemeral)!=0 || pTab->pSelect ){
/* Do nothing */
if( pTab->tabFlags & TF_Recursive ){
int iCur = pTabItem->iCursor;
sqlite3VdbeAddOp2(v, OP_OpenEphreader, iCur, pTab->tnum);
}
/* Otherwise do nothing */
}else
#ifndef SQLITE_OMIT_VIRTUALTABLE
if( (pLoop->wsFlags & WHERE_VIRTUALTABLE)!=0 ){