Commit a45cb2cc authored by Davi Arnaut's avatar Davi Arnaut

Merge of mysql-5.1 into mysql-5.5.

parents 48a6f90c 644f0c1d
...@@ -165,7 +165,13 @@ ulonglong my_micro_time_and_time(time_t *time_arg) ...@@ -165,7 +165,13 @@ ulonglong my_micro_time_and_time(time_t *time_arg)
mysql_mutex_lock(&THR_LOCK_time); mysql_mutex_lock(&THR_LOCK_time);
cur_gethrtime= gethrtime(); 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); cur_time= time(0);
prev_gethrtime= cur_gethrtime; 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