diff options
author | unknown <gluh@gluh.mysql.r18.ru> | 2003-03-11 13:52:19 +0400 |
---|---|---|
committer | unknown <gluh@gluh.mysql.r18.ru> | 2003-03-11 13:52:19 +0400 |
commit | f1662f3be98e95de065599497220a587fe3173c5 (patch) | |
tree | 32987b7040ee20fa95c8ca4e74562a8c2f3b9054 /client/mysqltest.c | |
parent | f26a8b6fb8b87c1ca28db36d5252ad7bf8b0f3d7 (diff) | |
parent | 3ab655681c4dc87226f3048a60d4ad3abf310f72 (diff) | |
download | mariadb-git-f1662f3be98e95de065599497220a587fe3173c5.tar.gz |
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.0
into gluh.mysql.r18.ru:/home/gluh/mysql-4.0.last
BitKeeper/etc/logging_ok:
auto-union
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r-- | client/mysqltest.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 320be18edad..4bc941e8b56 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -91,7 +91,9 @@ enum {OPT_MANAGER_USER=256,OPT_MANAGER_HOST,OPT_MANAGER_PASSWD, - OPT_MANAGER_PORT,OPT_MANAGER_WAIT_TIMEOUT, OPT_SKIP_SAFEMALLOC}; + OPT_MANAGER_PORT,OPT_MANAGER_WAIT_TIMEOUT, OPT_SKIP_SAFEMALLOC, + OPT_SSL_SSL, OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH, + OPT_SSL_CIPHER}; static int record = 0, opt_sleep=0; static char *db = 0, *pass=0; @@ -123,6 +125,8 @@ static int block_stack[BLOCK_STACK_DEPTH]; static int block_ok_stack[BLOCK_STACK_DEPTH]; static uint global_expected_errno[MAX_EXPECTED_ERRORS], global_expected_errors; +#include "sslopt-vars.h" + DYNAMIC_ARRAY q_lines; typedef struct @@ -1435,6 +1439,11 @@ int do_connect(struct st_query* q) mysql_options(&next_con->mysql,MYSQL_OPT_COMPRESS,NullS); mysql_options(&next_con->mysql, MYSQL_OPT_LOCAL_INFILE, 0); +#ifdef HAVE_OPENSSL + if (opt_use_ssl) + mysql_ssl_set(&next_con->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, + opt_ssl_capath, opt_ssl_cipher); +#endif if (con_sock && !free_con_sock && *con_sock && *con_sock != FN_LIBCHAR) con_sock=fn_format(buff, con_sock, TMPDIR, "",0); if (!con_db[0]) @@ -1833,6 +1842,7 @@ static struct my_option my_long_options[] = {"socket", 'S', "Socket file to use for connection.", (gptr*) &unix_sock, (gptr*) &unix_sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#include "sslopt-longopts.h" {"test-file", 'x', "Read test from/in this file (default stdin).", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"tmpdir", 't', "Temporary directory where sockets are put", @@ -1907,6 +1917,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), else tty_password= 1; break; +#include <sslopt-case.h> case 't': strnmov(TMPDIR, argument, sizeof(TMPDIR)); break; @@ -2354,6 +2365,11 @@ int main(int argc, char** argv) if (opt_compress) mysql_options(&cur_con->mysql,MYSQL_OPT_COMPRESS,NullS); mysql_options(&cur_con->mysql, MYSQL_OPT_LOCAL_INFILE, 0); +#ifdef HAVE_OPENSSL + if (opt_use_ssl) + mysql_ssl_set(&cur_con->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, + opt_ssl_capath, opt_ssl_cipher); +#endif cur_con->name = my_strdup("default", MYF(MY_WME)); if (!cur_con->name) |