Description:
When many columns are selected, the total padding spaces added in each column will make the width of each line too long to display, it will be displayed as 2+ lines in DOS window. If padding spaces are removed, it will reduce the width of output line.
Example:
[code]
-- With padding spaces
+--------+----------+---------+-------------------+---------------------+-------+---------------------+---------------------+----+------+----+
| server | callid | ani | dnis | begin | alert | conct | end | 通 | 长 | 挂 |
+--------+----------+---------+-------------------+---------------------+-------+---------------------+---------------------+----+------+----+
| 3.6 | 14787496 | 2196877 | 702165921035 | 2008-10-30 15:54:36 | NULL | NULL | 0000-00-00 00:00:00 | | 0 | 0 |
| 3.6 | 14787495 | 2196877 | *018702165921035 | 2008-10-30 15:54:36 | NULL | 2008-10-30 15:54:36 | 0000-00-00 00:00:00 | | 0 | 0 |
+--------+----------+---------+-------------------+---------------------+-------+---------------------+---------------------+----+------+----+
-- Without padding spaces
+------+--------+-------+-----------------+-------------------+-----+-------------------+-------------------+--+----+--+
|server|callid |ani |dnis |begin |alert|conct |end |通|长 |挂|
+------+--------+-------+-----------------+-------------------+-----+-------------------+-------------------+--+----+--+
|3.6 |14787496|2196877|702165921035 |2008-10-30 15:54:36|NULL |NULL |0000-00-00 00:00:00| | 0| 0|
|3.6 |14787495|2196877|*018702165921035 |2008-10-30 15:54:36|NULL |2008-10-30 15:54:36|0000-00-00 00:00:00| | 0| 0|
+------+--------+-------+-----------------+-------------------+-----+-------------------+-------------------+--+----+--+
[/code]
How to repeat:
issue a SELECT command in mysql.exe, such as:
select now(), now(), now(), now(), now(), now(), now(), now()
Suggested fix:
add an option to add/remove the padding space
if default behaviour of mysql.exe is WITH_PADDING_SPACE, then add a --remove-padding-spaces option
if default behaviour of mysql.exe is WITHOUT_PADDING_SPACE, then add a --add-padding-spaces option