1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-36337: mroonga_* udf correct ptr types for is_null/error

Shows up in mroonga UDF tests under clang with UBSAN:

UndefinedBehaviorSanitizer: function-type-mismatch

Accepted upstream: https://github.com/mroonga/mroonga/pull/902
This commit is contained in:
Daniel Black
2025-03-28 17:58:06 +11:00
committed by Sergei Golubchik
parent b9a20752a9
commit 2c4fe3557a
8 changed files with 11 additions and 11 deletions

View File

@@ -220,7 +220,7 @@ static void mroonga_command_escape_value(grn_ctx *ctx,
}
MRN_API char *mroonga_command(UDF_INIT *init, UDF_ARGS *args, char *result,
unsigned long *length, char *is_null, char *error)
unsigned long *length, uchar *is_null, uchar *error)
{
CommandInfo *info = (CommandInfo *)init->ptr;
grn_ctx *ctx = info->ctx;

View File

@@ -214,7 +214,7 @@ static void escape(EscapeInfo *info, UDF_ARGS *args)
}
MRN_API char *mroonga_escape(UDF_INIT *init, UDF_ARGS *args, char *result,
unsigned long *length, char *is_null, char *error)
unsigned long *length, uchar *is_null, uchar *error)
{
EscapeInfo *info = reinterpret_cast<EscapeInfo *>(init->ptr);
grn_ctx *ctx = info->ctx;

View File

@@ -412,8 +412,8 @@ MRN_API char *mroonga_highlight_html(UDF_INIT *init,
UDF_ARGS *args,
char *result,
unsigned long *length,
char *is_null,
char *error)
uchar *is_null,
uchar *error)
{
MRN_DBUG_ENTER_FUNCTION();

View File

@@ -45,7 +45,7 @@ MRN_API my_bool last_insert_grn_id_init(UDF_INIT *init, UDF_ARGS *args, char *me
return 0;
}
MRN_API longlong last_insert_grn_id(UDF_INIT *init, UDF_ARGS *args, char *is_null, char *error)
MRN_API longlong last_insert_grn_id(UDF_INIT *init, UDF_ARGS *args, uchar *is_null, uchar *error)
{
THD *thd = current_thd;
st_mrn_slot_data *slot_data = mrn_get_slot_data(thd, false);

View File

@@ -151,7 +151,7 @@ error:
}
MRN_API char *mroonga_normalize(UDF_INIT *init, UDF_ARGS *args, char *result,
unsigned long *length, char *is_null, char *error)
unsigned long *length, uchar *is_null, uchar *error)
{
st_mrn_normalize_info *info = (st_mrn_normalize_info *)init->ptr;
grn_ctx *ctx = info->ctx;

View File

@@ -244,8 +244,8 @@ MRN_API char *mroonga_query_expand(UDF_INIT *init,
UDF_ARGS *args,
char *result,
unsigned long *length,
char *is_null,
char *error)
uchar *is_null,
uchar *error)
{
MRN_DBUG_ENTER_FUNCTION();

View File

@@ -248,7 +248,7 @@ error:
}
MRN_API char *mroonga_snippet(UDF_INIT *init, UDF_ARGS *args, char *result,
unsigned long *length, char *is_null, char *error)
unsigned long *length, uchar *is_null, uchar *error)
{
st_mrn_snip_info *snip_info = (st_mrn_snip_info *) init->ptr;
grn_ctx *ctx = snip_info->ctx;

View File

@@ -323,8 +323,8 @@ MRN_API char *mroonga_snippet_html(UDF_INIT *init,
UDF_ARGS *args,
char *result,
unsigned long *length,
char *is_null,
char *error)
uchar *is_null,
uchar *error)
{
MRN_DBUG_ENTER_FUNCTION();