diff options
author | tim@threads.polyesthetic.msg <> | 2001-06-04 19:40:44 -0400 |
---|---|---|
committer | tim@threads.polyesthetic.msg <> | 2001-06-04 19:40:44 -0400 |
commit | 2326c7e4480554f3d886d294ead38d032e56d220 (patch) | |
tree | fbfed5bd873e54ac52807342f94ab406e5ce51b6 /client/mysqltest.c | |
parent | 6988b7476dd11648a68e4d32e9f49a65c4ca259c (diff) | |
parent | deaf03572921a54c534e467d2e697a78a1b20538 (diff) | |
download | mariadb-git-2326c7e4480554f3d886d294ead38d032e56d220.tar.gz |
Merge work:/home/bk/mysql-4.0
into threads.polyesthetic.msg:/home/tim/my/4
Diffstat (limited to 'client/mysqltest.c')
-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 e1ca5638340..f1fcae6bf6d 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1015,7 +1015,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; @@ -1366,6 +1367,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'}, @@ -1405,6 +1407,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\ @@ -1419,7 +1422,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) { @@ -1438,6 +1441,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) { |