summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorKristofer Pettersson <kristofer.pettersson@sun.com>2009-10-12 14:46:00 +0200
committerKristofer Pettersson <kristofer.pettersson@sun.com>2009-10-12 14:46:00 +0200
commit8e9ec6a5796535ad77ccc9e5cfdb561bbe7f8da4 (patch)
tree9aecad9926c6c8fdcb00f57ad7387decff9ee427 /sql/handler.h
parentfe0437d3f9f181a554b161d8c636cb9023c59051 (diff)
downloadmariadb-git-8e9ec6a5796535ad77ccc9e5cfdb561bbe7f8da4.tar.gz
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.
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h1
1 files changed, 0 insertions, 1 deletions
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;
}