• Kristofer Pettersson's avatar
    Bug#53191 Lock_time in slow log is negative when logging stored routines · cf2e7c77
    Kristofer Pettersson authored
    Logging slow stored procedures caused the slow log to write 
    very large lock times. The lock times was a result of a 
    negative number being cast to an unsigned integer.
    The reason the lock time appeard negative was because 
    one of the measurements points was reset after execution
    causing it to change order with the start time of the 
    statement.
          
    This bug is related to bug 47905 which in turn was 
    introduced because of a joint fix for 12480,12481,12482 and 11587.
    
    The fix is to only reset the start_time before any statement
    execution in a SP while not resetting start_utime or
    utime_after_lock which are used for measuring the 
    performance of the SP. Start_time is used to set the
    timestamp on the replication event which controlls how
    the slave interprets time functions like NOW().
    cf2e7c77
sp_head.cc 104 KB