mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Materialize any CTE that is used more than once.
FossilOrigin-Name: ba59159fbe6b83fb6d79fbfee22d983768b0ebbaac7e99d2ac66c810e5e04100
This commit is contained in:
@@ -209,7 +209,11 @@ Expr *sqlite3LimitWhere(
|
||||
pSrc->a[0].pTab = 0;
|
||||
pSelectSrc = sqlite3SrcListDup(pParse->db, pSrc, 0);
|
||||
pSrc->a[0].pTab = pTab;
|
||||
pSrc->a[0].pIBIndex = 0;
|
||||
if( pSrc->a[0].fg.isIndexedBy ){
|
||||
pSrc->a[0].u2.pIBIndex = 0;
|
||||
}else if( pSrc->a[0].fg.isCte ){
|
||||
pSrc->a[0].u2.pCteUse->nUse++;
|
||||
}
|
||||
|
||||
/* generate the SELECT expression tree. */
|
||||
pSelect = sqlite3SelectNew(pParse, pEList, pSelectSrc, pWhere, 0 ,0,
|
||||
|
||||
Reference in New Issue
Block a user