From 3d1306f7b74077cfa197c8fa23baeb96c535af67 Mon Sep 17 00:00:00 2001 From: Ajo Robert Date: Thu, 7 Jan 2016 14:36:19 +0530 Subject: Bug#21770366 backport bug#21657078 to 5.5 and 5.6 Problem Statement ========= Fix various issues when building MySQL with Visual Studio 2015. Fix: ======= - Visual Studio 2015 adds support for timespec. Add check and related code to use this and only use our replacement if timespec is not defined. - Rename lfind/lsearch to my* to avoid redefinition problems. - Set default value for TMPDIR to "" on Windows as P_tmpdir no longer exists. - using VS definition of snprintf if available - tzname are now renamed to _tzname. --- include/my_pthread.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/my_pthread.h b/include/my_pthread.h index 92676bd727c..6ff198ac6f3 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. 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 @@ -90,6 +90,7 @@ typedef volatile LONG my_pthread_once_t; windows implementation of pthread_cond_timedwait */ +#ifndef HAVE_STRUCT_TIMESPEC /* Declare a union to make sure FILETIME is properly aligned so it can be used directly as a 64 bit value. The value @@ -128,6 +129,7 @@ struct timespec { ((TS1.tv.i64 > TS2.tv.i64) ? 1 : \ ((TS1.tv.i64 < TS2.tv.i64) ? -1 : 0)) +#endif int win_pthread_mutex_trylock(pthread_mutex_t *mutex); int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *); @@ -433,13 +435,7 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex); #endif /* !set_timespec_nsec */ #else #ifndef set_timespec -#define set_timespec(ABSTIME,SEC) \ -{\ - struct timeval tv;\ - gettimeofday(&tv,0);\ - (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\ - (ABSTIME).tv_nsec=tv.tv_usec*1000;\ -} +#define set_timespec(ABSTIME,SEC) set_timespec_nsec((ABSTIME),(SEC)*1000000000ULL) #endif /* !set_timespec */ #ifndef set_timespec_nsec #define set_timespec_nsec(ABSTIME,NSEC) \ -- cgit v1.2.1 From 0aab0e7a3d9afa5475d5a515142a19c6a09ae44c Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Mon, 11 Jan 2016 14:10:58 +0100 Subject: Updated copyright year in user visible text --- include/welcome_copyright_notice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/welcome_copyright_notice.h b/include/welcome_copyright_notice.h index eb2bf260af3..7b6c28c2f56 100644 --- a/include/welcome_copyright_notice.h +++ b/include/welcome_copyright_notice.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved. 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 @@ -16,7 +16,7 @@ #ifndef _welcome_copyright_notice_h_ #define _welcome_copyright_notice_h_ -#define COPYRIGHT_NOTICE_CURRENT_YEAR "2015" +#define COPYRIGHT_NOTICE_CURRENT_YEAR "2016" /* This define specifies copyright notice which is displayed by every MySQL -- cgit v1.2.1 From 603c0960ba7e27dfa25c1b0297deb1c4c5ed6746 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 3 Feb 2016 00:43:00 +0100 Subject: MDEV-9466 : Exception handler on Windows does not output any text, if mysqld runs as service The bug is caused by the attempt to write to filedescriptor 2 (STDERR_FILENO), however in case of a service stderr has different fd (debugging shows fileno(stderr) is 4 after freopen, and -1 before it) Fixed definition of STDERR_FILENO for Windows to be fileno(stderr). --- include/my_global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/my_global.h b/include/my_global.h index 09adc9989ef..9e9651b7409 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -436,7 +436,7 @@ extern "C" int madvise(void *addr, size_t len, int behav); #endif #ifndef STDERR_FILENO -#define STDERR_FILENO 2 +#define STDERR_FILENO fileno(stderr) #endif /* -- cgit v1.2.1 From c4cb24006139bb6a619ca9d6b00d00c2275d2c28 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 6 Feb 2016 22:41:58 +0100 Subject: MDEV-9024 Build fails with VS2015 cherry-pick f1daf9ce from 10.0 branch ------------------------------------- Fix build failures caused by new C runtime library - isnan, snprintf, struct timespec are now defined, attempt to redefine them leads - P_tmpdir, tzname are no more defined - lfind() and lsearch() in lf_hash.c had to be renamed, declaration conflicts with some C runtime functions with the same name declared in a header included by stdlib.h Also fix couple of annoying warnings : - remove #define NOMINMAX from config.h to avoid "redefined" compiler warnings(NOMINMAX is already in compile flags) - disable incremental linker in Debug as well (feature not used much and compiler crashes often) Also simplify package building with Wix, require Wix 3.9 or later (VS2015 is not compatible with old Wix 3.5/3.6) --- include/my_pthread.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/my_pthread.h b/include/my_pthread.h index 17c971cd621..9b5703dedb7 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -86,10 +86,12 @@ typedef volatile LONG my_pthread_once_t; #define MY_PTHREAD_ONCE_INPROGRESS 1 #define MY_PTHREAD_ONCE_DONE 2 +#if !STRUCT_TIMESPEC_HAS_TV_SEC || !STRUCT_TIMESPEC_HAS_TV_NSEC struct timespec { time_t tv_sec; long tv_nsec; }; +#endif int win_pthread_mutex_trylock(pthread_mutex_t *mutex); int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *); -- cgit v1.2.1 From a5d9597e9703052895c8c2401132e77aa68a6123 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 14 Feb 2016 22:15:16 +0100 Subject: better inline check 1. check that unused inline functions are removed 2. only allow compilation if they are or if the check if overridden 3. with CMAKE_GENERATOR=Makefiles, use all flags when testing (e.g. both CMAKE_C_FLAGS and CMAKE_C_FLAGS_DEBUG if CMAKE_BUILD_TYPE=Debug). This is because - on Solaris with the SunPro compiler, default CMAKE_C_FLAGS_xxx values contain -xO2 (for Release and RelWithDebInfo) and -g (for RelWithDebInfo and Debug) - proper inlining only works at -xO4 without -g - so if CMAKE_C_FLAGS has -xO4, inlining would work in configure.cmake (before this fix) and fail during actual compilation also remove the outdated check for inline from myu_global.h --- include/my_global.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'include') diff --git a/include/my_global.h b/include/my_global.h index 9e9651b7409..dce38a124c1 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -207,20 +207,6 @@ #define likely(x) __builtin_expect(((x) != 0),1) #define unlikely(x) __builtin_expect(((x) != 0),0) -/* - now let's figure out if inline functions are supported - autoconf defines 'inline' to be empty, if not -*/ -#define inline_test_1(X) X ## 1 -#define inline_test_2(X) inline_test_1(X) -#if inline_test_2(inline) != 1 -#define HAVE_INLINE -#else -#error Compiler does not support inline! -#endif -#undef inline_test_2 -#undef inline_test_1 - /* Fix problem with S_ISLNK() on Linux */ #if defined(TARGET_OS_LINUX) || defined(__GLIBC__) #undef _GNU_SOURCE -- cgit v1.2.1 From 95740bc5c5f82c13f07bea8b10f20b87d8f5f9a9 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 14 Feb 2016 22:16:50 +0100 Subject: dtrace in cmake 1. ignore generated dtrace files 2. don't rewrite probes_mysql_nodtrace.h in-place --- include/probes_mysql_nodtrace.h | 132 ------------------------------------- include/probes_mysql_nodtrace.h.in | 132 +++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 132 deletions(-) delete mode 100644 include/probes_mysql_nodtrace.h create mode 100644 include/probes_mysql_nodtrace.h.in (limited to 'include') diff --git a/include/probes_mysql_nodtrace.h b/include/probes_mysql_nodtrace.h deleted file mode 100644 index a84bf7726c3..00000000000 --- a/include/probes_mysql_nodtrace.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Generated by dheadgen(1). - */ - -#ifndef _PROBES_MYSQL_D -#define _PROBES_MYSQL_D - -#ifdef __cplusplus -#define MYSQL_PROBES_FALSE false -extern "C" { -#else -#define MYSQL_PROBES_FALSE 0 -#endif - -#define MYSQL_CONNECTION_START(arg0, arg1, arg2) -#define MYSQL_CONNECTION_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_CONNECTION_DONE(arg0, arg1) -#define MYSQL_CONNECTION_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3) -#define MYSQL_COMMAND_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_COMMAND_DONE(arg0) -#define MYSQL_COMMAND_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4) -#define MYSQL_QUERY_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_QUERY_DONE(arg0) -#define MYSQL_QUERY_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_QUERY_PARSE_START(arg0) -#define MYSQL_QUERY_PARSE_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_QUERY_PARSE_DONE(arg0) -#define MYSQL_QUERY_PARSE_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_QUERY_CACHE_HIT(arg0, arg1) -#define MYSQL_QUERY_CACHE_HIT_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_QUERY_CACHE_MISS(arg0) -#define MYSQL_QUERY_CACHE_MISS_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5) -#define MYSQL_QUERY_EXEC_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_QUERY_EXEC_DONE(arg0) -#define MYSQL_QUERY_EXEC_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_INSERT_ROW_START(arg0, arg1) -#define MYSQL_INSERT_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_INSERT_ROW_DONE(arg0) -#define MYSQL_INSERT_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_UPDATE_ROW_START(arg0, arg1) -#define MYSQL_UPDATE_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_UPDATE_ROW_DONE(arg0) -#define MYSQL_UPDATE_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_DELETE_ROW_START(arg0, arg1) -#define MYSQL_DELETE_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_DELETE_ROW_DONE(arg0) -#define MYSQL_DELETE_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_READ_ROW_START(arg0, arg1, arg2) -#define MYSQL_READ_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_READ_ROW_DONE(arg0) -#define MYSQL_READ_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_INDEX_READ_ROW_START(arg0, arg1) -#define MYSQL_INDEX_READ_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_INDEX_READ_ROW_DONE(arg0) -#define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_HANDLER_RDLOCK_START(arg0, arg1) -#define MYSQL_HANDLER_RDLOCK_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_HANDLER_WRLOCK_START(arg0, arg1) -#define MYSQL_HANDLER_WRLOCK_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_HANDLER_UNLOCK_START(arg0, arg1) -#define MYSQL_HANDLER_UNLOCK_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_HANDLER_RDLOCK_DONE(arg0) -#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_HANDLER_WRLOCK_DONE(arg0) -#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_HANDLER_UNLOCK_DONE(arg0) -#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_FILESORT_START(arg0, arg1) -#define MYSQL_FILESORT_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_FILESORT_DONE(arg0, arg1) -#define MYSQL_FILESORT_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_SELECT_START(arg0) -#define MYSQL_SELECT_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_SELECT_DONE(arg0, arg1) -#define MYSQL_SELECT_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_INSERT_START(arg0) -#define MYSQL_INSERT_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_INSERT_DONE(arg0, arg1) -#define MYSQL_INSERT_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_INSERT_SELECT_START(arg0) -#define MYSQL_INSERT_SELECT_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_INSERT_SELECT_DONE(arg0, arg1) -#define MYSQL_INSERT_SELECT_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_UPDATE_START(arg0) -#define MYSQL_UPDATE_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_UPDATE_DONE(arg0, arg1, arg2) -#define MYSQL_UPDATE_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_MULTI_UPDATE_START(arg0) -#define MYSQL_MULTI_UPDATE_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2) -#define MYSQL_MULTI_UPDATE_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_DELETE_START(arg0) -#define MYSQL_DELETE_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_DELETE_DONE(arg0, arg1) -#define MYSQL_DELETE_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_MULTI_DELETE_START(arg0) -#define MYSQL_MULTI_DELETE_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_MULTI_DELETE_DONE(arg0, arg1) -#define MYSQL_MULTI_DELETE_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_NET_READ_START() -#define MYSQL_NET_READ_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_NET_READ_DONE(arg0, arg1) -#define MYSQL_NET_READ_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_NET_WRITE_START(arg0) -#define MYSQL_NET_WRITE_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_NET_WRITE_DONE(arg0) -#define MYSQL_NET_WRITE_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_KEYCACHE_READ_START(arg0, arg1, arg2, arg3) -#define MYSQL_KEYCACHE_READ_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_KEYCACHE_READ_BLOCK(arg0) -#define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_KEYCACHE_READ_HIT() -#define MYSQL_KEYCACHE_READ_HIT_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_KEYCACHE_READ_MISS() -#define MYSQL_KEYCACHE_READ_MISS_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_KEYCACHE_READ_DONE(arg0, arg1) -#define MYSQL_KEYCACHE_READ_DONE_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_KEYCACHE_WRITE_START(arg0, arg1, arg2, arg3) -#define MYSQL_KEYCACHE_WRITE_START_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_KEYCACHE_WRITE_BLOCK(arg0) -#define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (MYSQL_PROBES_FALSE) -#define MYSQL_KEYCACHE_WRITE_DONE(arg0, arg1) -#define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (MYSQL_PROBES_FALSE) - -#ifdef __cplusplus -} -#endif - -#endif /* _PROBES_MYSQL_D */ diff --git a/include/probes_mysql_nodtrace.h.in b/include/probes_mysql_nodtrace.h.in new file mode 100644 index 00000000000..a84bf7726c3 --- /dev/null +++ b/include/probes_mysql_nodtrace.h.in @@ -0,0 +1,132 @@ +/* + * Generated by dheadgen(1). + */ + +#ifndef _PROBES_MYSQL_D +#define _PROBES_MYSQL_D + +#ifdef __cplusplus +#define MYSQL_PROBES_FALSE false +extern "C" { +#else +#define MYSQL_PROBES_FALSE 0 +#endif + +#define MYSQL_CONNECTION_START(arg0, arg1, arg2) +#define MYSQL_CONNECTION_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_CONNECTION_DONE(arg0, arg1) +#define MYSQL_CONNECTION_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3) +#define MYSQL_COMMAND_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_COMMAND_DONE(arg0) +#define MYSQL_COMMAND_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4) +#define MYSQL_QUERY_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_QUERY_DONE(arg0) +#define MYSQL_QUERY_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_QUERY_PARSE_START(arg0) +#define MYSQL_QUERY_PARSE_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_QUERY_PARSE_DONE(arg0) +#define MYSQL_QUERY_PARSE_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_QUERY_CACHE_HIT(arg0, arg1) +#define MYSQL_QUERY_CACHE_HIT_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_QUERY_CACHE_MISS(arg0) +#define MYSQL_QUERY_CACHE_MISS_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5) +#define MYSQL_QUERY_EXEC_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_QUERY_EXEC_DONE(arg0) +#define MYSQL_QUERY_EXEC_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_INSERT_ROW_START(arg0, arg1) +#define MYSQL_INSERT_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_INSERT_ROW_DONE(arg0) +#define MYSQL_INSERT_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_UPDATE_ROW_START(arg0, arg1) +#define MYSQL_UPDATE_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_UPDATE_ROW_DONE(arg0) +#define MYSQL_UPDATE_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_DELETE_ROW_START(arg0, arg1) +#define MYSQL_DELETE_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_DELETE_ROW_DONE(arg0) +#define MYSQL_DELETE_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_READ_ROW_START(arg0, arg1, arg2) +#define MYSQL_READ_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_READ_ROW_DONE(arg0) +#define MYSQL_READ_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_INDEX_READ_ROW_START(arg0, arg1) +#define MYSQL_INDEX_READ_ROW_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_INDEX_READ_ROW_DONE(arg0) +#define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_HANDLER_RDLOCK_START(arg0, arg1) +#define MYSQL_HANDLER_RDLOCK_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_HANDLER_WRLOCK_START(arg0, arg1) +#define MYSQL_HANDLER_WRLOCK_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_HANDLER_UNLOCK_START(arg0, arg1) +#define MYSQL_HANDLER_UNLOCK_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_HANDLER_RDLOCK_DONE(arg0) +#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_HANDLER_WRLOCK_DONE(arg0) +#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_HANDLER_UNLOCK_DONE(arg0) +#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_FILESORT_START(arg0, arg1) +#define MYSQL_FILESORT_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_FILESORT_DONE(arg0, arg1) +#define MYSQL_FILESORT_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_SELECT_START(arg0) +#define MYSQL_SELECT_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_SELECT_DONE(arg0, arg1) +#define MYSQL_SELECT_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_INSERT_START(arg0) +#define MYSQL_INSERT_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_INSERT_DONE(arg0, arg1) +#define MYSQL_INSERT_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_INSERT_SELECT_START(arg0) +#define MYSQL_INSERT_SELECT_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_INSERT_SELECT_DONE(arg0, arg1) +#define MYSQL_INSERT_SELECT_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_UPDATE_START(arg0) +#define MYSQL_UPDATE_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_UPDATE_DONE(arg0, arg1, arg2) +#define MYSQL_UPDATE_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_MULTI_UPDATE_START(arg0) +#define MYSQL_MULTI_UPDATE_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2) +#define MYSQL_MULTI_UPDATE_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_DELETE_START(arg0) +#define MYSQL_DELETE_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_DELETE_DONE(arg0, arg1) +#define MYSQL_DELETE_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_MULTI_DELETE_START(arg0) +#define MYSQL_MULTI_DELETE_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_MULTI_DELETE_DONE(arg0, arg1) +#define MYSQL_MULTI_DELETE_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_NET_READ_START() +#define MYSQL_NET_READ_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_NET_READ_DONE(arg0, arg1) +#define MYSQL_NET_READ_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_NET_WRITE_START(arg0) +#define MYSQL_NET_WRITE_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_NET_WRITE_DONE(arg0) +#define MYSQL_NET_WRITE_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_KEYCACHE_READ_START(arg0, arg1, arg2, arg3) +#define MYSQL_KEYCACHE_READ_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_KEYCACHE_READ_BLOCK(arg0) +#define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_KEYCACHE_READ_HIT() +#define MYSQL_KEYCACHE_READ_HIT_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_KEYCACHE_READ_MISS() +#define MYSQL_KEYCACHE_READ_MISS_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_KEYCACHE_READ_DONE(arg0, arg1) +#define MYSQL_KEYCACHE_READ_DONE_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_KEYCACHE_WRITE_START(arg0, arg1, arg2, arg3) +#define MYSQL_KEYCACHE_WRITE_START_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_KEYCACHE_WRITE_BLOCK(arg0) +#define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (MYSQL_PROBES_FALSE) +#define MYSQL_KEYCACHE_WRITE_DONE(arg0, arg1) +#define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (MYSQL_PROBES_FALSE) + +#ifdef __cplusplus +} +#endif + +#endif /* _PROBES_MYSQL_D */ -- cgit v1.2.1 From 09b586546029a7ffc6886b0ab528105ef3fb78eb Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 17 Feb 2016 08:05:00 +0400 Subject: MDEV-9511 Valgrind warnings 'Invalid read' in Field_newdate::cmp and Field_newdate::val_str --- include/byte_order_generic_x86_64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/byte_order_generic_x86_64.h b/include/byte_order_generic_x86_64.h index 877c1574dfa..b6b0c5d8ea5 100644 --- a/include/byte_order_generic_x86_64.h +++ b/include/byte_order_generic_x86_64.h @@ -31,7 +31,7 @@ Attention: Please, note, uint3korr reads 4 bytes (not 3)! It means, that you have to provide enough allocated space. */ -#if defined(HAVE_purify) && !defined(_WIN32) +#if defined(HAVE_valgrind) && !defined(_WIN32) #define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\ (((uint32) ((uchar) (A)[1])) << 8) +\ (((uint32) ((uchar) (A)[2])) << 16)) -- cgit v1.2.1 From dc92263ab3d2649d657bfd586b4500704d08cbe4 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 17 Feb 2016 13:48:13 +0100 Subject: MDEV-9308 Fix build errors with recent gcc (isfinite) "#include " has "#define isfinite(X) ..." while "#include " does "#undef isfinite" in -std=c++11 mode is included, we need a workaround to provide a usable isfinite() --- include/my_global.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/my_global.h b/include/my_global.h index 5901dcdcea1..4c58c21b2aa 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -813,6 +813,9 @@ inline unsigned long long my_double2ulonglong(double d) #else #define finite(x) (1.0 / fabs(x) > 0.0) #endif /* HAVE_FINITE */ +#elif (__cplusplus >= 201103L) +#include +static inline bool isfinite(double x) { return std::isfinite(x); } #endif /* isfinite */ #ifndef HAVE_ISNAN -- cgit v1.2.1