diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-08-08 13:33:15 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-08-08 13:33:15 +0200 |
commit | b718dc449bfc6aa5756a316d4db8853918765619 (patch) | |
tree | 4a3ae2986e4a3787ebf609c4b14983ef83916c6c /client | |
parent | cafe9d13f64924c17a4fc67704d25ee78f49cb35 (diff) | |
download | mariadb-git-b718dc449bfc6aa5756a316d4db8853918765619.tar.gz |
mysql --skip-column-names flag should not affect alignment of field values,
set num_flag[] unconditionally, not under "if (column_names)"
http://ronaldbradford.com/blog/unexplained-trivial-mysql-behavior-2013-08-02/
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index e9e21c0289d..e3885422563 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -3510,6 +3510,7 @@ print_table_data(MYSQL_RES *result) if (length < 4 && !IS_NOT_NULL(field->flags)) length=4; // Room for "NULL" field->max_length=length; + num_flag[mysql_field_tell(result) - 1]= IS_NUM(field->type); separator.fill(separator.length()+length+2,'-'); separator.append('+'); } @@ -3529,7 +3530,6 @@ print_table_data(MYSQL_RES *result) tee_fprintf(PAGER, " %-*s |",(int) min(display_length, MAX_COLUMN_LENGTH), field->name); - num_flag[off]= IS_NUM(field->type); } (void) tee_fputs("\n", PAGER); tee_puts((char*) separator.ptr(), PAGER); |