ganapathi / rpms / mariadb

Forked from rpms/mariadb 4 years ago
Clone

Blame SOURCES/mysql-embedded-check.c

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