MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mysql-embedded-check.c
1 /* simple test program to see if we can link the embedded server library */
2 
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <stdarg.h>
6 
7 #include "mysql.h"
8 
9 MYSQL *mysql;
10 
11 static char *server_options[] = \
12  { "mysql_test", "--defaults-file=my.cnf", NULL };
13 int num_elements = (sizeof(server_options) / sizeof(char *)) - 1;
14 
15 static char *server_groups[] = { "libmysqld_server",
16  "libmysqld_client", NULL };
17 
18 int main(int argc, char **argv)
19 {
20  mysql_library_init(num_elements, server_options, server_groups);
21  mysql = mysql_init(NULL);
22  mysql_close(mysql);
23  mysql_library_end();
24 
25  return 0;
26 }