Commit 7beb8ff2 authored by Alexander Barkov's avatar Alexander Barkov

A --ps cleanup for MDEV-12658 Make the third parameter to LPAD and RPAD optional

"mtr --ps func_str" failed:
pad_str was erroneously appended with a new space on every PS execution.

Adding pad_str.length(0) into fix_length_and_dec() to avoid this.
parent 533506b4
......@@ -3187,6 +3187,7 @@ void Item_func_pad::fix_length_and_dec()
if (agg_arg_charsets_for_string_result(collation, &args[0], 1, 1))
return;
pad_str.set_charset(collation.collation);
pad_str.length(0);
pad_str.append(" ", 1);
}
......
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