diff options
author | unknown <monty@hundin.mysql.fi> | 2001-06-05 03:48:25 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-06-05 03:48:25 +0300 |
commit | d82a86e61b04c0d78a3216d97a346c24bd2dd218 (patch) | |
tree | c3801de3a55a3908dafdbc48f1bb034307fc85fc /client | |
parent | fe1842d9ee1a7e51f74ca192d3181968f16a0b29 (diff) | |
parent | 011b141574d8b4c07b9f6b0f8c2f44b18d751646 (diff) | |
download | mariadb-git-d82a86e61b04c0d78a3216d97a346c24bd2dd218.tar.gz |
merge
client/mysqltest.c:
Auto merged
sql/mysqld.cc:
Auto merged
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 12d8ed2ca18..160f5c9d092 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1018,7 +1018,8 @@ int do_connect(struct st_query* q) if (!mysql_init(&next_con->mysql)) die("Failed on mysql_init()"); - con_sock=fn_format(buff, con_sock, TMPDIR, "",0); + if (con_sock) + con_sock=fn_format(buff, con_sock, TMPDIR, "",0); if (!con_db[0]) con_db=db; con_error = 1; @@ -1369,6 +1370,7 @@ struct option long_options[] = {"silent", no_argument, 0, 'q'}, {"sleep", required_argument, 0, 'T'}, {"socket", required_argument, 0, 'S'}, + {"test-file", required_argument, 0, 'x'}, {"tmpdir", required_argument, 0, 't'}, {"user", required_argument, 0, 'u'}, {"verbose", no_argument, 0, 'v'}, @@ -1408,6 +1410,7 @@ void usage() -T, --sleep=# Sleep always this many seconds on sleep commands\n\ -r, --record Record output of test_file into result file.\n\ -R, --result-file=... Read/Store result from/in this file.\n\ + -x, --test-file=... Read test from/in this file (default stdin).\n\ -v, --verbose Write more.\n\ -q, --quiet, --silent Suppress all normal output.\n\ -V, --version Output version information and exit.\n\ @@ -1422,7 +1425,7 @@ int parse_args(int argc, char **argv) load_defaults("my",load_default_groups,&argc,&argv); default_argv= argv; - while((c = getopt_long(argc, argv, "h:p::u:P:D:S:R:t:T:#:?rvVq", + while((c = getopt_long(argc, argv, "h:p::u:P:D:S:R:x:t:T:#:?rvVq", long_options, &option_index)) != EOF) { switch(c) { @@ -1441,6 +1444,10 @@ int parse_args(int argc, char **argv) case 'R': result_file = optarg; break; + case 'x': + if (!(*cur_file = my_fopen(optarg, O_RDONLY, MYF(MY_WME)))) + die("Could not open %s: errno = %d", optarg, errno); + break; case 'p': if (optarg) { |