MXS-1307 Ignore usage differences for functions
Also in the case of functions, we ignore differences in reported usage context between qc_mysqlembedded and qc_sqlite.
This commit is contained in:
@ -1094,6 +1094,35 @@ public:
|
||||
return rv;
|
||||
}
|
||||
|
||||
static bool at_most_usage_differs(const std::set<QcFunctionInfo>& l,
|
||||
const std::set<QcFunctionInfo>& r)
|
||||
{
|
||||
bool rv = false;
|
||||
|
||||
if (l.size() == r.size())
|
||||
{
|
||||
rv = true;
|
||||
|
||||
std::set<QcFunctionInfo>::iterator i = l.begin();
|
||||
std::set<QcFunctionInfo>::iterator j = r.begin();
|
||||
|
||||
while (rv && (i != l.end()))
|
||||
{
|
||||
if (i->m_name != j->m_name)
|
||||
{
|
||||
rv = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
++i;
|
||||
++j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
void print(ostream& out) const
|
||||
{
|
||||
out << m_name;
|
||||
@ -1174,6 +1203,11 @@ bool compare_get_function_info(QUERY_CLASSIFIER* pClassifier1, GWBUF* pCopy1,
|
||||
ss << f1;
|
||||
success = true;
|
||||
}
|
||||
else if (QcFunctionInfo::at_most_usage_differs(f1, f2))
|
||||
{
|
||||
ss << "WRN: " << f1 << " != " << f2;
|
||||
success = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ss << "ERR: " << f1 << " != " << f2;
|
||||
|
Reference in New Issue
Block a user