mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-25 17:32:07 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@333490 c90b9560-bf6c-de11-be94-00142212c4b1
75 lines
2.4 KiB
XML
75 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: d617b26e4b9db6f2a4a39e5bd45bb09e2dc91100 Maintainer: gui Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<chapter xml:id="mysqlnd.persist" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>Les connexions persistantes</title>
|
|
<para>
|
|
<emphasis role="bold">Utilisation des connexions persistantes</emphasis>
|
|
</para>
|
|
|
|
<para>
|
|
Si <literal>mysqli</literal> est utilisé avec <literal>mysqlnd</literal>,
|
|
lorsqu'une connexion persistante est créee, il génère un appel
|
|
<literal>COM_CHANGE_USER</literal>
|
|
(<literal>mysql_change_user()</literal>) sur le serveur. Ceci permet la
|
|
re-authentification de la connexion.
|
|
</para>
|
|
<para>
|
|
Comme l'appel <literal>COM_CHANGE_USER</literal> est assez lourd, il est
|
|
possible de le désactiver à la compilation. Réutiliser une connexion
|
|
persistante génèrera alors un appel <literal>COM_PING</literal>
|
|
(<literal>mysql_ping</literal>) pour tester simplement si la connexion est
|
|
réutilisable.
|
|
</para>
|
|
<para>
|
|
L'utilisation de <literal>COM_CHANGE_USER</literal> peut être désactivée
|
|
avec le drapeau de compilation
|
|
<literal>MYSQLI_NO_CHANGE_USER_ON_PCONNECT</literal>. Par exemple:
|
|
</para>
|
|
<programlisting>
|
|
<![CDATA[
|
|
shell# CFLAGS="-DMYSQLI_NO_CHANGE_USER_ON_PCONNECT" ./configure --with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/bin/mysql_config --enable-debug && make clean && make -j6
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
Ou encore:
|
|
</para>
|
|
<programlisting>
|
|
<![CDATA[
|
|
shell# export CFLAGS="-DMYSQLI_NO_CHANGE_USER_ON_PCONNECT"
|
|
shell# configure --whatever-option
|
|
shell# make clean
|
|
shell# make
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
Notez que seul <literal>mysqli</literal> avec <literal>mysqlnd</literal>
|
|
utilise <literal>COM_CHANGE_USER</literal>. Les autres extensions/pilotes
|
|
utilisent <literal>COM_PING</literal> lors de l'utilisation de la connexion
|
|
persistente.
|
|
</para>
|
|
|
|
</chapter>
|
|
<!-- 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
|
|
-->
|