Merge branch '10.6' into 10.11

This commit is contained in:
Oleksandr Byelkin 2025-06-04 14:09:23 +02:00
commit 28d6530571
51 changed files with 534 additions and 74 deletions

View file

@ -91,9 +91,22 @@ _Pragma("GCC diagnostic ignored \"-Wframe-larger-than=\"")
#define PRAGMA_REENABLE_CHECK_STACK_FRAME \
_Pragma("GCC diagnostic pop")
/*
The following check is for older gcc version that allocates
a lot of stack during startup that does not need to be checked
*/
#if !defined(__clang__) && __GNUC__ < 13
#define PRAGMA_DISABLE_CHECK_STACK_FRAME_EXTRA PRAGMA_DISABLE_CHECK_STACK_FRAME
#else
#define PRAGMA_DISABLE_CHECK_STACK_FRAME_EXTRA
#endif /* !defined(__clang__) && __GNUC__ < 13 */
#else /*! __GNUC__ */
#define PRAGMA_DISABLE_CHECK_STACK_FRAME
#define PRAGMA_REENABLE_CHECK_STACK_FRAME
#endif
#define PRAGMA_DISABLE_CHECK_STACK_FRAME
#define PRAGMA_DISABLE_CHECK_STACK_FRAME_EXTRA
#endif /* __GNUC__ */
#endif /* _my_attribute_h */

View file

@ -668,7 +668,17 @@ extern void my_mutex_end(void);
We need to have at least 256K stack to handle calls to myisamchk_init()
with the current number of keys and key parts.
*/
# if defined(__SANITIZE_ADDRESS__) || defined(WITH_UBSAN)
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif
#if defined(__clang__) && __has_feature(memory_sanitizer) && !defined(DBUG_OFF)
/*
MSAN in Debug with clang-20.1 required more memory to complete
mtr begin/end checks. The result without increase was MSAN
errors triggered on a call instruction.
*/
# define DEFAULT_THREAD_STACK (2L<<20)
# elif defined(__SANITIZE_ADDRESS__) || defined(WITH_UBSAN)
/*
Optimized WITH_ASAN=ON executables produced
by GCC 12.3.0, GCC 13.2.0, or clang 16.0.6

View file

@ -230,7 +230,6 @@ static inline longlong sec_part_unshift(longlong second_part, uint digits)
/* Date/time rounding and truncation functions */
static inline long my_time_fraction_remainder(long nr, uint decimals)
{
DBUG_ASSERT(decimals <= TIME_SECOND_PART_DIGITS);
return nr % (long) log_10_int[TIME_SECOND_PART_DIGITS - decimals];
}
static inline void my_datetime_trunc(MYSQL_TIME *ltime, uint decimals)