Browse Source
Bug#53191 Lock_time in slow log is negative when logging stored routines
Bug#53191 Lock_time in slow log is negative when logging stored routines
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().
pull/374/head
3 changed files with 196 additions and 9 deletions
-
73mysql-test/suite/sys_vars/r/slow_query_log_func.result
-
87mysql-test/suite/sys_vars/t/slow_query_log_func.test
-
43sql/sp_head.cc
Write
Preview
Loading…
Cancel
Save
Reference in new issue