diff --git a/query_classifier/test/canonical_tests/canonizer.c b/query_classifier/test/canonical_tests/canonizer.c index 21268b4dc..83604f059 100644 --- a/query_classifier/test/canonical_tests/canonizer.c +++ b/query_classifier/test/canonical_tests/canonizer.c @@ -7,26 +7,6 @@ #include #include -static char* server_options[] = -{ - "MariaDB Corporation MaxScale", - "--datadir=./", - "--language=./", - "--skip-innodb", - "--default-storage-engine=myisam", - NULL -}; - -const int num_elements = (sizeof(server_options) / sizeof(char *)) - 1; - -static char* server_groups[] = -{ - "embedded", - "server", - "server", - NULL -}; - int main(int argc, char** argv) { unsigned int psize; @@ -48,11 +28,8 @@ int main(int argc, char** argv) return 1; } - if (mysql_library_init(num_elements, server_options, server_groups)) - { - printf("Embedded server init failed.\n"); - return 1; - } + qc_init("qc_mysqlembedded"); + qc_thread_init(); infile = fopen(argv[1],"rb"); outfile = fopen(argv[2],"wb"); @@ -87,7 +64,7 @@ int main(int argc, char** argv) } fclose(infile); fclose(outfile); - mysql_library_end(); - + qc_thread_end(); + qc_end(); return 0; } diff --git a/query_classifier/test/classify.c b/query_classifier/test/classify.c index 35bd6bf25..c6512a3a3 100644 --- a/query_classifier/test/classify.c +++ b/query_classifier/test/classify.c @@ -8,25 +8,6 @@ #include #include -static char* server_options[] = { - "MariaDB Corporation MaxScale", - "--no-defaults", - "--datadir=.", - "--language=.", - "--skip-innodb", - "--default-storage-engine=myisam", - NULL -}; - -const int num_elements = (sizeof(server_options) / sizeof(char *)) - 1; - -static char* server_groups[] = { - "embedded", - "server", - "server", - NULL -}; - int main(int argc, char** argv) { if(argc < 3){ @@ -37,11 +18,8 @@ int main(int argc, char** argv) char buffer[1024], *strbuff = (char*)calloc(buffsz,sizeof(char)); FILE *input,*expected; - if(mysql_library_init(num_elements, server_options, server_groups)) - { - printf("Error: Cannot initialize Embedded Library."); - return 1; - } + qc_init("qc_mysqlembedded"); + qc_thread_init(); input = fopen(argv[1],"rb"); @@ -189,7 +167,8 @@ int main(int argc, char** argv) } fclose(input); fclose(expected); - mysql_library_end(); + qc_thread_end(); + qc_end(); free(strbuff); return ex_val; }