• unknown's avatar
    Bug #25382: Passing NULL to an UDF called from stored procedures · 4ced38b8
    unknown authored
     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.
    
    
    mysql-test/r/udf.result:
      Bug #25382: Passing NULL to an UDF called from stored procedures 
       crashes server
       - test case
    mysql-test/t/udf.test:
      Bug #25382: Passing NULL to an UDF called from stored procedures 
       crashes server
       - test case
    sql/item_func.cc:
      Bug #25382: Passing NULL to an UDF called from stored procedures 
       crashes server
       - reliably check null_value
    4ced38b8
udf.result 8.79 KB