uTools-Manuals/docs/php/mysqlnd_ms_xa_commit.html
2019-04-28 19:00:34 +08:00

110 lines
4.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Commits a distributed/XA transaction among MySQL servers</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.mysqlnd-ms-xa-commit" class="refentry">
<div class="refnamediv">
<h1 class="refname">mysqlnd_ms_xa_commit</h1>
<p class="verinfo">(PECL mysqlnd_ms &lt; 1.6.0)</p><p class="refpurpose"><span class="refname">mysqlnd_ms_xa_commit</span> &mdash; <span class="dc-title">Commits a distributed/XA transaction among MySQL servers</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.mysqlnd-ms-xa-commit-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>mysqlnd_ms_xa_commit</strong></span>
( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$connection</code></span>
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$gtrid</code></span>
) : <span class="type">int</span></div>
<p class="para rdfs-comment">
Commits a global transaction among MySQL servers started by
<span class="function"><a href="mysqlnd_ms_xa_begin.html" class="function">mysqlnd_ms_xa_begin()</a></span>.
</p>
<p class="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.
</p>
<blockquote class="note"><p><strong class="note">Note</strong>:
<strong>Experimental</strong><br />
<p class="para">
The feature is currently under development. There may be issues and/or
feature limitations. Do not use in production environments.
</p>
</p></blockquote>
</div>
<div class="refsect1 parameters" id="refsect1-function.mysqlnd-ms-xa-commit-parameters">
<h3 class="title">参数</h3>
<dl>
<dt>
<code class="parameter">connection</code></dt>
<dd>
<p class="para">
A MySQL connection handle obtained from any of the
connect functions of the <a href="ref.mysqli.html" class="link">mysqli</a>,
<a href="ref.mysql.html" class="link">mysql</a> or
<a href="ref.pdo_mysql.html" class="link">PDO_MYSQL</a> extensions.
</p>
</dd>
<dt>
<code class="parameter">gtrid</code></dt>
<dd>
<p class="para">
Global transaction identifier (gtrid).
</p>
</dd>
</dl>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.mysqlnd-ms-xa-commit-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
Returns <strong><code>TRUE</code></strong> if the global transaction has been committed. Otherwise, returns <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.mysqlnd-ms-xa-commit-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member">
<a href="mysqlnd_ms.quickstart.xa_transactions.html" class="link">Quickstart XA/Distributed transactions</a>
</li>
<li class="member">
<a href="mysqlnd_ms.configuration.html" class="link">Runtime configuration</a>
</li>
<li class="member">
<span class="function"><a href="mysqlnd_ms_get_stats.html" class="function" rel="rdfs-seeAlso">mysqlnd_ms_get_stats()</a> - Returns query distribution and connection statistics</span>
</li>
</ul>
</p>
</div>
</div></div></div></body></html>