List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:December 16 2010 9:22am
Subject:Re: bzr commit into mysql-5.1-bugteam branch (davi:3520) Bug#42054
View as plain text  
On 12/16/10 5:21 AM, Dmitry Lenev wrote:
> Hello Davi!
>
> * Davi Arnaut<davi.arnaut@stripped>  [10/12/14 02:35]:
>> # At a local mysql-5.1-bugteam repository of davi
>>
>>   3520 Davi Arnaut	2010-12-13
>>        Bug#42054: SELECT CURDATE() is returning bad value
>
> ...
>
>>        Since this logic was being used due to ancient performance reasons,
>>        the solution is to simply rely on time(), which nowadays is just a
>>        wrapper around the somewhat fast gettimeofday function.
>
> Could you please elaborate when has this change occurred and what
> has changed?

I didn't look up the history. What I had found was this:

http://tinyurl.com/38bqrmq

Where time() is mapped to a gettimeofday.

But now I see that there is another time implementation:

http://tinyurl.com/282rn6n

that calls the time system call.

We need to find out what is the difference between libbc and libc.

> Looking at OpenSolaris sources (yes, I know it is discontinued) I still
> can see that time() uses systrap whereas gethrtime() uses something which
> is called *fast*" systrap.

gettimeofday also uses a "fast" systrap:

http://tinyurl.com/296f2vq

> Also I have found the following article claiming that using gethrtime
> gives boost to MySQL performance even on Solaris 10:
>
> http://developers.sun.com/solaris/articles/mysql_perf_tune.html

I find this article highly suspicious since this hack exist at least 
since July of 2007. Also, obviously, the explanation there is simply 
wrong as we _can't_ use gethrtime for timing.

> And finally please note that for 5.1 we still support Solaris 8 and 9:
>
> http://www.mysql.com/support/supportedplatforms/database.html
>

What is your point?

Regards,

Davi
Thread
bzr commit into mysql-5.1-bugteam branch (davi:3520) Bug#42054Davi Arnaut14 Dec
Re: bzr commit into mysql-5.1-bugteam branch (davi:3520) Bug#42054Magne Mæhre15 Dec
Re: bzr commit into mysql-5.1-bugteam branch (davi:3520) Bug#42054Dmitry Lenev16 Dec
  • Re: bzr commit into mysql-5.1-bugteam branch (davi:3520) Bug#42054Davi Arnaut16 Dec
    • Re: bzr commit into mysql-5.1-bugteam branch (davi:3520) Bug#42054Dmitry Lenev16 Dec
      • Re: bzr commit into mysql-5.1-bugteam branch (davi:3520) Bug#42054Davi Arnaut16 Dec
        • Re: bzr commit into mysql-5.1-bugteam branch (davi:3520) Bug#42054Dmitry Lenev16 Dec
          • Re: bzr commit into mysql-5.1-bugteam branch (davi:3520) Bug#42054Davi Arnaut16 Dec