1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

Merge branch '10.6' into 10.11

This commit is contained in:
Oleksandr Byelkin
2024-08-29 12:14:44 +02:00
6 changed files with 138 additions and 1 deletions

View File

@@ -255,6 +255,7 @@ static my_bool column_types_flag;
static my_bool preserve_comments= 0;
static my_bool in_com_source, aborted= 0;
static ulong opt_max_allowed_packet, opt_net_buffer_length;
unsigned long quick_max_column_width= LONG_MAX;
static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0;
static uint my_end_arg;
static char * opt_mysql_unix_port=0;
@@ -1815,6 +1816,10 @@ static struct my_option my_long_options[] =
"Don't cache result, print it row by row. This may slow down the server "
"if the output is suspended. Doesn't use history file.",
&quick, &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"quick-max-column-width", 0,
"Maximal field length limit in case of --qick", &quick_max_column_width,
&quick_max_column_width, 0, GET_ULONG, REQUIRED_ARG, LONG_MAX, 0, ULONG_MAX,
0, 1, 0},
{"raw", 'r', "Write fields without conversion. Used with --batch.",
&opt_raw_data, &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"reconnect", 0, "Reconnect if the connection is lost.",
@@ -3867,7 +3872,7 @@ print_table_data(MYSQL_RES *result)
{
uint length= column_names ? field->name_length : 0;
if (quick)
length= MY_MAX(length,field->length);
length= MY_MAX(length, MY_MIN(field->length, quick_max_column_width));
else
length= MY_MAX(length,field->max_length);
if (length < 4 && !IS_NOT_NULL(field->flags))