mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Amend af784385b4
: Avoid vtable overhead
When neither MSAN nor Valgrind are enabled, declare Field::mark_unused_memory_as_defined() as an empty inline function, instead of declaring it as a virtual function.
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user