diff options
author | unknown <msvensson@pilot.(none)> | 2007-08-09 10:21:28 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.(none)> | 2007-08-09 10:21:28 +0200 |
commit | 0f54801412886753b480d6d27bf75f3e8c6fdee7 (patch) | |
tree | 2eee5289850a309ca91b90a48de766e3afc8f452 | |
parent | ccb32a59465eb502d6e292e5f074dcade1ec7fa8 (diff) | |
download | mariadb-git-0f54801412886753b480d6d27bf75f3e8c6fdee7.tar.gz |
Bug#29804 UDF parameters don't contain correct string length
- Fix warnings
- Export 'check_const_len' from udf_example.dll
sql/udf_example.c:
Fix warnings
sql/udf_example.def:
Add 'check_const_len' function to be exported from udf_example.dll
-rw-r--r-- | sql/udf_example.c | 6 | ||||
-rw-r--r-- | sql/udf_example.def | 1 |
2 files changed, 4 insertions, 3 deletions
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 |