List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:March 27 2008 8:44am
Subject:Re: bk commit into 5.1 tree (mats:1.2559) BUG#29020
View as plain text  
Chuck Bell wrote:
> Mats,
>
> I had a test failure on Windows and Linux. 
>
> Run with "./mysql-test-run.pl --mysqld=--binlog-format=row"
>
> binlog.binlog_row_ctype_ucs    [ fail ]
>
> Warning: Not freed memory segments: 2
> Warning: Memory that was not free'ed (559 bytes):
>            103 bytes at 0x001152bb8, allocated at line 1018 in
> 'D:\source\c++\my
> sql-5.1_BUG_29020\sql\log_event.cc'
>            456 bytes at 0x001152350, allocated at line  201 in
> '..\mysys\my_allo
> c.c'
> ---
> d:/source/c++/mysql-5.1_BUG_29020/mysql-test/suite/binlog/r/binlog_row_ctype
> _ucs.result     2008-03-26 17:59:10.209765000 +0300
> +++
> d:\source\c++\mysql-5.1_BUG_29020\mysql-test\suite\binlog\r\binlog_row_ctype
> _ucs.reject     2008-03-26 18:29:48.191765000 +0300
> @@ -16,10 +16,14 @@
>  ROLLBACK/*!*/;
>  use test/*!*/;
>  SET TIMESTAMP=10000/*!*/;
> +SET @@session.pseudo_thread_id=999999999/*!*/;
>  SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1,
> @@session.uni
> que_checks=1/*!*/;
>  SET @@session.sql_mode=0/*!*/;
> +SET @@session.auto_increment_increment=1,
> @@session.auto_increment_offset=1/*!*
> /;
>  /*!\C latin1 *//*!*/;
>  SET
> @@session.character_set_client=8,@@session.collation_connection=8,@@session
> .collation_server=8/*!*/;
> +SET @@session.lc_time_names=0/*!*/;
> +SET @@session.collation_database=DEFAULT/*!*/;
>  BEGIN
>  /*!*/;
>  SET TIMESTAMP=10000/*!*/;
>
> mysqltest: Result content mismatch
>
> Other than that, there were only very minor changes below. 
>   

Hmmm... I don't have this failure locally...

I'll check if it is a result file change missing.

>
> [...]
>
>   
>> +
>> +    /*
>> +      The only valid positions that can be truncated to are at the
>> +      beginning of a statement. We are relying on this fact 
>> to be able
>> +      to set the at_least_one_stmt flag correctly. In other word, if
>> +      we are truncating to the beginning of the transaction cache,
>> +      there will be no statements in the cache, otherwhise, we will
>> +      have at least one statement in the transaction cache.
>> +     */
>> +    at_least_one_stmt= (pos > 0);
>>    }
>>     
>
> Minor spelling issues in comments. Should read:
>
> "In other words, if we are truncating..."
>              ^^^
> and:
>
> "...cache, otherwise, we will..."
>                ^^^
>
> Or possibly this, but above is ok, just being picky. :)
>
> "...cache. Otherwise we will..."
>   

It looks better, so I'll go for it. :)

>         ^^^^^^^^^^^^
>
> [...]
>
>   
>>    /*
>> -    Write commit event if at least one of the following holds:
>> -     - the user sends an explicit COMMIT; or
>> -     - the autocommit flag is on, and we are not inside a BEGIN.
>> -    However, if the user has not sent an explicit COMMIT, and we are
>> -    either inside a BEGIN or run with autocommit off, then 
>> this is not
>> -    the end of a transaction and we should not write a commit event.
>> +    Decision table for committing a transaction:
>> +
>> +    =============================  = = = = = = = = = = = = = = = =
>> +    Real transaction               N N N N N N N N N N N N N N N N
>> +    Statement in cache             N N N N N N N N Y Y Y Y Y Y Y Y
>> +    In transaction                 N N N N Y Y Y Y N N N N Y Y Y Y
>> +    Stmt modified non-trans        N N Y Y N N Y Y N N Y Y N N Y Y
>> +    All modified non-trans         N Y N Y N Y N Y N Y N Y N Y N Y
>> +
>> +    Action: (C)ommit/(A)ccumulate  C C C C A C C C - - - - A A A A
>> +    =============================  = = = = = = = = = = = = = = = =
>> +
>> +
>> +    =============================  = = = = = = = = = = = = = = = =
>> +    Real transaction               Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
>> +    Statement in cache             N N N N N N N N Y Y Y Y Y Y Y Y
>> +    In transaction                 N N N N Y Y Y Y N N N N Y Y Y Y
>> +    Stmt modified non-trans        N N Y Y N N Y Y N N Y Y N N Y Y
>> +    All modified non-trans         N Y N Y N Y N Y N Y N Y N Y N Y
>> +
>> +    (C)ommit/(A)ccumulate/(-)      - - - - C C C C - - - - C C C C
>> +    =============================  = = = = = = = = = = = = = = = =
>> +
>> +    In other words, we commit the transaction if and only if:
>> +     - The keep log option is set
>> +     - We are in a transaction and:
>> +       - A full transaction is committed,
>> +       - A non-transactional statement is committed and there is
>> +         no statement cached, or
>> +     - We are not in a transaction and committing a statement
>> +
>> +    Otherwise, we accumulate the statement
>>    */
>>     
>
> Excellent comment!!! This needs to go in the documentation!
>   

Andrei suggested some explanation on how to read the table, so I might 
elaborate a little.

Just my few cents,
Mats Kindahl

>
>
>   


-- 
Mats Kindahl
Lead Software Developer
Replication Team
MySQL AB, www.mysql.com


Thread
bk commit into 5.1 tree (mats:1.2559) BUG#29020Mats Kindahl25 Mar
  • Re: bk commit into 5.1 tree (mats:1.2559) BUG#29020Andrei Elkin26 Mar
    • Re: bk commit into 5.1 tree (mats:1.2559) BUG#29020Mats Kindahl27 Mar
      • Re: bk commit into 5.1 tree (mats:1.2559) BUG#29020Andrei Elkin27 Mar
        • Re: bk commit into 5.1 tree (mats:1.2559) BUG#29020Mats Kindahl28 Mar
          • Re: bk commit into 5.1 tree (mats:1.2559) BUG#29020Andrei Elkin28 Mar
            • Re: bk commit into 5.1 tree (mats:1.2559) BUG#29020Mats Kindahl28 Mar
  • RE: bk commit into 5.1 tree (mats:1.2559) BUG#29020Chuck Bell26 Mar
    • Re: bk commit into 5.1 tree (mats:1.2559) BUG#29020Mats Kindahl27 Mar
  • RE: bk commit into 5.1 tree (mats:1.2559) BUG#29020Chuck Bell26 Mar
    • Re: bk commit into 5.1 tree (mats:1.2559) BUG#29020Mats Kindahl27 Mar