diff --git a/sql/udf_example.c b/sql/udf_example.c index 5165a577555..6c07a929b04 100644 --- a/sql/udf_example.c +++ b/sql/udf_example.c @@ -1115,15 +1115,15 @@ my_bool check_const_len_init(UDF_INIT *initid, UDF_ARGS *args, char *message) } if (args->args[0] == 0) { - initid->ptr= "Not constant"; + initid->ptr= (char*)"Not constant"; } else if(strlen(args->args[0]) == args->lengths[0]) { - initid->ptr= "Correct length"; + initid->ptr= (char*)"Correct length"; } else { - initid->ptr= "Wrong length"; + initid->ptr= (char*)"Wrong length"; } initid->max_length = 100; return 0; diff --git a/sql/udf_example.def b/sql/udf_example.def index 7a87147d7b6..7c69b681f8b 100644 --- a/sql/udf_example.def +++ b/sql/udf_example.def @@ -23,3 +23,4 @@ EXPORTS avgcost is_const is_const_init + check_const_len