diff options
author | Daniel Black <daniel@mariadb.org> | 2021-03-23 18:16:20 +1100 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2021-03-26 07:58:49 +1100 |
commit | bcb9ca41053aa3db8d4d04d9d11dcd176b1a23e9 (patch) | |
tree | f99837b5dfaf1dd0b40ebda05739ba73e4381bfc /sql/field.cc | |
parent | e731a283942c3ec2386d79b639317131645caa1e (diff) | |
download | mariadb-git-bcb9ca41053aa3db8d4d04d9d11dcd176b1a23e9.tar.gz |
MEM_CHECK_DEFINED: replace HAVE_valgrindbb-10.5-danielblack-clang-valgrind-without-memcheck_h
HAVE_valgrind_or_MSAN to HAVE_valgrind was incorrect in
af784385b4a2b286000fa2c658e34283fe7bba60.
In my_valgrind.h when clang exists (hence no __has_feature(memory_sanitizer),
and -DWITH_VALGRIND=1, but without memcheck.h, we end up with a MEM_CHECK_DEFINED
being empty.
If we are also doing a CMAKE_BUILD_TYPE=Debug this results a number of
[-Werror,-Wunused-variable] errors because MEM_CHECK_DEFINED is empty.
With MEM_CHECK_DEFINED empty, there becomes no uses of this of the
fixed field and innodb variables in this patch.
So we stop using HAVE_valgrind as catchall and use the name
HAVE_CHECK_MEM to indicate that a CHECK_MEM_DEFINED function exists.
Reviewer: Monty
Corrects: af784385b4a2b286000fa2c658e34283fe7bba60
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 52074417046..5ea43df1a7e 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -7854,7 +7854,7 @@ bool Field_varstring::send(Protocol *protocol) } -#ifdef HAVE_valgrind +#ifdef HAVE_MEM_CHECK void Field_varstring::mark_unused_memory_as_defined() { uint used_length= get_length(); |