summaryrefslogtreecommitdiff
path: root/sql/udf_example.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-02-11 23:50:40 +0100
committerSergei Golubchik <serg@mariadb.org>2015-02-11 23:50:40 +0100
commit8e80f91fa3e584d6b681bfbb4664e80a255af866 (patch)
treeaf4f13f6f0290ee72b33a0642aa7c03e4e5fcd1c /sql/udf_example.c
parent63108dc9d2cc9f31ae9927817652be465a17f767 (diff)
parent3ee8aa216d55b858ba9e53874359dcac9a82933a (diff)
downloadmariadb-git-8e80f91fa3e584d6b681bfbb4664e80a255af866.tar.gz
Merge remote-tracking branch 'mysql/5.5' into bb-5.5-merge @ mysql-5.5.42
Diffstat (limited to 'sql/udf_example.c')
-rw-r--r--sql/udf_example.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/udf_example.c b/sql/udf_example.c
index 36a5eafb704..a48801d1c4a 100644
--- a/sql/udf_example.c
+++ b/sql/udf_example.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2010, Oracle and/or its affiliates.
+ Copyright (c) 2000, 2014, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -296,9 +296,12 @@ char *metaphon(UDF_INIT *initid __attribute__((unused)),
if (!word) /* Null argument */
{
+ /* The length is expected to be zero when the argument is NULL. */
+ assert(args->lengths[0] == 0);
*is_null=1;
return 0;
}
+
w_end=word+args->lengths[0];
org_result=result;