mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-05 04:30:38 +03:00
Make sure "rowid" columns are correctly resolved in joins between normal
tables and WITHOUT ROWID tables. Fix for ticket [c34d0557f740c45070]. FossilOrigin-Name: 5d01426ddfb2d47c57f93f71378594e637424be0
This commit is contained in:
@@ -380,8 +380,8 @@ static int lookupName(
|
||||
/*
|
||||
** Perhaps the name is a reference to the ROWID
|
||||
*/
|
||||
assert( pTab!=0 || cntTab==0 );
|
||||
if( cnt==0 && cntTab==1 && sqlite3IsRowid(zCol) && HasRowid(pTab) ){
|
||||
if( cnt==0 && cntTab==1 && pMatch && sqlite3IsRowid(zCol)
|
||||
&& HasRowid(pMatch->pTab) ){
|
||||
cnt = 1;
|
||||
pExpr->iColumn = -1; /* IMP: R-44911-55124 */
|
||||
pExpr->affinity = SQLITE_AFF_INTEGER;
|
||||
|
||||
Reference in New Issue
Block a user