summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysql.cc2
-rw-r--r--mysql-test/r/mysql.result4
-rw-r--r--mysql-test/t/mysql.test5
3 files changed, 10 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);
diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result
index 4d2ac25a0eb..cb705d285fe 100644
--- a/mysql-test/r/mysql.result
+++ b/mysql-test/r/mysql.result
@@ -515,5 +515,9 @@ aa`bb``cc
drop database `aa``bb````cc`;
a
>>\ndelimiter\n<<
++-------------------+
+| a |
+| aaaaaaaaaaaaaaaaa |
++-------------------+
End of tests
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index 9187cf82513..6281bb5f4c1 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -603,5 +603,10 @@ delimiter
EOF
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/13639125.sql
+#
+# --skip-column-names and alignment
+#
+--exec $MYSQL -t -N -e "SELECT 'a' union select 'aaaaaaaaaaaaaaaaa'"
+
--echo
--echo End of tests