Allow query classifier to initialize itself

The process and thread initialization/finalization of the query
classifier plugins is handled using the process and thread
initialization/finalization functions in the module object.

However, the top-level query classifier will also need to perform
process and thread initialization when transaction boundaries are
detected using regular expressions.
This commit is contained in:
Johan Wikman
2017-03-10 14:01:36 +02:00
parent 669d6e95f4
commit a58f944f23
8 changed files with 68 additions and 25 deletions

View File

@ -41,7 +41,7 @@ int main()
set_libdir(strdup("../qc_sqlite"));
if (qc_setup("qc_sqlite", NULL) && qc_process_init())
if (qc_setup("qc_sqlite", NULL) && qc_process_init(QC_INIT_BOTH))
{
const char s[] = "SELECT @@global.max_allowed_packet";
@ -53,7 +53,7 @@ int main()
// code generator.
qc_parse(stmt);
qc_process_end();
qc_process_end(QC_INIT_BOTH);
rv = EXIT_SUCCESS;
}