Bug #19904 | UDF: not initialized *is_null per row | ||
---|---|---|---|
Submitted: | 18 May 2006 9:33 | Modified: | 13 Jul 2006 20:32 |
Reporter: | Masaaki HIROSE | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.21 | OS: | Linux (Linux) |
Assigned to: | Chad MILLER | CPU Architecture: | Any |
[18 May 2006 9:33]
Masaaki HIROSE
[18 May 2006 21:34]
Hartmut Holzgraefe
Verified using the following addition to the existing UDF test case ===== mysql-test/r/udf.result 1.4 vs edited ===== --- 1.4/mysql-test/r/udf.result 2006-04-27 16:32:35 +02:00 +++ edited/mysql-test/r/udf.result 2006-05-18 23:23:58 +02:00 @@ -76,6 +76,16 @@ metaphon(testval) HL drop procedure xxx2; +CREATE TABLE t1(n INT); +INSERT INTO t1 VALUES (1),(2),(NULL),(3),(4); +SELECT myfunc_double(n) AS f FROM t1; +f +49.00 +50.00 +NULL +51.00 +52.00 +DROP TABLE t1; DROP FUNCTION metaphon; DROP FUNCTION myfunc_double; DROP FUNCTION myfunc_nonexist; ===== mysql-test/t/udf.test 1.4 vs edited ===== --- 1.4/mysql-test/t/udf.test 2006-04-27 16:32:35 +02:00 +++ edited/mysql-test/t/udf.test 2006-05-18 23:22:28 +02:00 @@ -99,6 +99,14 @@ call XXX2(); drop procedure xxx2; +#----------------------------------------------- +# Bug#19904 UDF: not initialized *is_null per row +#----------------------------------------------- +CREATE TABLE t1(n INT); +INSERT INTO t1 VALUES (1),(2),(NULL),(3),(4); +SELECT myfunc_double(n) AS f FROM t1; +DROP TABLE t1; + # # Drop the example functions from udf_example
[23 May 2006 23:44]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/6803
[8 Jun 2006 17:25]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/7409
[26 Jun 2006 18:04]
Chad MILLER
Available in 5.0.23. A user-defined function, which is called on each row of a returned table, could receive a in_null state that is set, if it was set previously. Now, the is_null is reset to False before each invocation of a UDF.
[13 Jul 2006 20:32]
Paul DuBois
The fix went to 5.0.25. Noted in 5.0.25 changelog.