diff options
author | unknown <tim@threads.polyesthetic.msg> | 2001-06-04 18:34:04 -0400 |
---|---|---|
committer | unknown <tim@threads.polyesthetic.msg> | 2001-06-04 18:34:04 -0400 |
commit | bc0befda9cc4a26deac21cd59cfd96c8d3355edb (patch) | |
tree | d1a1e436c5691d8f33e00c6966b99fe986110ece /client | |
parent | 020160f83f62d6171c57a4021e21e68049c2a4e8 (diff) | |
download | mariadb-git-bc0befda9cc4a26deac21cd59cfd96c8d3355edb.tar.gz |
Various changes to get libmysqld in sync with latest sources.
BitKeeper/etc/ignore:
Added libmysqld/uniques.cc
client/mysqltest.c:
Don't core dump if --socket isn't specified.
Add --test-file option, to facilitate running mysqltest under debugger.
libmysqld/Makefile.am:
We need uniques.cc
libmysqld/lib_sql.cc:
Tiny cleanup.
libmysqld/libmysqld.c:
Split mysql_real_query() into mysql_send_query() and
mysql_read_query_results().
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 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) { |