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:
committed by
Sergei Golubchik
parent
b9a20752a9
commit
2c4fe3557a
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user