diff options
author | drh <> | 2021-12-24 13:30:22 +0000 |
---|---|---|
committer | drh <> | 2021-12-24 13:30:22 +0000 |
commit | ceeb04bf907ebe6970071aa94d5ac0546f82de53 (patch) | |
tree | 7178436dcb4c604fefbb3ea823c2faa068af02a6 /src/resolve.c | |
parent | b131bf7039b17ed51b85dc5895a4438a1c5652a2 (diff) | |
download | sqlite-ceeb04bf907ebe6970071aa94d5ac0546f82de53.tar.gz sqlite-ceeb04bf907ebe6970071aa94d5ac0546f82de53.zip |
Raise an error if a schema name is attached to the table-alias name of a
subquery or view. See
[forum:/forumpost/021a33600b|forum post 021a33600b] for the bug report.
FossilOrigin-Name: 8af8c153f8c3fe16db1c2280571e005838c4ea3c48929ad7660a1686e49ed255
Diffstat (limited to 'src/resolve.c')
-rw-r--r-- | src/resolve.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resolve.c b/src/resolve.c index 27b260e05..bf6900f23 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -320,8 +320,9 @@ static int lookupName( } if( hit || zTab==0 ) continue; } - if( zDb && pTab->pSchema!=pSchema ){ - continue; + if( zDb ){ + if( pTab->pSchema!=pSchema ) continue; + if( pSchema==0 && strcmp(zDb,"*")!=0 ) continue; } if( zTab ){ const char *zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName; |