diff options
author | Magne Mahre <magne.mahre@sun.com> | 2009-11-04 13:20:02 +0100 |
---|---|---|
committer | Magne Mahre <magne.mahre@sun.com> | 2009-11-04 13:20:02 +0100 |
commit | 77b8e5d9b575a0f134fc43694871879cf4c9c27c (patch) | |
tree | f6d86ef81ec08939e0aa23d21d3f7888a1e90b0f /mysql-test/t/mysql.test | |
parent | 17a6040fbcaf1610ccd4d69fe3849a6fcb3d71a8 (diff) | |
download | mariadb-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 'mysql-test/t/mysql.test')
-rw-r--r-- | mysql-test/t/mysql.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 6e74e065720..8cc12c6a41f 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -367,6 +367,14 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug31060.sql; --enable_query_log # +# Bug#26780: patch to add auto vertical output option to the cli. +# +# Make this wide enough that it will wrap almost everywhere. +--exec $MYSQL test --auto-vertical-output --table -e "SELECT 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0;" +# Too short to wrap. +--exec $MYSQL test --auto-vertical-output --table -e "SELECT 1;" + +# # Bug #25146: Some warnings/errors not shown when using --show-warnings # |