Perform query classifier initialization implicitly
The setting up and the initialization of the query classifier has now been separated. The gateway explicitly sets up the query classifier (i.e. chooses which one to use and what arguments to provide), but the actual initialization is performed as part of the general module initialization.
This commit is contained in:
@ -127,7 +127,7 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
if (mxs_log_init(NULL, ".", MXS_LOG_TARGET_DEFAULT))
|
||||
{
|
||||
if (qc_init(NULL, NULL))
|
||||
if (qc_setup(NULL, NULL) && qc_process_init())
|
||||
{
|
||||
const char* zModule = argv[1];
|
||||
|
||||
@ -157,6 +157,8 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
cerr << "error: Could not initialize factory." << endl;
|
||||
}
|
||||
|
||||
qc_process_end();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -237,10 +237,12 @@ int main()
|
||||
if (mxs_log_init(NULL, ".", MXS_LOG_TARGET_DEFAULT))
|
||||
{
|
||||
set_libdir(MXS_STRDUP_A("../../../../../query_classifier/qc_sqlite/"));
|
||||
if (qc_init("qc_sqlite", ""))
|
||||
if (qc_setup("qc_sqlite", "") && qc_process_init())
|
||||
{
|
||||
set_libdir(MXS_STRDUP_A("../"));
|
||||
rc = test();
|
||||
|
||||
qc_process_end();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -50,7 +50,7 @@ int TestStorage::run(int argc, char** argv)
|
||||
{
|
||||
if (mxs_log_init(NULL, ".", MXS_LOG_TARGET_DEFAULT))
|
||||
{
|
||||
if (qc_init(NULL, NULL))
|
||||
if (qc_setup(NULL, NULL) && qc_process_init())
|
||||
{
|
||||
const char* zModule = NULL;
|
||||
size_t threads = m_threads;
|
||||
|
||||
Reference in New Issue
Block a user