aboutsummaryrefslogtreecommitdiff
path: root/src/resolve.c
diff options
context:
space:
mode:
authordrh <>2021-08-02 18:03:43 +0000
committerdrh <>2021-08-02 18:03:43 +0000
commitcf9d36d1b3a84fb68d2e13acb790c449bff51c15 (patch)
tree41739e173fe71a4dafba5ffee69002b82a83543a /src/resolve.c
parentf38524d20db165c94dc94e06b62f0aad5942a03b (diff)
downloadsqlite-cf9d36d1b3a84fb68d2e13acb790c449bff51c15.tar.gz
sqlite-cf9d36d1b3a84fb68d2e13acb790c449bff51c15.zip
Refactor field names in the Column object, zCnName and zCnColl, to make them
unique and thus easier to find amid all the other code. FossilOrigin-Name: 8b781dcaf68e0cf12a844708c82eee00193e340195cbca915d077e4846983bf3
Diffstat (limited to 'src/resolve.c')
-rw-r--r--src/resolve.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/resolve.c b/src/resolve.c
index d509de795..3c1311417 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -333,7 +333,9 @@ static int lookupName(
}
hCol = sqlite3StrIHash(zCol);
for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){
- if( pCol->hName==hCol && sqlite3StrICmp(pCol->zName, zCol)==0 ){
+ if( pCol->hName==hCol
+ && sqlite3StrICmp(pCol->zCnName, zCol)==0
+ ){
/* If there has been exactly one prior match and this match
** is for the right-hand table of a NATURAL JOIN or is in a
** USING clause, then skip this match.
@@ -410,7 +412,9 @@ static int lookupName(
pSchema = pTab->pSchema;
cntTab++;
for(iCol=0, pCol=pTab->aCol; iCol<pTab->nCol; iCol++, pCol++){
- if( pCol->hName==hCol && sqlite3StrICmp(pCol->zName, zCol)==0 ){
+ if( pCol->hName==hCol
+ && sqlite3StrICmp(pCol->zCnName, zCol)==0
+ ){
if( iCol==pTab->iPKey ){
iCol = -1;
}