List:Commits« Previous MessageNext Message »
From:Kristofer Pettersson Date:October 12 2009 2:46pm
Subject:bzr commit into mysql-5.1-bugteam branch (kristofer.pettersson:3119)
Bug#46944
View as plain text  
#At file:///Users/thek/Development/51-bug46944/ based on
revid:anurag.shekhar@stripped

 3119 Kristofer Pettersson	2009-10-12
      Bug#46944 Internal prepared XA transction XIDs are not
                removed if server_id changes
      
      When MySQL crashes (or a snapshot is taken which simulates
      a crash), then it is possible that internal XA
      transactions (used to sync the binary log and InnoDB)
      can be left in a PREPARED state, whereas they should be
      rolled back.  This is done when the server_id changes
      before the restart occurs.  
      
      This patch releases he restriction that the server_id
      should be consistent if the XID is to be considerred
      valid. The rollback phase should then be able to
      clean up all pending XA transactions.

    modified:
      sql/handler.h
=== modified file 'sql/handler.h'
--- a/sql/handler.h	2009-09-18 13:01:18 +0000
+++ b/sql/handler.h	2009-10-12 12:46:00 +0000
@@ -398,7 +398,6 @@ struct xid_t {
   my_xid get_my_xid()
   {
     return gtrid_length == MYSQL_XID_GTRID_LEN && bqual_length == 0 &&
-           !memcmp(data+MYSQL_XID_PREFIX_LEN, &server_id, sizeof(server_id))
&&
            !memcmp(data, MYSQL_XID_PREFIX, MYSQL_XID_PREFIX_LEN) ?
            quick_get_my_xid() : 0;
   }


Attachment: [text/bzr-bundle]
Thread
bzr commit into mysql-5.1-bugteam branch (kristofer.pettersson:3119)Bug#46944Kristofer Pettersson12 Oct 2009
  • Re: bzr commit into mysql-5.1-bugteam branch(kristofer.pettersson:3119) Bug#46944Sergei Golubchik16 Oct 2009