diff options
author | tim@black.box <> | 2001-09-16 21:41:22 -0400 |
---|---|---|
committer | tim@black.box <> | 2001-09-16 21:41:22 -0400 |
commit | e6e25a567b49ca594704c2028d1be30d8919615e (patch) | |
tree | 7ff6a4243043fa71bd04fa3434bd8e13992df771 /client/mysqltest.c | |
parent | fa23b20789dc271de6b2638fbea0ccefc333c872 (diff) | |
download | mariadb-git-e6e25a567b49ca594704c2028d1be30d8919615e.tar.gz |
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.
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r-- | client/mysqltest.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index f269dd373c6..c70c371af3c 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -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 */ |