diff options
author | unknown <jani@hynda.mysql.fi> | 2001-04-11 06:17:20 +0300 |
---|---|---|
committer | unknown <jani@hynda.mysql.fi> | 2001-04-11 06:17:20 +0300 |
commit | a5052f001bd138a02e1075d5f7ba87742fbbe275 (patch) | |
tree | cd1b3ac584b4b7820e36bca45bd633e28c52bae4 /client/mysql.cc | |
parent | 0c971641774f4d06f5442ef23af5d8c7ef9058ab (diff) | |
download | mariadb-git-a5052f001bd138a02e1075d5f7ba87742fbbe275.tar.gz |
Fixed a bug in pager, + added a feature to it.
client/mysql.cc:
Fixed a bug in pager + added feature that the default
pager will be the last one used. This is invoked in mysql
client monitor with pager command without argument.
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 8935e459f68..ce4a351bdbe 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -39,7 +39,7 @@ #include "my_readline.h" #include <signal.h> -const char *VER="11.13"; +const char *VER="11.14"; /* Don't try to make a nice table if the data is too big */ #define MAX_COLUMN_LENGTH 1024 @@ -592,7 +592,16 @@ static int get_options(int argc, char **argv) if (optarg) strmov(pager, optarg); else - strmov(pager, (char*) getenv("PAGER")); + { + char *pagpoint = getenv("PAGER"); + if (!((char*) (pagpoint))) + { + strmov(pager, "stdout"); + opt_nopager=1; + } + else + strmov(pager, pagpoint); + } strmov(default_pager, pager); break; case OPT_NOPAGER: @@ -1823,6 +1832,7 @@ com_pager(String *buffer, char *line __attribute__((unused))) end--; end[0]=0; strmov(pager, pager_name); + strmov(default_pager, pager_name); } opt_nopager=0; tee_fprintf(stdout, "PAGER set to %s\n", pager); |