From 8e9ec6a5796535ad77ccc9e5cfdb561bbe7f8da4 Mon Sep 17 00:00:00 2001 From: Kristofer Pettersson Date: Mon, 12 Oct 2009 14:46:00 +0200 Subject: 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. --- sql/handler.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/handler.h b/sql/handler.h index fe8f7c437ff..7fc2bf2fece 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -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; } -- cgit v1.2.1