Skip to content

Commit c67f612

Browse files
author
Grzegorz Szwarc
committed
Bug #27691897 UNDEFINED BEHAVIOR IN RESET_GLOBAL_STATUS_VARIABLES
Description: All tests in the x test suite give UBSAN warnings: sql/sql_udf.h:108:20: runtime error: call to function (anonymous namespace)::reset_global_status_variables (UDF_INIT*, UDF_ARGS*, char*, char*) through pointer to incorrect function type 'long long (*)(UDF_INIT *,UDF_ARGS *, unsigned char *, unsigned char *)' Reviewed-by: Lukasz Kotula <[email protected]> Reviewed-by: Tomasz Stepniak <[email protected]> RB:19179
1 parent 331e9cb commit c67f612

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/x/src/components/global_status_reset.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ REQUIRES_SERVICE_PLACEHOLDER(mysqlx_maintenance);
2929

3030
namespace {
3131

32-
long long reset_global_status_variables(UDF_INIT *, UDF_ARGS *, char *,
33-
char *) {
32+
long long reset_global_status_variables( // NOLINT(runtime/int)
33+
UDF_INIT *, UDF_ARGS *, unsigned char *, unsigned char *) {
3434
return mysql_service_mysqlx_maintenance->reset_global_status_variables() ? 1
3535
: 0;
3636
}

0 commit comments

Comments
 (0)