Commit 66f12372 authored by Jim Winstead's avatar Jim Winstead

The mysql command-line client would include superfluous spaces at the end of

some result set lines. (Bug #29622)
parent 85332062
...@@ -3319,6 +3319,9 @@ print_table_data(MYSQL_RES *result) ...@@ -3319,6 +3319,9 @@ print_table_data(MYSQL_RES *result)
uint visible_length; uint visible_length;
uint extra_padding; uint extra_padding;
if (off)
(void) tee_fputs(" ", PAGER);
if (cur[off] == NULL) if (cur[off] == NULL)
{ {
buffer= "NULL"; buffer= "NULL";
...@@ -3353,7 +3356,7 @@ print_table_data(MYSQL_RES *result) ...@@ -3353,7 +3356,7 @@ print_table_data(MYSQL_RES *result)
else else
tee_print_sized_data(buffer, data_length, field_max_length+extra_padding, FALSE); tee_print_sized_data(buffer, data_length, field_max_length+extra_padding, FALSE);
} }
tee_fputs(" | ", PAGER); tee_fputs(" |", PAGER);
} }
(void) tee_fputs("\n", PAGER); (void) tee_fputs("\n", PAGER);
} }
......
...@@ -64,28 +64,28 @@ drop table t1; ...@@ -64,28 +64,28 @@ drop table t1;
+----------------------+------------+--------+ +----------------------+------------+--------+
| concat('>',col1,'<') | col2 | col3 | | concat('>',col1,'<') | col2 | col3 |
+----------------------+------------+--------+ +----------------------+------------+--------+
| >a < | b | 123421 | | >a < | b | 123421 |
| >a < | 0123456789 | 4 | | >a < | 0123456789 | 4 |
| >abcd< | | 4 | | >abcd< | | 4 |
+----------------------+------------+--------+ +----------------------+------------+--------+
+-------------------+ +-------------------+
| __tañgè Ñãmé | | __tañgè Ñãmé |
+-------------------+ +-------------------+
| John Doe | | John Doe |
+-------------------+ +-------------------+
+-------------------+ +-------------------+
| John Doe | | John Doe |
+-------------------+ +-------------------+
| __tañgè Ñãmé | | __tañgè Ñãmé |
+-------------------+ +-------------------+
+------+------+---------------------------+ +------+------+---------------------------+
| i | j | k | | i | j | k |
+------+------+---------------------------+ +------+------+---------------------------+
| 1 | NULL | NULL | | 1 | NULL | NULL |
| NULL | NULL | <-----------------------> | | NULL | NULL | <-----------------------> |
| NULL | NULL | <----- | | NULL | NULL | <----- |
| NULL | NULL | Τη γλώσσα | | NULL | NULL | Τη γλώσσα |
| NULL | NULL | ᛖᚴ ᚷᛖᛏ | | NULL | NULL | ᛖᚴ ᚷᛖᛏ |
+------+------+---------------------------+ +------+------+---------------------------+
i j k i j k
NULL 1 NULL NULL 1 NULL
...@@ -96,14 +96,14 @@ k int(11) YES NULL ...@@ -96,14 +96,14 @@ k int(11) YES NULL
+------+---+------+ +------+---+------+
| i | j | k | | i | j | k |
+------+---+------+ +------+---+------+
| NULL | 1 | NULL | | NULL | 1 | NULL |
+------+---+------+ +------+---+------+
+-------+---------+------+-----+---------+-------+ +-------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra | | Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+ +-------+---------+------+-----+---------+-------+
| i | int(11) | YES | | NULL | | | i | int(11) | YES | | NULL | |
| j | int(11) | NO | | NULL | | | j | int(11) | NO | | NULL | |
| k | int(11) | YES | | NULL | | | k | int(11) | YES | | NULL | |
+-------+---------+------+-----+---------+-------+ +-------+---------+------+-----+---------+-------+
i s1 i s1
1 x 1 x
...@@ -112,16 +112,16 @@ i s1 ...@@ -112,16 +112,16 @@ i s1
+------+------+ +------+------+
| i | s1 | | i | s1 |
+------+------+ +------+------+
| 1 | x | | 1 | x |
| 2 | NULL | | 2 | NULL |
| 3 | | | 3 | |
+------+------+ +------+------+
unhex('zz') unhex('zz')
NULL NULL
+-------------+ +-------------+
| unhex('zz') | | unhex('zz') |
+-------------+ +-------------+
| NULL | | NULL |
+-------------+ +-------------+
create table t1(a int, b varchar(255), c int); create table t1(a int, b varchar(255), c int);
Field Type Null Key Default Extra Field Type Null Key Default Extra
......
...@@ -5,45 +5,45 @@ ...@@ -5,45 +5,45 @@
+----------+--------+ +----------+--------+
| expected | result | | expected | result |
+----------+--------+ +----------+--------+
| 2 | 2 | | 2 | 2 |
+----------+--------+ +----------+--------+
+----------+--------+ +----------+--------+
| expected | result | | expected | result |
+----------+--------+ +----------+--------+
| 1 | 1 | | 1 | 1 |
+----------+--------+ +----------+--------+
+----------+--------+ +----------+--------+
| expected | result | | expected | result |
+----------+--------+ +----------+--------+
| 3 | 3 | | 3 | 3 |
+----------+--------+ +----------+--------+
+----------+--------+ +----------+--------+
| expected | result | | expected | result |
+----------+--------+ +----------+--------+
| 2 | 2 | | 2 | 2 |
+----------+--------+ +----------+--------+
+----------+--------+ +----------+--------+
| expected | result | | expected | result |
+----------+--------+ +----------+--------+
| 7 | 7 | | 7 | 7 |
+----------+--------+ +----------+--------+
+----------+--------+ +----------+--------+
| expected | result | | expected | result |
+----------+--------+ +----------+--------+
| 8 | 8 | | 8 | 8 |
+----------+--------+ +----------+--------+
+----------+--------+ +----------+--------+
| expected | result | | expected | result |
+----------+--------+ +----------+--------+
| 7 | 7 | | 7 | 7 |
+----------+--------+ +----------+--------+
+----------+--------+ +----------+--------+
| expected | result | | expected | result |
+----------+--------+ +----------+--------+
| 4 | 4 | | 4 | 4 |
+----------+--------+ +----------+--------+
+----------+--------+ +----------+--------+
| expected | result | | expected | result |
+----------+--------+ +----------+--------+
| 4 | 4 | | 4 | 4 |
+----------+--------+ +----------+--------+
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment