• unknown's avatar
    Bug #25643: SEC_TO_TIME function problem · 3cb3a9a1
    unknown authored
     Checking for NULL before calling the val_xxx()
     methods only checks for such arguments that are 
     known to be NULLs at compile time. 
     The arguments that may or may not contain
     NULLs (e.g. function calls and possibly others)
     are not checked at all.
     Fixed by first calling the val_xxx() method and
     then checking for null in SEC_TO_TIME().
     In addition QUARTER() was not returning 0 (as all the 
     val_int() functions do when processing a NULL value).
    
    
    mysql-test/r/func_time.result:
      Bug #25643: SEC_TO_TIME function problem
       - test case
    mysql-test/t/func_time.test:
      Bug #25643: SEC_TO_TIME function problem
       - test case
    sql/item_timefunc.cc:
      Bug #25643: SEC_TO_TIME function problem
       - null handling fixed for QUARTER() and SEC_TO_TIME()
    3cb3a9a1
func_time.result 50.5 KB