Commit 2460d777 authored by unknown's avatar unknown

Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint

into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


client/mysql.cc:
  Manual merge.
parents 6a8dd4cc 15c7030d
...@@ -2334,9 +2334,14 @@ print_table_data(MYSQL_RES *result) ...@@ -2334,9 +2334,14 @@ print_table_data(MYSQL_RES *result)
(void) tee_fputs("|", PAGER); (void) tee_fputs("|", PAGER);
for (uint off=0; (field = mysql_fetch_field(result)) ; off++) for (uint off=0; (field = mysql_fetch_field(result)) ; off++)
{ {
tee_fprintf(PAGER, " %-*s |",(int) min(field->max_length, uint name_length= (uint) strlen(field->name);
uint numcells= charset_info->cset->numcells(charset_info,
field->name,
field->name + name_length);
uint display_length= field->max_length + name_length - numcells;
tee_fprintf(PAGER, " %-*s |",(int) min(display_length,
MAX_COLUMN_LENGTH), MAX_COLUMN_LENGTH),
field->name); field->name);
num_flag[off]= IS_NUM(field->type); num_flag[off]= IS_NUM(field->type);
not_null_flag[off]= IS_NOT_NULL(field->flags); not_null_flag[off]= IS_NOT_NULL(field->flags);
} }
......
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