Bug #25382 | Passing NULL to an UDF called from stored procedures crashes server | ||
---|---|---|---|
Submitted: | 3 Jan 2007 11:38 | Modified: | 30 Jan 2007 3:39 |
Reporter: | Axel Schwenke | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: User-defined functions ( UDF ) | Severity: | S1 (Critical) |
Version: | 5.0.32 | OS: | |
Assigned to: | Georgi Kodinov | CPU Architecture: | Any |
Tags: | bfsm_2007_01_18, Q1, udf |
[3 Jan 2007 11:38]
Axel Schwenke
[15 Jan 2007 12:38]
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/18113 ChangeSet@1.2380, 2007-01-15 14:38:17+02:00, gkodinov@macbook.gmz +3 -0 Bug #25382: Passing NULL to an UDF called from stored procedures crashes server Check for null value is reliable only after calling some of the val_xxx() methods. Fixed by swapping the order of val_xxx() and null_value check.
[18 Jan 2007 15:34]
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/18342 ChangeSet@1.2380, 2007-01-18 17:33:38+02:00, gkodinov@macbook.gmz +3 -0 Bug #25382: Passing NULL to an UDF called from stored procedures crashes server Check for null value is reliable only after calling some of the val_xxx() methods. If the val_xxx() method is not called the null_value flag will be set only for certain types of NULL values (like SQL constant NULLs for example). This caused a crash while trying to dereference a NULL pointer that is returned by val_str() for NULL values. Fixed by swapping the order of val_xxx() and null_value check.
[28 Jan 2007 2:24]
Igor Babaev
The fix has been pushed into 5.0.36, 5.1.16-beta main trees.
[30 Jan 2007 3:39]
Paul DuBois
Noted in 5.0.36, 5.1.16 changelogs. Passing a NULL value to a user-defined function from within a stored procedure crashes the server.