From a216672dab202207a21f9d2ffdc4b00eb958060f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 10 Jan 2021 21:20:51 +0100 Subject: MDEV-16341 Wrong length for USER columns in performance_schema tables use USERNAME_CHAR_LENGTH and HOSTNAME_LENGTH for perfschema USER and HOST columns --- include/mysql_com.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/mysql_com.h b/include/mysql_com.h index a63bcc9d87e..398bf9058df 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -26,7 +26,7 @@ #define HOSTNAME_LENGTH 60 #define SYSTEM_CHARSET_MBMAXLEN 3 #define NAME_CHAR_LEN 64U /* Field/table name length */ -#define USERNAME_CHAR_LENGTH 128U +#define USERNAME_CHAR_LENGTH 128 #define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) #define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN) #define DEFINER_CHAR_LENGTH (USERNAME_CHAR_LENGTH + HOSTNAME_LENGTH + 1) -- cgit v1.2.1 From 2676c9aad79b66705420922d393a9f498a2a6693 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 1 Feb 2021 16:23:49 +0100 Subject: galera fixes related to THD::LOCK_thd_kill Since 2017 (c2118a08b1) THD::awake() no longer requires LOCK_thd_data. It uses LOCK_thd_kill, and this latter mutex is used to prevent a thread of dying, not LOCK_thd_data as before. --- include/mysql/service_wsrep.h | 6 ++++++ include/service_versions.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/mysql/service_wsrep.h b/include/mysql/service_wsrep.h index e9c3b0fa86a..671ef515135 100644 --- a/include/mysql/service_wsrep.h +++ b/include/mysql/service_wsrep.h @@ -119,6 +119,8 @@ extern struct wsrep_service_st { my_bool (*wsrep_thd_is_applier_func)(MYSQL_THD); void (*wsrep_report_bf_lock_wait_func)(MYSQL_THD thd, unsigned long long trx_id); + void (*wsrep_thd_kill_LOCK_func)(THD *thd); + void (*wsrep_thd_kill_UNLOCK_func)(THD *thd); } *wsrep_service; #ifdef MYSQL_DYNAMIC_PLUGIN @@ -143,6 +145,8 @@ extern struct wsrep_service_st { #define wsrep_run_wsrep_commit(T,A) wsrep_service->wsrep_run_wsrep_commit_func(T,A) #define wsrep_thd_LOCK(T) wsrep_service->wsrep_thd_LOCK_func(T) #define wsrep_thd_UNLOCK(T) wsrep_service->wsrep_thd_UNLOCK_func(T) +#define wsrep_thd_kill_LOCK(T) wsrep_service->wsrep_thd_kill_LOCK_func(T) +#define wsrep_thd_kill_UNLOCK(T) wsrep_service->wsrep_thd_kill_UNLOCK_func(T) #define wsrep_thd_awake(T,S) wsrep_service->wsrep_thd_awake_func(T,S) #define wsrep_thd_conflict_state(T,S) wsrep_service->wsrep_thd_conflict_state_func(T,S) #define wsrep_thd_conflict_state_str(T) wsrep_service->wsrep_thd_conflict_state_str_func(T) @@ -226,6 +230,8 @@ void wsrep_lock_rollback(); void wsrep_post_commit(THD* thd, bool all); void wsrep_thd_LOCK(THD *thd); void wsrep_thd_UNLOCK(THD *thd); +void wsrep_thd_kill_LOCK(THD *thd); +void wsrep_thd_kill_UNLOCK(THD *thd); void wsrep_thd_awake(THD *thd, my_bool signal); void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state); bool wsrep_thd_ignore_table(THD *thd); diff --git a/include/service_versions.h b/include/service_versions.h index 6e138fab5a4..09ba702a225 100644 --- a/include/service_versions.h +++ b/include/service_versions.h @@ -41,4 +41,4 @@ #define VERSION_thd_specifics 0x0100 #define VERSION_thd_timezone 0x0100 #define VERSION_thd_wait 0x0100 -#define VERSION_wsrep 0x0202 +#define VERSION_wsrep 0x0203 -- cgit v1.2.1