summaryrefslogtreecommitdiff
path: root/sql/sql_udf.h
diff options
context:
space:
mode:
authorcmiller@zippy.(none) <>2006-06-08 13:25:28 -0400
committercmiller@zippy.(none) <>2006-06-08 13:25:28 -0400
commit4bb358924cce7f3e6c4bffbc228441cb16131cb1 (patch)
tree655da24031881eafeb600ef54597c989f70793b1 /sql/sql_udf.h
parentf25fcf79a59d285162f2f9c11f1021f407312c06 (diff)
downloadmariadb-git-4bb358924cce7f3e6c4bffbc228441cb16131cb1.tar.gz
Bug#19904: UDF: not initialized *is_null per row
The is_null value was initialized once and thereafter only set to indicate NULL, and never unset to indicate not-NULL. Now set is_null to false, in addition to only setting it to true when the value in question is null.
Diffstat (limited to 'sql/sql_udf.h')
-rw-r--r--sql/sql_udf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_udf.h b/sql/sql_udf.h
index d588572a762..d0729deecaa 100644
--- a/sql/sql_udf.h
+++ b/sql/sql_udf.h
@@ -70,6 +70,7 @@ class udf_handler :public Sql_alloc
void cleanup();
double val(my_bool *null_value)
{
+ is_null= 0;
if (get_arguments())
{
*null_value=1;
@@ -88,6 +89,7 @@ class udf_handler :public Sql_alloc
}
longlong val_int(my_bool *null_value)
{
+ is_null= 0;
if (get_arguments())
{
*null_value=1;