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

CTEs have never add working rowids. So disallow the use of the "rowid" column

within CTEs.

FossilOrigin-Name: 0055df0445932a43e42b318ef88672dcbe312c3a
This commit is contained in:
drh
2015-05-27 13:06:55 +00:00
parent b95e1193d5
commit fccda8a162
9 changed files with 54 additions and 21 deletions

View File

@@ -3991,7 +3991,7 @@ static int withExpand(
pTab->zName = sqlite3DbStrDup(db, pCte->zName);
pTab->iPKey = -1;
pTab->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) );
pTab->tabFlags |= TF_Ephemeral;
pTab->tabFlags |= TF_Ephemeral | TF_NoVisibleRowid;
pFrom->pSelect = sqlite3SelectDup(db, pCte->pSelect, 0);
if( db->mallocFailed ) return SQLITE_NOMEM;
assert( pFrom->pSelect );