Oracle 5.0 Reference Manual page 2615

Table of Contents

Advertisement

• Global transaction ID tables must be deployed on all masters and replicas.
• The GTID can have holes. Only PHP clients using the plugin will maintain the table. Other clients will
not.
• Client-side transaction boundary detection is based on API calls only.
• Client-side transaction boundary detection does not take implicit commit into account. Some MySQL
SQL statements cause an implicit commit and cannot be rolled back.
Using server-side global transaction identifier
Starting with PECL/mysqlnd_ms 1.3.0-alpha the MySQL 5.6.5-m8 or newer built-in global transaction
identifier feature is supported. Use of the server feature lifts all of the above listed limitations. Please,
see the MySQL Reference Manual for limitations and preconditions for using server built-in global
transaction identifiers.
Whether to use the client-side emulation or the server built-in functionality is a question not directly
related to the plugin, thus it is not discussed in depth. There are no plans to remove the client-side
emulation and you can continue to use it, if the server-side solution is no option. This may be the case
in heterogenous environments with old MySQL server or, if any of the server-side solution limitations is
not acceptable.
From an applications perspective there is hardly a difference in using one or the other approach. The
following properties differ.
• Client-side emulation, as shown in the manual, is using an easy to compare sequence number for
global transactions. Multi-master is not handled to keep the manual examples easy.
Server-side built-in feature is using a combination of a server identifier and a sequence number as a
global transaction identifier. Comparison cannot use numeric algebra. Instead a SQL function must
be used. Please, see the MySQL Reference Manual for details.
• Plugin global transaction ID statistics are only available with client-side emulation because they
monitor the emulation.
20.7.6.5.11. Cache integration
Copyright 1997-2012 the PHP Documentation Group. [2230]
Mysqlnd replication and load balancing plugin (mysqlnd_ms)
Global transaction identifiers in distributed systems
Global transaction identifiers can serve multiple purposes in the context of
distributed systems, such as a database cluster. Global transaction identifiers
can be used for, for example, system wide identification of transactions, global
ordering of transactions, heartbeat mechanism and for checking the replication
status of replicas. PECL/mysqlnd_ms, a clientside driver based software,
does focus on using GTIDs for tasks that can be handled at the client, such as
checking the replication status of replicas for asynchronous replication setups.
Version requirement
The feature requires use of PECL/mysqlnd_ms 1.3.0-beta or later, and PECL/
mysqlnd_qc 1.1.0-alpha or newer. PECL/mysqlnd_ms must be compiled to
support the feature. PHP 5.4.0 or newer is required.
Setup: extension load order
PECL/mysqlnd_ms must be loaded before PECL/mysqlnd_qc, when using
shared extensions.
2595

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents