1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.


mysql-test/r/udf.result:
  Add result.
mysql-test/t/udf.test:
  Add test.
sql/sql_udf.h:
  Initialize is_null to false before trying to use it, so that historical NULLs
  don't affect our operation.
This commit is contained in:
unknown
2006-06-08 13:25:28 -04:00
parent 6f42227f31
commit e2495206b2
3 changed files with 32 additions and 0 deletions

View File

@ -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;