List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:September 30 2010 6:24am
Subject:Re: bzr commit into mysql-next-mr-bugfixing branch
(tor.didriksen:3305) Bug#52002
View as plain text  
Hi, Tor!

On Sep 30, Tor Didriksen wrote:

>>> >  +  An alternative would be to use _exit(EXIT_FAILURE),
>>> >  +  but then valgrind would report lots of memory leaks.
>>> >  + */
>>>      
>> Somehow I'm unhappy with valgrind workarounds, it obfuscates of
>> correct code in order to please the tool, but well. I cannot propose
>> anything better either.
>>    
> Well, mtr isn't really designed for crash/recovery testing.  For the
> test cases involved here, I think it is better to simply kill the
> server immediately, rather than to do a normal exit.

mtr is will used for crash/recovery testing.

Note that you simply cannot use exit() - it will execute destructors of
the statically allocated objects, so the state will be different from
"quit here, I said, immediately".

In particular - I'm not sure it's  the case now, but it was earlier -
MYSQL_LOG_BIN closes binlogs in the destructor and marks them as
"properly closed". Thus there is no XA crash recovery on startup,
because, according to binlog, mysqld was shut down gracefully.

In that sense kill -9 is the most close to power failure.

Regards,
Sergei

Thread
bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3305) Bug#52002Tor Didriksen29 Sep
  • RE: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3305) Bug#52002Vladislav Vaintroub29 Sep
    • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3305)Bug#52002Tor Didriksen30 Sep
      • Re: bzr commit into mysql-next-mr-bugfixing branch(tor.didriksen:3305) Bug#52002Sergei Golubchik30 Sep
        • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3305)Bug#52002Tor Didriksen30 Sep
          • Re: bzr commit into mysql-next-mr-bugfixing branch(tor.didriksen:3305) Bug#52002Sergei Golubchik30 Sep