aboutsummaryrefslogtreecommitdiff
path: root/src/resolve.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-05-27 13:06:55 +0000
committerdrh <drh@noemail.net>2015-05-27 13:06:55 +0000
commitfccda8a162b99c9419c6bccad4d88459a4c2dc81 (patch)
tree68d54c7bc36171a5e9f72fc8bb1f8c552e9d48e5 /src/resolve.c
parentb95e1193d58be876cffb061424aae2e13115c338 (diff)
downloadsqlite-fccda8a162b99c9419c6bccad4d88459a4c2dc81.tar.gz
sqlite-fccda8a162b99c9419c6bccad4d88459a4c2dc81.zip
CTEs have never add working rowids. So disallow the use of the "rowid" column
within CTEs. FossilOrigin-Name: 0055df0445932a43e42b318ef88672dcbe312c3a
Diffstat (limited to 'src/resolve.c')
-rw-r--r--src/resolve.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve.c b/src/resolve.c
index 23636eace..27eba9fd0 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -358,7 +358,7 @@ static int lookupName(
break;
}
}
- if( iCol>=pTab->nCol && sqlite3IsRowid(zCol) && HasRowid(pTab) ){
+ if( iCol>=pTab->nCol && sqlite3IsRowid(zCol) && VisibleRowid(pTab) ){
/* IMP: R-51414-32910 */
/* IMP: R-44911-55124 */
iCol = -1;
@@ -388,7 +388,7 @@ static int lookupName(
** Perhaps the name is a reference to the ROWID
*/
if( cnt==0 && cntTab==1 && pMatch && sqlite3IsRowid(zCol)
- && HasRowid(pMatch->pTab) ){
+ && VisibleRowid(pMatch->pTab) ){
cnt = 1;
pExpr->iColumn = -1; /* IMP: R-44911-55124 */
pExpr->affinity = SQLITE_AFF_INTEGER;