diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/m_ctype.h | 50 | ||||
-rw-r--r-- | include/m_string.h | 19 | ||||
-rw-r--r-- | include/my_alloca.h | 6 | ||||
-rw-r--r-- | include/my_base.h | 11 | ||||
-rw-r--r-- | include/my_rdtsc.h | 53 | ||||
-rw-r--r-- | include/mysql/psi/mysql_file.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_idle.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_mdl.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_memory.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_ps.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_socket.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_sp.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_stage.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_statement.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_table.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_thread.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_transaction.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v0.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v1.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v2.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_base.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_memory.h | 2 | ||||
-rw-r--r-- | include/mysql/service_encryption.h | 2 | ||||
-rw-r--r-- | include/ssl_compat.h | 3 |
25 files changed, 108 insertions, 72 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h index 708107ff120..6812445c6d5 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -79,7 +79,6 @@ extern "C" { typedef const struct my_charset_handler_st MY_CHARSET_HANDLER; typedef const struct my_collation_handler_st MY_COLLATION_HANDLER; -typedef const struct unicase_info_st MY_UNICASE_INFO; typedef const struct casefold_info_st MY_CASEFOLD_INFO; typedef const struct uni_ctype_st MY_UNI_CTYPE; typedef const struct my_uni_idx_st MY_UNI_IDX; @@ -97,29 +96,10 @@ struct casefold_info_st { my_wc_t maxchar; const MY_CASEFOLD_CHARACTER * const *page; + const uint16 * const *simple_weight; /* For general_ci-alike collations */ }; -typedef struct unicase_info_char_st -{ - uint32 toupper; - uint32 tolower; - uint32 sort; -} MY_UNICASE_CHARACTER; - - -struct unicase_info_st -{ - my_wc_t maxchar; - MY_UNICASE_CHARACTER **page; -}; - - -extern MY_UNICASE_INFO my_unicase_default; -extern MY_UNICASE_INFO my_unicase_turkish; -extern MY_UNICASE_INFO my_unicase_mysql500; -extern MY_UNICASE_INFO my_unicase_unicode520; - #define MY_UCA_MAX_CONTRACTION 6 /* The DUCET tables in ctype-uca.c are dumped with a limit of 8 weights @@ -391,6 +371,28 @@ typedef enum enum_collation_name_mode #define MY_STRXFRM_REVERSE_LEVEL6 0x00200000 /* if reverse order for level6 */ #define MY_STRXFRM_REVERSE_SHIFT 16 +/* Flags to strnncollsp_nchars */ +/* + MY_STRNNCOLLSP_NCHARS_EMULATE_TRIMMED_TRAILING_SPACES - + defines if inside strnncollsp_nchars() + short strings should be virtually extended to "nchars" + characters by emulating trimmed trailing spaces. + + This flag is needed when comparing packed strings of the CHAR + data type, when trailing spaces are trimmed on storage (like in InnoDB), + however the actual values (after unpacking) will have those trailing + spaces. + + If this flag is passed, strnncollsp_nchars() performs both + truncating longer strings and extending shorter strings + to exactly "nchars". + + If this flag is not passed, strnncollsp_nchars() only truncates longer + strings to "nchars", but does not extend shorter strings to "nchars". +*/ +#define MY_STRNNCOLLSP_NCHARS_EMULATE_TRIMMED_TRAILING_SPACES 1 + + /* Collation IDs for MariaDB that should not conflict with MySQL. We reserve 256..511, because MySQL will most likely use this range @@ -526,7 +528,8 @@ struct my_collation_handler_st int (*strnncollsp_nchars)(CHARSET_INFO *, const uchar *str1, size_t len1, const uchar *str2, size_t len2, - size_t nchars); + size_t nchars, + uint flags); size_t (*strnxfrm)(CHARSET_INFO *, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags); @@ -772,7 +775,6 @@ struct charset_info_st const uint16 *tab_to_uni; MY_UNI_IDX *tab_from_uni; MY_CASEFOLD_INFO *casefold; - MY_UNICASE_INFO *caseinfo; const uchar *state_map; const uchar *ident_map; uint strxfrm_multiply; @@ -1668,7 +1670,7 @@ int my_wildcmp_unicode(CHARSET_INFO *cs, const char *str, const char *str_end, const char *wildstr, const char *wildend, int escape, int w_one, int w_many, - MY_UNICASE_INFO *weights); + MY_CASEFOLD_INFO *weights); extern my_bool my_parse_charset_xml(MY_CHARSET_LOADER *loader, const char *buf, size_t buflen); diff --git a/include/m_string.h b/include/m_string.h index 9e35be404ec..046dc39d13a 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -199,9 +199,22 @@ extern ulonglong strtoull(const char *str, char **ptr, int base); #include <mysql/plugin.h> -#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1)) -#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1)) -#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1)) +#ifdef __cplusplus +#include <type_traits> +template<typename T> inline const char *_swl_check(T s) +{ + static_assert(std::is_same<T, const char (&)[sizeof(T)]>::value + || std::is_same<T, const char [sizeof(T)]>::value, + "Wrong argument for STRING_WITH_LEN()"); + return s; +} +#define STRING_WITH_LEN(X) _swl_check<decltype(X)>(X), ((size_t) (sizeof(X) - 1)) +#else +#define STRING_WITH_LEN(X) (X ""), ((size_t) (sizeof(X) - 1)) +#endif + +#define USTRING_WITH_LEN(X) (uchar*) STRING_WITH_LEN(X) +#define C_STRING_WITH_LEN(X) (char *) STRING_WITH_LEN(X) #define LEX_STRING_WITH_LEN(X) (X).str, (X).length typedef struct st_mysql_const_lex_string LEX_CSTRING; diff --git a/include/my_alloca.h b/include/my_alloca.h index 761c2adb890..85fa64e9558 100644 --- a/include/my_alloca.h +++ b/include/my_alloca.h @@ -32,7 +32,10 @@ #endif #endif -#if defined(HAVE_ALLOCA) +#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) +#pragma alloca +#endif /* _AIX */ + /* If the GCC/LLVM compiler from the MinGW is used, alloca may not be defined when using the MSVC CRT: @@ -40,6 +43,5 @@ #if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && !defined(alloca) #define alloca __builtin_alloca #endif /* GNUC */ -#endif #endif /* MY_ALLOCA_INCLUDED */ diff --git a/include/my_base.h b/include/my_base.h index 22f1ea0a5df..05b3b56359e 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -104,7 +104,8 @@ enum ha_key_alg { HA_KEY_ALG_RTREE= 2, /* R-tree, for spatial searches */ HA_KEY_ALG_HASH= 3, /* HASH keys (HEAP tables) */ HA_KEY_ALG_FULLTEXT= 4, /* FULLTEXT (MyISAM tables) */ - HA_KEY_ALG_LONG_HASH= 5 /* long BLOB keys */ + HA_KEY_ALG_LONG_HASH= 5, /* long BLOB keys */ + HA_KEY_ALG_UNIQUE_HASH= 6 /* Internal UNIQUE hash (Aria) */ }; /* Storage media types */ @@ -276,11 +277,17 @@ enum ha_base_keytype { #define HA_SPATIAL 1024U /* For spatial search */ #define HA_NULL_ARE_EQUAL 2048U /* NULL in key are cmp as equal */ #define HA_GENERATED_KEY 8192U /* Automatically generated key */ +/* + Part of unique hash key. Used only for temporary (work) tables so is not + written to .frm files. +*/ +#define HA_UNIQUE_HASH 262144U /* The combination of the above can be used for key type comparison. */ #define HA_KEYFLAG_MASK (HA_NOSAME | HA_AUTO_KEY | \ HA_FULLTEXT | HA_UNIQUE_CHECK | \ - HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY) + HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY | \ + HA_UNIQUE_HASH) /* Key contains partial segments. diff --git a/include/my_rdtsc.h b/include/my_rdtsc.h index b2d30fa3151..8b9b0046bc0 100644 --- a/include/my_rdtsc.h +++ b/include/my_rdtsc.h @@ -72,6 +72,26 @@ struct my_timer_info typedef struct my_timer_info MY_TIMER_INFO; +#define MY_TIMER_ROUTINE_RDTSC 5 +#define MY_TIMER_ROUTINE_ASM_IA64 6 +#define MY_TIMER_ROUTINE_PPC_GET_TIMEBASE 7 +#define MY_TIMER_ROUTINE_GETHRTIME 9 +#define MY_TIMER_ROUTINE_READ_REAL_TIME 10 +#define MY_TIMER_ROUTINE_CLOCK_GETTIME 11 +#define MY_TIMER_ROUTINE_GETTIMEOFDAY 13 +#define MY_TIMER_ROUTINE_QUERYPERFORMANCECOUNTER 14 +#define MY_TIMER_ROUTINE_GETTICKCOUNT 15 +#define MY_TIMER_ROUTINE_TIME 16 +#define MY_TIMER_ROUTINE_TIMES 17 +#define MY_TIMER_ROUTINE_FTIME 18 +#define MY_TIMER_ROUTINE_ASM_GCC_SPARC64 23 +#define MY_TIMER_ROUTINE_ASM_GCC_SPARC32 24 +#define MY_TIMER_ROUTINE_MACH_ABSOLUTE_TIME 25 +#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26 +#define MY_TIMER_ROUTINE_ASM_S390 28 +#define MY_TIMER_ROUTINE_AARCH64 29 +#define MY_TIMER_ROUTINE_RISCV 30 + C_MODE_START /** @@ -133,28 +153,36 @@ C_MODE_START static inline ulonglong my_timer_cycles(void) { # if __has_builtin(__builtin_readcyclecounter) && !defined (__aarch64__) + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_AARCH64 return __builtin_readcyclecounter(); # elif defined _M_IX86 || defined _M_X64 || defined __i386__ || defined __x86_64__ + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_RDTSC return __rdtsc(); #elif defined _M_ARM64 + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_AARCH64 return _ReadStatusReg(ARM64_CNTVCT); # elif defined(__INTEL_COMPILER) && defined(__ia64__) && defined(HAVE_IA64INTRIN_H) + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_ASM_IA64 return (ulonglong) __getReg(_IA64_REG_AR_ITC); /* (3116) */ #elif defined(__GNUC__) && defined(__ia64__) + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_ASM_IA64 { ulonglong result; __asm __volatile__ ("mov %0=ar.itc" : "=r" (result)); return result; } #elif defined __GNUC__ && defined __powerpc__ + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_PPC_GET_TIMEBASE return __builtin_ppc_get_timebase(); #elif defined(__GNUC__) && defined(__sparcv9) && defined(_LP64) + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_ASM_GCC_SPARC64 { ulonglong result; __asm __volatile__ ("rd %%tick,%0" : "=r" (result)); return result; } #elif defined(__GNUC__) && defined(__sparc__) && !defined(_LP64) + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_ASM_GCC_SPARC32 { union { ulonglong wholeresult; @@ -167,6 +195,7 @@ static inline ulonglong my_timer_cycles(void) return result.wholeresult; } #elif defined(__GNUC__) && defined(__s390__) + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_ASM_S390 /* covers both s390 and s390x */ { ulonglong result; @@ -174,12 +203,14 @@ static inline ulonglong my_timer_cycles(void) return result; } #elif defined(__GNUC__) && defined (__aarch64__) + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_AARCH64 { ulonglong result; __asm __volatile("mrs %0, CNTVCT_EL0" : "=&r" (result)); return result; } #elif defined(__riscv) + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_RISCV /* Use RDCYCLE (and RDCYCLEH on riscv32) */ { # if __riscv_xlen == 32 @@ -202,9 +233,11 @@ static inline ulonglong my_timer_cycles(void) } # endif #elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME) + #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_GETHRTIME /* gethrtime may appear as either cycle or nanosecond counter */ return (ulonglong) gethrtime(); #else + #define MY_TIMER_ROUTINE_CYCLES 0 return 0; #endif } @@ -241,25 +274,5 @@ void my_timer_init(MY_TIMER_INFO *mti); C_MODE_END -#define MY_TIMER_ROUTINE_RDTSC 5 -#define MY_TIMER_ROUTINE_ASM_IA64 6 -#define MY_TIMER_ROUTINE_PPC_GET_TIMEBASE 7 -#define MY_TIMER_ROUTINE_GETHRTIME 9 -#define MY_TIMER_ROUTINE_READ_REAL_TIME 10 -#define MY_TIMER_ROUTINE_CLOCK_GETTIME 11 -#define MY_TIMER_ROUTINE_GETTIMEOFDAY 13 -#define MY_TIMER_ROUTINE_QUERYPERFORMANCECOUNTER 14 -#define MY_TIMER_ROUTINE_GETTICKCOUNT 15 -#define MY_TIMER_ROUTINE_TIME 16 -#define MY_TIMER_ROUTINE_TIMES 17 -#define MY_TIMER_ROUTINE_FTIME 18 -#define MY_TIMER_ROUTINE_ASM_GCC_SPARC64 23 -#define MY_TIMER_ROUTINE_ASM_GCC_SPARC32 24 -#define MY_TIMER_ROUTINE_MACH_ABSOLUTE_TIME 25 -#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26 -#define MY_TIMER_ROUTINE_ASM_S390 28 -#define MY_TIMER_ROUTINE_AARCH64 29 -#define MY_TIMER_ROUTINE_RISCV 30 - #endif diff --git a/include/mysql/psi/mysql_file.h b/include/mysql/psi/mysql_file.h index 9b172cfe9b0..fd3b29cc5c9 100644 --- a/include/mysql/psi/mysql_file.h +++ b/include/mysql/psi/mysql_file.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_idle.h b/include/mysql/psi/mysql_idle.h index 1c9927f95b2..dc7f5180285 100644 --- a/include/mysql/psi/mysql_idle.h +++ b/include/mysql/psi/mysql_idle.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2022, Oracle and/or its affiliates +/* Copyright (c) 2011, 2023, Oracle and/or its affiliates Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff --git a/include/mysql/psi/mysql_mdl.h b/include/mysql/psi/mysql_mdl.h index 483f28f396b..8721a191cd8 100644 --- a/include/mysql/psi/mysql_mdl.h +++ b/include/mysql/psi/mysql_mdl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2012, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_memory.h b/include/mysql/psi/mysql_memory.h index 06027a655f7..7f54b00d6fe 100644 --- a/include/mysql/psi/mysql_memory.h +++ b/include/mysql/psi/mysql_memory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2012, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_ps.h b/include/mysql/psi/mysql_ps.h index 670555fc55f..89f34ef63f7 100644 --- a/include/mysql/psi/mysql_ps.h +++ b/include/mysql/psi/mysql_ps.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2014, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h index c78154b73db..95cb02a5f6c 100644 --- a/include/mysql/psi/mysql_socket.h +++ b/include/mysql/psi/mysql_socket.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2023, Oracle and/or its affiliates. Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff --git a/include/mysql/psi/mysql_sp.h b/include/mysql/psi/mysql_sp.h index 1fec59cec91..c25247459ae 100644 --- a/include/mysql/psi/mysql_sp.h +++ b/include/mysql/psi/mysql_sp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_stage.h b/include/mysql/psi/mysql_stage.h index cb579ea4e8c..b6bc5ce3706 100644 --- a/include/mysql/psi/mysql_stage.h +++ b/include/mysql/psi/mysql_stage.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_statement.h b/include/mysql/psi/mysql_statement.h index 78a4de73869..544bba67885 100644 --- a/include/mysql/psi/mysql_statement.h +++ b/include/mysql/psi/mysql_statement.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2023, Oracle and/or its affiliates. Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff --git a/include/mysql/psi/mysql_table.h b/include/mysql/psi/mysql_table.h index 03b6e998562..317627a63ff 100644 --- a/include/mysql/psi/mysql_table.h +++ b/include/mysql/psi/mysql_table.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index 697c23ae423..11cf3548e8c 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. Copyright (c) 2020, 2021, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff --git a/include/mysql/psi/mysql_transaction.h b/include/mysql/psi/mysql_transaction.h index 02f08bfab44..a4444804f5c 100644 --- a/include/mysql/psi/mysql_transaction.h +++ b/include/mysql/psi/mysql_transaction.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/psi.h b/include/mysql/psi/psi.h index 9b02961749d..702d31fa01e 100644 --- a/include/mysql/psi/psi.h +++ b/include/mysql/psi/psi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/psi_abi_v0.h b/include/mysql/psi/psi_abi_v0.h index df47ae78eb4..c75a51f7fbf 100644 --- a/include/mysql/psi/psi_abi_v0.h +++ b/include/mysql/psi/psi_abi_v0.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2011, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/psi_abi_v1.h b/include/mysql/psi/psi_abi_v1.h index 61018bdf030..e195ea5ba8d 100644 --- a/include/mysql/psi/psi_abi_v1.h +++ b/include/mysql/psi/psi_abi_v1.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/psi_abi_v2.h b/include/mysql/psi/psi_abi_v2.h index 31c9e8fc42f..fdbd36f2259 100644 --- a/include/mysql/psi/psi_abi_v2.h +++ b/include/mysql/psi/psi_abi_v2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/psi_base.h b/include/mysql/psi/psi_base.h index c04f817b2c1..6cf531950f0 100644 --- a/include/mysql/psi/psi_base.h +++ b/include/mysql/psi/psi_base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/psi_memory.h b/include/mysql/psi/psi_memory.h index 21a86a36368..f06ec525e08 100644 --- a/include/mysql/psi/psi_memory.h +++ b/include/mysql/psi/psi_memory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/service_encryption.h b/include/mysql/service_encryption.h index 280b9c69e35..4963940758c 100644 --- a/include/mysql/service_encryption.h +++ b/include/mysql/service_encryption.h @@ -30,8 +30,6 @@ #ifndef __cplusplus #define inline __inline #endif -#else -#include <stdlib.h> #endif #endif diff --git a/include/ssl_compat.h b/include/ssl_compat.h index 664f3aac87c..3678e5fa084 100644 --- a/include/ssl_compat.h +++ b/include/ssl_compat.h @@ -19,7 +19,8 @@ /* OpenSSL version specific definitions */ #if defined(OPENSSL_VERSION_NUMBER) -#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \ + !(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L) #define HAVE_OPENSSL11 1 #define SSL_LIBRARY OpenSSL_version(OPENSSL_VERSION) #define ERR_remove_state(X) ERR_clear_error() |