diff options
author | unknown <monty@hundin.mysql.fi> | 2002-03-06 19:53:31 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-03-06 19:53:31 +0200 |
commit | b707a1ab6b3e1c1fed2570f91da0e22715542493 (patch) | |
tree | 2b4665ab89a9c440f5e2f451d1d745df1c15288d /client | |
parent | a5deff2bc90a17f4c3c19937b08660a78a085060 (diff) | |
parent | d6998363afc004fd92248af521ed40fa52027954 (diff) | |
download | mariadb-git-b707a1ab6b3e1c1fed2570f91da0e22715542493.tar.gz |
merge
BitKeeper/etc/logging_ok:
auto-union
Build-tools/Do-all-build-steps:
Auto merged
Build-tools/Do-compile:
Auto merged
Build-tools/Do-rpm:
Auto merged
Docs/manual.texi:
Auto merged
include/hash.h:
Auto merged
include/my_sys.h:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/t/type_date.test:
Auto merged
mysys/array.c:
Auto merged
mysys/hash.c:
Auto merged
mysys/mf_qsort.c:
Auto merged
scripts/mysqld_safe.sh:
Auto merged
scripts/mysqlhotcopy.sh:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql-bench/server-cfg.sh:
Auto merged
strings/Makefile.am:
Auto merged
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 769b4490096..941f06af529 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -38,7 +38,7 @@ #include <signal.h> #include <violite.h> -const char *VER="11.20"; +const char *VER="11.21"; /* Don't try to make a nice table if the data is too big */ #define MAX_COLUMN_LENGTH 1024 @@ -1886,10 +1886,17 @@ com_tee(String *buffer, char *line __attribute__((unused))) { while (isspace(*param)) param++; - end=strmake(file_name, param, sizeof(file_name)-1); + end= strend(param); while (end > file_name && (isspace(end[-1]) || iscntrl(end[-1]))) end--; - end[0]=0; + end[0]= 0; + if ((*(end - 1) == '"' && *param == '"') || + (*(end - 1) == '\'' && *param == '\'')) + { + *--end= 0; + param++; + } + strmake(file_name, param, sizeof(file_name) - 1); strmov(outfile, file_name); } if (!strlen(outfile)) @@ -1897,11 +1904,10 @@ com_tee(String *buffer, char *line __attribute__((unused))) printf("No outfile specified!\n"); return 0; } - if (!opt_outfile) - { - init_tee(); - opt_outfile=1; - } + if (opt_outfile) + end_tee(); + init_tee(); + opt_outfile= 1; tee_fprintf(stdout, "Logging to file '%s'\n", outfile); return 0; } |