Do not allow rowid in a UNIQUE or PRIMARY KEY constraint.  (This restores the
same behavior exhibited by all prior releases.)

FossilOrigin-Name: b1278301e37220a075c1bae88c0fcca2ef7a7d5c
diff --git a/src/resolve.c b/src/resolve.c
index 2c4212b..ac1706b 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -355,8 +355,13 @@
     /*
     ** 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;