Commit 5387af00 authored by Davi Arnaut's avatar Davi Arnaut

Merge of mysql-5.1 into mysql-5.5.

parents 61b5b3e4 c4c94ea0
......@@ -165,7 +165,13 @@ ulonglong my_micro_time_and_time(time_t *time_arg)
mysql_mutex_lock(&THR_LOCK_time);
cur_gethrtime= gethrtime();
if ((cur_gethrtime - prev_gethrtime) > DELTA_FOR_SECONDS)
/*
Due to bugs in the Solaris (x86) implementation of gethrtime(),
the time returned by it might not be monotonic. Don't use the
cached time(2) value if this is a case.
*/
if ((prev_gethrtime > cur_gethrtime) ||
((cur_gethrtime - prev_gethrtime) > DELTA_FOR_SECONDS))
{
cur_time= time(0);
prev_gethrtime= cur_gethrtime;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment