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

Honor the MATERIALIZED keyword on a common table expression by not flattening

the CTE into an outer query.

FossilOrigin-Name: 8d631a6b9eb06b54b10eda595a4c588ca38f909b4afa653b24d1f720b55d72f7
This commit is contained in:
drh
2022-04-22 16:15:48 +00:00
parent 9b843f0ce0
commit 67f70bea06
7 changed files with 94 additions and 17 deletions

View File

@@ -115,6 +115,10 @@ void sqlite3TreeViewWith(TreeView *pView, const With *pWith, u8 moreToFollow){
}
sqlite3_str_appendf(&x, ")");
}
if( pCte->eM10d!=M10d_Any ){
sqlite3_str_appendf(&x, " %sMATERIALIZED",
pCte->eM10d==M10d_No ? "NOT " : "");
}
if( pCte->pUse ){
sqlite3_str_appendf(&x, " (pUse=0x%p, nUse=%d)", pCte->pUse,
pCte->pUse->nUse);