|
|
|
@ -97,7 +97,7 @@ static my_bool sp_protocol= 0, sp_protocol_enabled= 0; |
|
|
|
static my_bool view_protocol= 0, view_protocol_enabled= 0; |
|
|
|
static my_bool cursor_protocol= 0, cursor_protocol_enabled= 0; |
|
|
|
static my_bool parsing_disabled= 0; |
|
|
|
static my_bool display_result_vertically= FALSE, |
|
|
|
static my_bool display_result_vertically= FALSE, display_result_lower= FALSE, |
|
|
|
display_metadata= FALSE, display_result_sorted= FALSE; |
|
|
|
static my_bool disable_query_log= 0, disable_result_log= 0; |
|
|
|
static my_bool disable_warnings= 0; |
|
|
|
@ -272,6 +272,7 @@ enum enum_commands { |
|
|
|
Q_DISABLE_ABORT_ON_ERROR, Q_ENABLE_ABORT_ON_ERROR, |
|
|
|
Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS, |
|
|
|
Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL, Q_SORTED_RESULT, |
|
|
|
Q_LOWERCASE, |
|
|
|
Q_START_TIMER, Q_END_TIMER, |
|
|
|
Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL, |
|
|
|
Q_DISABLE_RECONNECT, Q_ENABLE_RECONNECT, |
|
|
|
@ -346,6 +347,7 @@ const char *command_names[]= |
|
|
|
"query_vertical", |
|
|
|
"query_horizontal", |
|
|
|
"sorted_result", |
|
|
|
"lowercase_result", |
|
|
|
"start_timer", |
|
|
|
"end_timer", |
|
|
|
"character_set", |
|
|
|
@ -7876,6 +7878,13 @@ int main(int argc, char **argv) |
|
|
|
*/ |
|
|
|
display_result_sorted= TRUE; |
|
|
|
break; |
|
|
|
case Q_LOWERCASE: |
|
|
|
/*
|
|
|
|
Turn on lowercasing of result, will be reset after next |
|
|
|
command |
|
|
|
*/ |
|
|
|
display_result_lower= TRUE; |
|
|
|
break; |
|
|
|
case Q_LET: do_let(command); break; |
|
|
|
case Q_EVAL_RESULT: |
|
|
|
die("'eval_result' command is deprecated"); |
|
|
|
@ -8091,8 +8100,9 @@ int main(int argc, char **argv) |
|
|
|
*/ |
|
|
|
free_all_replace(); |
|
|
|
|
|
|
|
/* Also reset "sorted_result" */ |
|
|
|
/* Also reset "sorted_result" and "lowercase"*/ |
|
|
|
display_result_sorted= FALSE; |
|
|
|
display_result_lower= FALSE; |
|
|
|
} |
|
|
|
last_command_executed= command_executed; |
|
|
|
|
|
|
|
@ -9496,6 +9506,18 @@ void replace_dynstr_append_mem(DYNAMIC_STRING *ds, |
|
|
|
fix_win_paths(val, len); |
|
|
|
#endif
|
|
|
|
|
|
|
|
if (display_result_lower) |
|
|
|
{ |
|
|
|
/* Convert to lower case, and do this first */ |
|
|
|
char lower[512]; |
|
|
|
char *c= lower; |
|
|
|
for (const char *v= val; *v; v++) |
|
|
|
*c++= my_tolower(charset_info, *v); |
|
|
|
*c= '\0'; |
|
|
|
/* Copy from this buffer instead */ |
|
|
|
val= lower; |
|
|
|
} |
|
|
|
|
|
|
|
if (glob_replace_regex) |
|
|
|
{ |
|
|
|
/* Regex replace */ |
|
|
|
|