At least mention commit and rollback. More missing.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@334087 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ulf Wendel 2014-07-02 17:15:48 +00:00
parent 7e88ca5ef3
commit 433a03df9b
4 changed files with 233 additions and 1 deletions

View file

@ -14,6 +14,7 @@
<methodname>mysqlnd_ms_xa_begin</methodname>
<methodparam><type>mixed</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>gtrid</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>timeout</parameter></methodparam>
</methodsynopsis>
<para>
Starts a XA transaction among MySQL servers. PECL/mysqlnd_ms acts as a transaction
@ -107,6 +108,25 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>timeout</parameter></term>
<listitem>
<para>
Timeout in seconds. The default value is 60 seconds.
</para>
<para>
The timeout is a hint to the garbage collection. If a transaction is recorded
to take longer than expected, the garbage collection begins checking the
transactions status.
</para>
<para>
Setting a low value may make the garbage collection check the progress
too often. Please note, checking the status of a global transaction may
involve connecting to all recorded participants and possibly issueing
queries on the servers.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

View file

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 327381 $ -->
<refentry xml:id="function.mysqlnd-ms-xa-commit" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>mysqlnd_ms_xa_commit</refname>
<refpurpose>Commits a distributed/XA transaction among MySQL servers</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type>
<methodname>mysqlnd_ms_xa_commit</methodname>
<methodparam><type>mixed</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>gtrid</parameter></methodparam>
</methodsynopsis>
<para>
Commits a global transaction among MySQL servers started by
<function>mysqlnd_ms_xa_begin</function>.
</para>
<para>
If any of the global transaction participants fails to commit
an implicit rollback is performed. It may happen that not
all cases can be handled during the rollback. For example,
no attempts will be made to reconnect to a participant after
the connection to the participant has been lost. Solving
cases that cannot easily be rolled back is left to the
garbage collection.
</para>
<note>
<title>Experimental</title>
<para>
The feature is currently under development. There may be issues and/or
feature limitations. Do not use in production environments.
</para>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
<para>
A MySQL connection handle obtained from any of the
connect functions of the <link linkend="ref.mysqli">mysqli</link>,
<link linkend="ref.mysql">mysql</link> or
<link linkend="ref.pdo-mysql">PDO_MYSQL</link> extensions.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>gtrid</parameter></term>
<listitem>
<para>
Global transaction identifier (gtrid).
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &true; if the global transaction has been comitted. Otherwise, returns &false;
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member>
<link linkend="mysqlnd-ms.quickstart.xa_transactions">Quickstart XA/Distributed transactions</link>
</member>
<member>
<link linkend="mysqlnd-ms.configuration">Runtime configuration</link>
</member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 327381 $ -->
<refentry xml:id="function.mysqlnd-ms-xa-rollback" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>mysqlnd_ms_xa_rollback</refname>
<refpurpose>Rolls back a distributed/XA transaction among MySQL servers</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type>
<methodname>mysqlnd_ms_xa_rollback</methodname>
<methodparam><type>mixed</type><parameter>connection</parameter></methodparam>
<methodparam><type>string</type><parameter>gtrid</parameter></methodparam>
</methodsynopsis>
<para>
Rolls back a global transaction among MySQL servers started by
<function>mysqlnd_ms_xa_begin</function>.
</para>
<para>
If any of the global transaction participants fails to rollback
the situation is left to be solved by the garbage collection.
</para>
<note>
<title>Experimental</title>
<para>
The feature is currently under development. There may be issues and/or
feature limitations. Do not use in production environments.
</para>
</note>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
<para>
A MySQL connection handle obtained from any of the
connect functions of the <link linkend="ref.mysqli">mysqli</link>,
<link linkend="ref.mysql">mysql</link> or
<link linkend="ref.pdo-mysql">PDO_MYSQL</link> extensions.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>gtrid</parameter></term>
<listitem>
<para>
Global transaction identifier (gtrid).
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &true; if the global transaction has been rolled back. Otherwise, returns &false;
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member>
<link linkend="mysqlnd-ms.quickstart.xa_transactions">Quickstart XA/Distributed transactions</link>
</member>
<member>
<link linkend="mysqlnd-ms.configuration">Runtime configuration</link>
</member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -15,7 +15,8 @@
<function name='mysqlnd_ms_set_user_pick_server' from='PECL mysqlnd_ms &lt; 1.1.0'/>
<function name='mysqlnd_ms_set_qos' from='PECL mysqlnd_ms &lt; 1.2.0'/>
<function name='mysqlnd_ms_xa_begin' from='PECL mysqlnd_ms &lt; 1.6.0'/>
<function name='mysqlnd_ms_xa_commit' from='PECL mysqlnd_ms &lt; 1.6.0'/>
<function name='mysqlnd_ms_xa_rollback' from='PECL mysqlnd_ms &lt; 1.6.0'/>
</versions>
<!-- Keep this comment at the end of the file