qc_sqlite: Only exclude exact match
When checking whether a name should be excluded, there may be a match only if the name checked against is not a qualified name.
This commit is contained in:
@ -663,20 +663,18 @@ static bool should_exclude(const char* zName, const ExprList* pExclude)
|
|||||||
|
|
||||||
Expr* pExpr = item->pExpr;
|
Expr* pExpr = item->pExpr;
|
||||||
|
|
||||||
if (pExpr->op == TK_DOT)
|
if (pExpr->op == TK_ID)
|
||||||
{
|
{
|
||||||
pExpr = pExpr->pRight;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We need to ensure that we do not report fields where there
|
// We need to ensure that we do not report fields where there
|
||||||
// is only a difference in case. E.g.
|
// is only a difference in case. E.g.
|
||||||
// SELECT A FROM tbl WHERE a = "foo";
|
// SELECT A FROM tbl WHERE a = "foo";
|
||||||
// Affected fields is "A" and not "A a".
|
// Affected fields is "A" and not "A a".
|
||||||
if ((pExpr->op == TK_ID) && (strcasecmp(pExpr->u.zToken, zName) == 0))
|
if (strcasecmp(pExpr->u.zToken, zName) == 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return i != pExclude->nExpr;
|
return i != pExclude->nExpr;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user