diff options
author | Monty <monty@mariadb.org> | 2020-11-24 16:44:51 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-11-26 19:13:37 +0200 |
commit | 55f734ed878f2e2e3ad1ca31838b85039e6d67c4 (patch) | |
tree | a6cbcc477fe01ac28afbaf0ded341a6859396042 /sql/field.cc | |
parent | c8992fc35be7db8dde588232827da5fdc0f9372f (diff) | |
download | mariadb-git-55f734ed878f2e2e3ad1ca31838b85039e6d67c4.tar.gz |
Change to LONGLONG_BUFFER_SIZE usage to avoid extra mallocs
This change is needed in 10.5 to avoid extra malloc calls in val_str().
In 10.6 it's not needed anymore but the extra +1 byte doesn't harm
that much.
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/field.cc b/sql/field.cc index fe3aebce05d..2173670572d 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1085,7 +1085,7 @@ Field_longstr::make_packed_sort_key_part(uchar *buff, uchar* Field_longstr::pack_sort_string(uchar *to, const SORT_FIELD_ATTR *sort_field) { - StringBuffer<LONGLONG_BUFFER_SIZE> buf; + StringBuffer<LONGLONG_BUFFER_SIZE+1> buf; val_str(&buf, &buf); return to + sort_field->pack_sort_string(to, &buf, field_charset()); } |