ganapathi / rpms / mariadb

Forked from rpms/mariadb 3 years ago
Clone
4b7078
/* simple test program to see if we can link the embedded server library */
4b7078
4b7078
#include <stdio.h>
4b7078
#include <stdlib.h>
4b7078
#include <stdarg.h>
4b7078
4b7078
#include "mysql.h"
4b7078
4b7078
MYSQL *mysql;
4b7078
4b7078
static char *server_options[] = \
4b7078
       { "mysql_test", "--defaults-file=my.cnf", NULL };
4b7078
int num_elements = (sizeof(server_options) / sizeof(char *)) - 1;
4b7078
4b7078
static char *server_groups[] = { "libmysqld_server", 
4b7078
                                 "libmysqld_client", NULL };
4b7078
4b7078
int main(int argc, char **argv)
4b7078
{
4b7078
   mysql_library_init(num_elements, server_options, server_groups);
4b7078
   mysql = mysql_init(NULL);
4b7078
   mysql_close(mysql);
4b7078
   mysql_library_end();
4b7078
4b7078
   return 0;
4b7078
}