mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Return the error "ambiguous column name: rowid", instead of "no such column: rowid", when a "rowid" reference is ambiguous.
FossilOrigin-Name: 021f34fcfed41b607be8169bbda59aef93f130108d944f4741b46e8e345b2bbb
This commit is contained in:
@@ -596,13 +596,13 @@ static int lookupName(
|
||||
** Perhaps the name is a reference to the ROWID
|
||||
*/
|
||||
if( cnt==0
|
||||
&& cntTab==1
|
||||
&& cntTab>=1
|
||||
&& pMatch
|
||||
&& (pNC->ncFlags & (NC_IdxExpr|NC_GenCol))==0
|
||||
&& sqlite3IsRowid(zCol)
|
||||
&& ALWAYS(VisibleRowid(pMatch->pTab) || pMatch->fg.isNestedFrom)
|
||||
){
|
||||
cnt = 1;
|
||||
cnt = cntTab;
|
||||
if( pMatch->fg.isNestedFrom==0 ) pExpr->iColumn = -1;
|
||||
pExpr->affExpr = SQLITE_AFF_INTEGER;
|
||||
}
|
||||
|
Reference in New Issue
Block a user