1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Add some examples for using libmysqld, including a hack for running the

mysql test suite.

A few minor libmysqld fixes.

Add mysql_server_init() and _end() to mysql.cc and mysqltest.c, so they
can be linked against libmysqlclient or libmysqld.


sql/mysqld.cc:
  have unireg_end() exit(), instead of pthread_exit()
  if inside the EMBEDDED_LIBRARY.  This is a hack
  which hopefully won't be needed.  But without it,
  the program hangs at end.
client/mysql.cc:
  Don't call mysql_ssl_clear() unless HAVE_OPENSSL.
client/mysqltest.c:
  Add mysql_server_init() and _end().
acinclude.m4:
  change .. to $(top_builddir) in innodb_libs
Makefile.am:
  Add libmysqld/examples to link_sources target
configure.in:
  output libmysqld/examples/Makefile
  Also, change .. to $(top_builddir) in readline_link
BitKeeper/etc/ignore:
  added linked_libmysqldex_sources
mysql-test/mysql-test-run.sh:
  use latin1, not latin1_de, in tests
libmysqld/libmysqld.c:
  Add replication functions.
This commit is contained in:
unknown
2001-09-16 21:41:22 -04:00
parent 34925f8d82
commit 5fffbb1236
11 changed files with 538 additions and 41 deletions

View File

@ -1931,12 +1931,26 @@ static void init_var_hash()
var_from_env("BIG_TEST", opt_big_test ? "1" : "0");
}
static const char *embedded_server_args[] = {
"", /* XXX: argv[0] is program name - we should fix the API */
"--datadir=.",
"--language=/home/tim/my/4/sql/share/english",
"--skip-innodb",
NullS
};
static const char *embedded_server_groups[] = {
"mysql-test-server",
NullS
};
int main(int argc, char** argv)
{
int error = 0;
struct st_query* q;
my_bool require_file=0, q_send_flag=0;
char save_file[FN_REFLEN];
mysql_server_init(sizeof(embedded_server_args) / sizeof(char *) - 1,
embedded_server_args, embedded_server_groups);
MY_INIT(argv[0]);
save_file[0]=0;
@ -2100,6 +2114,7 @@ int main(int argc, char** argv)
printf("ok\n");
}
mysql_server_end();
free_used_memory();
exit(error ? 1 : 0);
return error ? 1 : 0; /* Keep compiler happy */