summaryrefslogtreecommitdiff
path: root/client/client_priv.h
diff options
context:
space:
mode:
authorMagne Mahre <magne.mahre@sun.com>2009-11-04 13:20:02 +0100
committerMagne Mahre <magne.mahre@sun.com>2009-11-04 13:20:02 +0100
commit77b8e5d9b575a0f134fc43694871879cf4c9c27c (patch)
treef6d86ef81ec08939e0aa23d21d3f7888a1e90b0f /client/client_priv.h
parent17a6040fbcaf1610ccd4d69fe3849a6fcb3d71a8 (diff)
downloadmariadb-git-77b8e5d9b575a0f134fc43694871879cf4c9c27c.tar.gz
Bug#26780: automatic vertical output for wide results
Feature from Eric Bergen, CLA signed 2007-06-27. Adds new mysql client option "--auto-vertical-output", which causes the client to test whether a result table is too wide for the current window (where available) and emit vertical results in that case. Otherwise, it sends normal tabular results. client/client_priv.h: Add another enum value to client options, for automatic vertical output. client/mysql.cc: Add another command-line option, "auto-vertical-output". Add functions to get the terminal width and functions to get the widths of fields. Use them together to emit vertical output when some output table is too wide to fit in the terminal. If the terminal doesn't support reading its width, then assume 80-positions wide. mysql-test/r/mysql.result: Show that various select statements do work as expected. Wide tables become vertical and narrow ones do not. mysql-test/t/mysql.test: Show that various select statements do work as expected. These should be suitable for a wide range of window capabilities and sizes. Under extreme circumstances, the results could be arbitrary.
Diffstat (limited to 'client/client_priv.h')
-rw-r--r--client/client_priv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/client/client_priv.h b/client/client_priv.h
index e99d34ffa97..c24e125e200 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -78,6 +78,7 @@ enum options_client
OPT_SLAP_DETACH,
OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT_MODE, OPT_SERVER_ID,
OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
+ OPT_AUTO_VERTICAL_OUTPUT,
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
OPT_WRITE_BINLOG, OPT_DUMP_DATE,
OPT_INIT_COMMAND,