mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Temporary commit of 10.0-merge
This commit is contained in:
@ -3339,9 +3339,9 @@ print_table_data(MYSQL_RES *result)
|
||||
{
|
||||
uint length= column_names ? field->name_length : 0;
|
||||
if (quick)
|
||||
length=max(length,field->length);
|
||||
length= MY_MAX(length,field->length);
|
||||
else
|
||||
length=max(length,field->max_length);
|
||||
length= MY_MAX(length,field->max_length);
|
||||
if (length < 4 && !IS_NOT_NULL(field->flags))
|
||||
length=4; // Room for "NULL"
|
||||
field->max_length=length;
|
||||
@ -3361,8 +3361,8 @@ print_table_data(MYSQL_RES *result)
|
||||
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),
|
||||
tee_fprintf(PAGER, " %-*s |",(int) MY_MIN(display_length,
|
||||
MAX_COLUMN_LENGTH),
|
||||
field->name);
|
||||
num_flag[off]= IS_NUM(field->type);
|
||||
}
|
||||
@ -3451,9 +3451,9 @@ static int get_field_disp_length(MYSQL_FIELD *field)
|
||||
uint length= column_names ? field->name_length : 0;
|
||||
|
||||
if (quick)
|
||||
length= max(length, field->length);
|
||||
length= MY_MAX(length, field->length);
|
||||
else
|
||||
length= max(length, field->max_length);
|
||||
length= MY_MAX(length, field->max_length);
|
||||
|
||||
if (length < 4 && !IS_NOT_NULL(field->flags))
|
||||
length= 4; /* Room for "NULL" */
|
||||
@ -3469,6 +3469,7 @@ static int get_field_disp_length(MYSQL_FIELD *field)
|
||||
|
||||
@returns The max number of characters in any row of this result
|
||||
*/
|
||||
|
||||
static int get_result_width(MYSQL_RES *result)
|
||||
{
|
||||
unsigned int len= 0;
|
||||
|
Reference in New Issue
Block a user