mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Do not allow rowid in a UNIQUE or PRIMARY KEY constraint. (This restores the
same behavior exhibited by all prior releases.) FossilOrigin-Name: b1278301e37220a075c1bae88c0fcca2ef7a7d5c
This commit is contained in:
@@ -355,8 +355,13 @@ static int lookupName(
|
||||
/*
|
||||
** Perhaps the name is a reference to the ROWID
|
||||
*/
|
||||
if( cnt==0 && cntTab==1 && pMatch && sqlite3IsRowid(zCol)
|
||||
&& VisibleRowid(pMatch->pTab) ){
|
||||
if( cnt==0
|
||||
&& cntTab==1
|
||||
&& pMatch
|
||||
&& (pNC->ncFlags & NC_IdxExpr)==0
|
||||
&& sqlite3IsRowid(zCol)
|
||||
&& VisibleRowid(pMatch->pTab)
|
||||
){
|
||||
cnt = 1;
|
||||
pExpr->iColumn = -1; /* IMP: R-44911-55124 */
|
||||
pExpr->affinity = SQLITE_AFF_INTEGER;
|
||||
|
||||
Reference in New Issue
Block a user