diff options
author | Eugene Kosov <claprix@yandex.ru> | 2020-10-06 13:50:26 +0300 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2020-10-06 13:51:06 +0300 |
commit | 350c9eb705477afef876e982201ad55dcc65bc9c (patch) | |
tree | 0562d8b548191ff0deb3fc09b16fc8635247e6bb /sql | |
parent | 33f19876a2fbc9378af25cebd0651cd9bdc5407b (diff) | |
download | mariadb-git-350c9eb705477afef876e982201ad55dcc65bc9c.tar.gz |
MDEV-23894 UBSAN: several call to function show_binlog_vars(THD*, st_mysql_show_var*, char*) through pointer to incorrect function type 'int (*)(THD *, st_mysql_show_var *, void *, system_status_var *, enum_var_type) errors
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log.cc | 3 | ||||
-rw-r--r-- | sql/mysqld.cc | 10 | ||||
-rw-r--r-- | sql/wsrep_mysqld.h | 4 | ||||
-rw-r--r-- | sql/wsrep_var.cc | 4 |
4 files changed, 11 insertions, 10 deletions
diff --git a/sql/log.cc b/sql/log.cc index cb484210c50..c784dc1c308 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -10403,7 +10403,8 @@ binlog_checksum_update(MYSQL_THD thd, struct st_mysql_sys_var *var, } -static int show_binlog_vars(THD *thd, SHOW_VAR *var, char *buff) +static int show_binlog_vars(THD *thd, SHOW_VAR *var, void *, + system_status_var *status_var, enum_var_type) { mysql_bin_log.set_status_variables(thd); var->type= SHOW_ARRAY; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 4516e8ff596..ad0b1d9c000 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8337,8 +8337,8 @@ show_ssl_get_server_not_after(THD *thd, SHOW_VAR *var, char *buff, #endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */ -static int show_default_keycache(THD *thd, SHOW_VAR *var, char *buff, - enum enum_var_type scope) +static int show_default_keycache(THD *thd, SHOW_VAR *var, void *buff, + system_status_var *, enum_var_type) { struct st_data { KEY_CACHE_STATISTICS stats; @@ -8371,7 +8371,7 @@ static int show_default_keycache(THD *thd, SHOW_VAR *var, char *buff, v->name= 0; - DBUG_ASSERT((char*)(v+1) <= buff + SHOW_VAR_FUNC_BUFF_SIZE); + DBUG_ASSERT((char*)(v+1) <= static_cast<char*>(buff) + SHOW_VAR_FUNC_BUFF_SIZE); #undef set_one_keycache_var @@ -8395,8 +8395,8 @@ static int show_memory_used(THD *thd, SHOW_VAR *var, char *buff, #ifndef DBUG_OFF -static int debug_status_func(THD *thd, SHOW_VAR *var, char *buff, - enum enum_var_type scope) +static int debug_status_func(THD *thd, SHOW_VAR *var, void *buff, + system_status_var *, enum_var_type) { #define add_var(X,Y,Z) \ v->name= X; \ diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index e28b90885b4..3d68eda0d6b 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -131,8 +131,8 @@ extern const char* wsrep_provider_name; extern const char* wsrep_provider_version; extern const char* wsrep_provider_vendor; -int wsrep_show_status(THD *thd, SHOW_VAR *var, char *buff, - enum enum_var_type scope); +int wsrep_show_status(THD *thd, SHOW_VAR *var, void *buff, + system_status_var *status_var, enum_var_type scope); int wsrep_init(); void wsrep_deinit(bool free_options); diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index 9777cc6ec62..45f929de9de 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -726,8 +726,8 @@ static int show_var_cmp(const void *var1, const void *var2) return strcasecmp(((SHOW_VAR*)var1)->name, ((SHOW_VAR*)var2)->name); } -int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff, - enum enum_var_type scope) +int wsrep_show_status (THD *thd, SHOW_VAR *var, void *buff, + system_status_var *, enum_var_type scope) { uint i, maxi= SHOW_VAR_FUNC_BUFF_SIZE / sizeof(*var) - 1; SHOW_VAR *v= (SHOW_VAR *)buff; |