From e68a21750a6e17015341329e50f12726177358d0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 13 Feb 2013 10:10:07 +0100 Subject: mysql 5.6, first work --- mysql-embedded-check.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 mysql-embedded-check.c (limited to 'mysql-embedded-check.c') diff --git a/mysql-embedded-check.c b/mysql-embedded-check.c new file mode 100644 index 0000000..8bf8ca5 --- /dev/null +++ b/mysql-embedded-check.c @@ -0,0 +1,26 @@ +/* simple test program to see if we can link the embedded server library */ + +#include +#include +#include + +#include "mysql.h" + +MYSQL *mysql; + +static char *server_options[] = \ + { "mysql_test", "--defaults-file=my.cnf", NULL }; +int num_elements = (sizeof(server_options) / sizeof(char *)) - 1; + +static char *server_groups[] = { "libmysqld_server", + "libmysqld_client", NULL }; + +int main(int argc, char **argv) +{ + mysql_library_init(num_elements, server_options, server_groups); + mysql = mysql_init(NULL); + mysql_close(mysql); + mysql_library_end(); + + return 0; +} -- cgit