Introduce new qc_parse() prototype

It is now possible to specify what information the caller is interested
in. With this the cost for collecting information during the query parsing
that nobody is interested in can be avoided.
This commit is contained in:
Johan Wikman
2017-03-15 14:11:08 +02:00
parent 441b0204bf
commit d0a9571da0
8 changed files with 36 additions and 15 deletions

View File

@ -178,14 +178,14 @@ void qc_thread_end(uint32_t kind)
}
}
qc_parse_result_t qc_parse(GWBUF* query)
qc_parse_result_t qc_parse(GWBUF* query, uint32_t collect)
{
QC_TRACE();
ss_dassert(classifier);
int32_t result = QC_QUERY_INVALID;
classifier->qc_parse(query, &result);
classifier->qc_parse(query, collect, &result);
return (qc_parse_result_t)result;
}