Commit 8f4d1026 authored by Jim Winstead's avatar Jim Winstead

The mysql command line client ignored the --skip-column-names option

when used in conjunction with --vertical. (Bug #47147, patch by
Harrison Fisk)
parent d6ca0cbb
......@@ -3510,6 +3510,7 @@ print_table_data_vertically(MYSQL_RES *result)
for (uint off=0; off < mysql_num_fields(result); off++)
{
field= mysql_fetch_field(result);
if (column_names)
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
if (cur[off])
{
......
......@@ -162,8 +162,8 @@ ERROR 1049 (42000) at line 1: Unknown database 'invalid'
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
Test connect with dbname + hostname
Test connect with dbname + _invalid_ hostname
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
The commands reported in the bug report
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
Too long dbname
......@@ -198,7 +198,7 @@ COUNT (*)
1
COUNT (*)
1
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
End of 5.0 tests
WARNING: --server-arg option not supported in this configuration.
Warning (Code 1286): Unknown table engine 'nonexistent'
......@@ -230,4 +230,9 @@ a: b
</resultset>
drop table t1;
Bug #47147: mysql client option --skip-column-names does not apply to vertical output
*************************** 1. row ***************************
1
End of tests
......@@ -401,5 +401,10 @@ insert into t1 values ('\0b\0');
--exec $MYSQL --xml test -e "select a from t1"
drop table t1;
--echo
--echo Bug #47147: mysql client option --skip-column-names does not apply to vertical output
--echo
--exec $MYSQL --skip-column-names --vertical test -e "select 1 as a"
--echo
--echo End of tests
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