diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/byte_order_generic_x86_64.h | 2 | ||||
-rw-r--r-- | include/m_ctype.h | 3 | ||||
-rw-r--r-- | include/my_alloc.h | 6 | ||||
-rw-r--r-- | include/my_pthread.h | 28 | ||||
-rw-r--r-- | include/my_sys.h | 1 | ||||
-rw-r--r-- | include/myisamchk.h | 1 | ||||
-rw-r--r-- | include/mysql.h | 4 | ||||
-rw-r--r-- | include/mysql/plugin.h | 16 | ||||
-rw-r--r-- | include/mysql/plugin_audit.h.pp | 3 | ||||
-rw-r--r-- | include/mysql/plugin_auth.h.pp | 3 | ||||
-rw-r--r-- | include/mysql/plugin_data_type.h.pp | 3 | ||||
-rw-r--r-- | include/mysql/plugin_encryption.h.pp | 3 | ||||
-rw-r--r-- | include/mysql/plugin_ftparser.h.pp | 3 | ||||
-rw-r--r-- | include/mysql/plugin_function.h.pp | 3 | ||||
-rw-r--r-- | include/mysql/plugin_password_validation.h.pp | 3 | ||||
-rw-r--r-- | include/mysql/service_sql.h | 6 | ||||
-rw-r--r-- | include/mysql/service_wsrep.h | 3 | ||||
-rw-r--r-- | include/mysql_com.h | 2 |
18 files changed, 65 insertions, 28 deletions
diff --git a/include/byte_order_generic_x86_64.h b/include/byte_order_generic_x86_64.h index a25e6a2a..305ba2b4 100644 --- a/include/byte_order_generic_x86_64.h +++ b/include/byte_order_generic_x86_64.h @@ -83,7 +83,7 @@ static inline ulonglong uint6korr(const void *p) #define HAVE_mi_uint5korr #define HAVE_mi_uint6korr #define HAVE_mi_uint7korr -#define HAVE_mi_uint78orr +#define HAVE_mi_uint8korr /* Read numbers stored in high-bytes-first order */ diff --git a/include/m_ctype.h b/include/m_ctype.h index 3adcb474..5c68224f 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -447,7 +447,8 @@ enum my_lex_states MY_LEX_IDENT_OR_KEYWORD, MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR, MY_LEX_STRING_OR_DELIMITER, MY_LEX_MINUS_OR_COMMENT, MY_LEX_PLACEHOLDER, - MY_LEX_COMMA + MY_LEX_COMMA, + MY_LEX_IDENT_OR_QUALIFIED_SPECIAL_FUNC }; struct charset_info_st; diff --git a/include/my_alloc.h b/include/my_alloc.h index caa4be8f..0b777437 100644 --- a/include/my_alloc.h +++ b/include/my_alloc.h @@ -25,6 +25,8 @@ #define ALLOC_MAX_BLOCK_TO_DROP 4096 #define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10 +#define ROOT_FLAG_READ_ONLY 4 + #ifdef __cplusplus extern "C" { #endif @@ -53,10 +55,6 @@ typedef struct st_mem_root unsigned short first_block_usage; unsigned short flags; -#ifdef PROTECT_STATEMENT_MEMROOT - int read_only; -#endif - void (*error_handler)(void); PSI_memory_key psi_key; diff --git a/include/my_pthread.h b/include/my_pthread.h index 3e68538b..ca32fecc 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -147,9 +147,6 @@ int pthread_cancel(pthread_t thread); #ifndef _REENTRANT #define _REENTRANT #endif -#ifdef HAVE_THR_SETCONCURRENCY -#include <thread.h> /* Probably solaris */ -#endif #ifdef HAVE_SCHED_H #include <sched.h> #endif @@ -618,9 +615,6 @@ extern int my_rw_trywrlock(my_rw_lock_t *); #define GETHOSTBYADDR_BUFF_SIZE 2048 -#ifndef HAVE_THR_SETCONCURRENCY -#define thr_setconcurrency(A) pthread_dummy(0) -#endif #if !defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && ! defined(pthread_attr_setstacksize) #define pthread_attr_setstacksize(A,B) pthread_dummy(0) #endif @@ -667,15 +661,19 @@ 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) -#ifndef DBUG_OFF -#define DEFAULT_THREAD_STACK (1024*1024L) -#else -#define DEFAULT_THREAD_STACK (383*1024L) /* 392192 */ -#endif -#else -#define DEFAULT_THREAD_STACK (292*1024L) /* 299008 */ -#endif +# if 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 + would fail ./mtr main.1st when the stack size is 5 MiB. + The minimum is more than 6 MiB for CMAKE_BUILD_TYPE=RelWithDebInfo and + more than 10 MiB for CMAKE_BUILD_TYPE=Debug. + Let us add some safety margin. +*/ +# define DEFAULT_THREAD_STACK (11L<<20) +# else +# define DEFAULT_THREAD_STACK (292*1024L) /* 299008 */ +# endif #endif #define MY_PTHREAD_LOCK_READ 0 diff --git a/include/my_sys.h b/include/my_sys.h index 8316975c..540432ce 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -884,6 +884,7 @@ extern void init_alloc_root(PSI_memory_key key, MEM_ROOT *mem_root, extern void *alloc_root(MEM_ROOT *mem_root, size_t Size); extern void *multi_alloc_root(MEM_ROOT *mem_root, ...); extern void free_root(MEM_ROOT *root, myf MyFLAGS); +extern void move_root(MEM_ROOT *to, MEM_ROOT *from); extern void set_prealloc_root(MEM_ROOT *root, char *ptr); extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, size_t prealloc_size); diff --git a/include/myisamchk.h b/include/myisamchk.h index c494c672..85f7c0a5 100644 --- a/include/myisamchk.h +++ b/include/myisamchk.h @@ -112,6 +112,7 @@ typedef struct st_handler_check_param uint progress_counter; /* How often to call _report_progress() */ ulonglong progress, max_progress; + void (*init_fix_record)(void *); int (*fix_record)(struct st_myisam_info *info, uchar *record, int keynum); mysql_mutex_t print_msg_mutex; diff --git a/include/mysql.h b/include/mysql.h index a66dcc7b..486f57fb 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -268,7 +268,6 @@ typedef struct st_mysql char *host,*user,*passwd,*unix_socket,*server_version,*host_info; char *info, *db; const struct charset_info_st *charset; - MYSQL_FIELD *fields; MEM_ROOT field_alloc; my_ulonglong affected_rows; my_ulonglong insert_id; /* id if insert on table with NEXTNR */ @@ -290,7 +289,8 @@ typedef struct st_mysql /* session-wide random string */ char scramble[SCRAMBLE_LENGTH+1]; my_bool auto_local_infile; - void *unused2, *unused3, *unused4, *unused5; + void *unused2, *unused3, *unused4; + MYSQL_FIELD *fields; LIST *stmts; /* list of all statements */ const struct st_mysql_methods *methods; diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 14c75251..a5763a02 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -531,7 +531,13 @@ struct st_mysql_plugin const char *author; /* plugin author (for I_S.PLUGINS) */ const char *descr; /* general descriptive text (for I_S.PLUGINS) */ int license; /* the plugin license (PLUGIN_LICENSE_XXX) */ - int (*init)(void *); /* the function to invoke when plugin is loaded */ + /* + The function to invoke when plugin is loaded. Plugin + initialisation done here should defer any ALTER TABLE queries to + after the ddl recovery is done, in the signal_ddl_recovery_done() + callback called by ha_signal_ddl_recovery_done(). + */ + int (*init)(void *); int (*deinit)(void *);/* the function to invoke when plugin is unloaded */ unsigned int version; /* plugin version (for I_S.PLUGINS) */ struct st_mysql_show_var *status_vars; @@ -555,7 +561,13 @@ struct st_maria_plugin const char *author; /* plugin author (for SHOW PLUGINS) */ const char *descr; /* general descriptive text (for SHOW PLUGINS ) */ int license; /* the plugin license (PLUGIN_LICENSE_XXX) */ - int (*init)(void *); /* the function to invoke when plugin is loaded */ + /* + The function to invoke when plugin is loaded. Plugin + initialisation done here should defer any ALTER TABLE queries to + after the ddl recovery is done, in the signal_ddl_recovery_done() + callback called by ha_signal_ddl_recovery_done(). + */ + int (*init)(void *); int (*deinit)(void *);/* the function to invoke when plugin is unloaded */ unsigned int version; /* plugin version (for SHOW PLUGINS) */ struct st_mysql_show_var *status_vars; diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp index a01e4ff8..57ba61d3 100644 --- a/include/mysql/plugin_audit.h.pp +++ b/include/mysql/plugin_audit.h.pp @@ -487,6 +487,9 @@ extern struct sql_service_st { int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name); unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res); int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db); + my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); } *sql_service; MYSQL *mysql_real_connect_local(MYSQL *mysql); } diff --git a/include/mysql/plugin_auth.h.pp b/include/mysql/plugin_auth.h.pp index 1844f7b7..15e4c0cd 100644 --- a/include/mysql/plugin_auth.h.pp +++ b/include/mysql/plugin_auth.h.pp @@ -487,6 +487,9 @@ extern struct sql_service_st { int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name); unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res); int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db); + my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); } *sql_service; MYSQL *mysql_real_connect_local(MYSQL *mysql); } diff --git a/include/mysql/plugin_data_type.h.pp b/include/mysql/plugin_data_type.h.pp index 80b5a863..7938bf3c 100644 --- a/include/mysql/plugin_data_type.h.pp +++ b/include/mysql/plugin_data_type.h.pp @@ -487,6 +487,9 @@ extern struct sql_service_st { int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name); unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res); int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db); + my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); } *sql_service; MYSQL *mysql_real_connect_local(MYSQL *mysql); } diff --git a/include/mysql/plugin_encryption.h.pp b/include/mysql/plugin_encryption.h.pp index ac5798b1..97191c4a 100644 --- a/include/mysql/plugin_encryption.h.pp +++ b/include/mysql/plugin_encryption.h.pp @@ -487,6 +487,9 @@ extern struct sql_service_st { int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name); unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res); int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db); + my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); } *sql_service; MYSQL *mysql_real_connect_local(MYSQL *mysql); } diff --git a/include/mysql/plugin_ftparser.h.pp b/include/mysql/plugin_ftparser.h.pp index 919c9aae..cc2c276c 100644 --- a/include/mysql/plugin_ftparser.h.pp +++ b/include/mysql/plugin_ftparser.h.pp @@ -487,6 +487,9 @@ extern struct sql_service_st { int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name); unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res); int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db); + my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); } *sql_service; MYSQL *mysql_real_connect_local(MYSQL *mysql); } diff --git a/include/mysql/plugin_function.h.pp b/include/mysql/plugin_function.h.pp index f5b22dbd..afdcb534 100644 --- a/include/mysql/plugin_function.h.pp +++ b/include/mysql/plugin_function.h.pp @@ -487,6 +487,9 @@ extern struct sql_service_st { int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name); unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res); int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db); + my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); } *sql_service; MYSQL *mysql_real_connect_local(MYSQL *mysql); } diff --git a/include/mysql/plugin_password_validation.h.pp b/include/mysql/plugin_password_validation.h.pp index 115cbf26..3f238088 100644 --- a/include/mysql/plugin_password_validation.h.pp +++ b/include/mysql/plugin_password_validation.h.pp @@ -487,6 +487,9 @@ extern struct sql_service_st { int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name); unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res); int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db); + my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); } *sql_service; MYSQL *mysql_real_connect_local(MYSQL *mysql); } diff --git a/include/mysql/service_sql.h b/include/mysql/service_sql.h index 2fee56ca..e9d1491d 100644 --- a/include/mysql/service_sql.h +++ b/include/mysql/service_sql.h @@ -68,6 +68,9 @@ extern struct sql_service_st { int (STDCALL *mysql_set_character_set_func)(MYSQL *mysql, const char *cs_name); unsigned int (STDCALL *mysql_num_fields_func)(MYSQL_RES *res); int (STDCALL *mysql_select_db_func)(MYSQL *mysql, const char *db); + my_bool (STDCALL *mysql_ssl_set_func)(MYSQL *mysql, const char *key, + const char *cert, const char *ca, + const char *capath, const char *cipher); } *sql_service; #ifdef MYSQL_DYNAMIC_PLUGIN @@ -89,6 +92,7 @@ extern struct sql_service_st { #define mysql_set_character_set(M,C) sql_service->mysql_set_character_set_func(M,C) #define mysql_num_fields(R) sql_service->mysql_num_fields_func(R) #define mysql_select_db(M,D) sql_service->mysql_select_db_func(M,D) +#define mysql_ssl_set(M,K,C,A,P,H) sql_service->mysql_ssl_set_func(M,K,C,A,P,H) #else @@ -111,5 +115,3 @@ MYSQL *mysql_real_connect_local(MYSQL *mysql); #endif #endif /*MYSQL_SERVICE_SQL */ - - diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h index 8add7093..a0d0a338 100644 --- a/include/mysql/service_wsrep.h +++ b/include/mysql/service_wsrep.h @@ -95,6 +95,7 @@ extern struct wsrep_service_st { void (*wsrep_thd_kill_LOCK_func)(const MYSQL_THD thd); void (*wsrep_thd_kill_UNLOCK_func)(const MYSQL_THD thd); void (*wsrep_thd_set_wsrep_PA_unsafe_func)(MYSQL_THD thd); + uint32 (*wsrep_get_domain_id_func)(); } *wsrep_service; #define MYSQL_SERVICE_WSREP_INCLUDED @@ -144,6 +145,7 @@ extern struct wsrep_service_st { #define wsrep_thd_set_ignored_error(T,V) wsrep_service->wsrep_thd_set_ignored_error_func(T,V) #define wsrep_report_bf_lock_wait(T,I) wsrep_service->wsrep_report_bf_lock_wait(T,I) #define wsrep_thd_set_PA_unsafe(T) wsrep_service->wsrep_thd_set_PA_unsafe_func(T) +#define wsrep_get_domain_id(T) wsrep_service->wsrep_get_domain_id_func(T) #else #define MYSQL_SERVICE_WSREP_STATIC_INCLUDED @@ -253,5 +255,6 @@ extern "C" void wsrep_report_bf_lock_wait(const THD *thd, unsigned long long trx_id); /* declare parallel applying unsafety for the THD */ extern "C" void wsrep_thd_set_PA_unsafe(MYSQL_THD thd); +extern "C" uint32 wsrep_get_domain_id(); #endif #endif /* MYSQL_SERVICE_WSREP_INCLUDED */ diff --git a/include/mysql_com.h b/include/mysql_com.h index 1bc2fcc7..4b07be8f 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -477,7 +477,7 @@ typedef struct st_net { char net_skip_rest_factor; my_bool thread_specific_malloc; unsigned char compress; - my_bool unused3; /* Please remove with the next incompatible ABI change. */ + my_bool pkt_nr_can_be_reset; /* Pointer to query object in query cache, do not equal NULL (0) for queries in cache that have not stored its results yet |