diff options
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/field.cc b/sql/field.cc index 9ab76aa37a4..d1bd5860f06 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2017, Oracle and/or its affiliates. - Copyright (c) 2008, 2017, MariaDB + Copyright (c) 2008, 2020, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -7772,11 +7772,14 @@ my_decimal *Field_varstring::val_decimal(my_decimal *decimal_value) } + +#ifdef HAVE_valgrind_or_MSAN void Field_varstring::mark_unused_memory_as_defined() { - uint used_length __attribute__((unused)) = get_length(); + uint used_length= get_length(); MEM_MAKE_DEFINED(get_data() + used_length, field_length - used_length); } +#endif int Field_varstring::cmp_max(const uchar *a_ptr, const uchar *b_ptr, |