List:Commits« Previous MessageNext Message »
From:Jim Winstead Date:September 21 2009 10:21pm
Subject:bzr commit into mysql-5.1-bugteam branch (jimw:3113) Bug#47147
View as plain text  
#At file:///Users/jimw/my/mysql-5.1--bug47147/ based on revid:staale.smedseng@stripped

 3113 Jim Winstead	2009-09-21
      The mysql command line client ignored the --skip-column-names option
      when used in conjunction with --vertical. (Bug #47147, patch by
      Harrison Fisk)

    modified:
      client/mysql.cc
      mysql-test/r/mysql.result
      mysql-test/t/mysql.test
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2009-08-28 16:21:54 +0000
+++ b/client/mysql.cc	2009-09-21 22:20:14 +0000
@@ -3510,7 +3510,8 @@ print_table_data_vertically(MYSQL_RES *r
     for (uint off=0; off < mysql_num_fields(result); off++)
     {
       field= mysql_fetch_field(result);
-      tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
+      if (column_names)
+        tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
       if (cur[off])
       {
         unsigned int i;

=== modified file 'mysql-test/r/mysql.result'
--- a/mysql-test/r/mysql.result	2009-07-31 23:43:46 +0000
+++ b/mysql-test/r/mysql.result	2009-09-21 22:20:14 +0000
@@ -162,8 +162,8 @@ ERROR 1049 (42000) at line 1: Unknown da
 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

=== modified file 'mysql-test/t/mysql.test'
--- a/mysql-test/t/mysql.test	2009-07-31 00:51:25 +0000
+++ b/mysql-test/t/mysql.test	2009-09-21 22:20:14 +0000
@@ -402,4 +402,9 @@ insert into t1 values ('\0b\0');
 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


Attachment: [text/bzr-bundle] bzr/jimw@mysql.com-20090921222014-sg73favxqnc0ipfa.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (jimw:3113) Bug#47147Jim Winstead22 Sep