diff options
author | Michael Widenius <monty@askmonty.org> | 2010-08-02 12:01:24 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-08-02 12:01:24 +0300 |
commit | e0a6b02c5d0a311e7167295494786077009743d1 (patch) | |
tree | 72c934fe42261ad5de3139961e092f57e9d147df /include/my_valgrind.h | |
parent | d2f8b7d04503478ab6b6998194a2070891f0c2bb (diff) | |
parent | 6ad06b15222300e4eed4fe3972d1ad249c4c42a2 (diff) | |
download | mariadb-git-e0a6b02c5d0a311e7167295494786077009743d1.tar.gz |
Merge with MySQL 5.1.49
Fixed Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins' in a better way (patch from Sergey Petrunya)
Diffstat (limited to 'include/my_valgrind.h')
-rw-r--r-- | include/my_valgrind.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/include/my_valgrind.h b/include/my_valgrind.h index 301f9f85464..da434454565 100644 --- a/include/my_valgrind.h +++ b/include/my_valgrind.h @@ -24,15 +24,19 @@ #if defined(HAVE_valgrind)&& defined(HAVE_VALGRIND_MEMCHECK_H) #include <valgrind/memcheck.h> -#else -#define VALGRIND_MAKE_MEM_DEFINED(addr, size) do { } while(0) -#define VALGRIND_MAKE_MEM_NOACCESS(addr, size) do { } while(0) +#define MEM_UNDEFINED(a,len) VALGRIND_MAKE_MEM_UNDEFINED(a,len) +#define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len) +#define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len) +#define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len) +#else /* HAVE_VALGRIND */ +# define MEM_UNDEFINED(a,len) ((void) 0) +# define MEM_NOACCESS(a,len) ((void) 0) +# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0) +# define MEM_CHECK_DEFINED(a,len) ((void) 0) +#endif /* HAVE_VALGRIND */ + #ifdef SAFEMALLOC -#define VALGRIND_MAKE_MEM_UNDEFINED(addr, size) bfill(addr, size, 0x8F) +#define TRASH(A,B) do { bfill(A, B, 0x8F); MEM_UNDEFINED(A, B); } while (0) #else -#define VALGRIND_MAKE_MEM_UNDEFINED(addr, size) do { } while(0) -#endif /* SAFEMALLOC */ -#endif /* HAVE_valgrind */ - -/* Compatibility with old source */ -#define TRASH(A,B) VALGRIND_MAKE_MEM_UNDEFINED(A, B) +#define TRASH(A,B) do{MEM_CHECK_ADDRESSABLE(A,B);MEM_UNDEFINED(A,B);} while (0) +#endif |