From 52ede7510c05926e32e27e3d4965159444d97635 Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Wed, 6 Feb 2013 18:44:15 +0000 Subject: [PATCH] Small updates for 1.5 and fixes for 1.4 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@329439 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mysqlnd_ms/book.xml | 23 ++++++++++++++++++++++ reference/mysqlnd_ms/changes.xml | 15 +++++++++++++++ reference/mysqlnd_ms/ini.xml | 4 ++++ reference/mysqlnd_ms/quickstart.xml | 30 ++++++++++++++++++++++++----- reference/mysqlnd_ms/setup.xml | 2 +- 5 files changed, 68 insertions(+), 6 deletions(-) diff --git a/reference/mysqlnd_ms/book.xml b/reference/mysqlnd_ms/book.xml index 4ac62fed42..409a0aa8e7 100755 --- a/reference/mysqlnd_ms/book.xml +++ b/reference/mysqlnd_ms/book.xml @@ -238,6 +238,29 @@ + + + + Partitioning and sharding + + + + + + Servers of a replication cluster can be organized in groups. + Queries can be manually directed to to a specific group using a SQL hint. + Grouping can be used to partition (shard) data, or to cure the issue of + hotspots in update anywhere setups. + + + + + MySQL Replication filter are supported through the table filter. + + + + + diff --git a/reference/mysqlnd_ms/changes.xml b/reference/mysqlnd_ms/changes.xml index f6b9812a13..8c1b73ad07 100644 --- a/reference/mysqlnd_ms/changes.xml +++ b/reference/mysqlnd_ms/changes.xml @@ -66,6 +66,21 @@ both client and server support. + + + Extended configuration file validation during PHP startup (RINIT). + A warning will be thrown if the configuration file can not be read, is empty + or parsing the JSON failed. Please note, execution is not halted. + Warnings may appear in log files only depending on your PHP deployment. + Distributions that aim to provide a pre-configured setup including a + configuration file stub are asked to put {} into + the configuration file to prevent any warnings about an invalid + configuration. + + + Code examples from the source distribution have been updated. + + diff --git a/reference/mysqlnd_ms/ini.xml b/reference/mysqlnd_ms/ini.xml index a46cc946bc..4e844ce0b4 100755 --- a/reference/mysqlnd_ms/ini.xml +++ b/reference/mysqlnd_ms/ini.xml @@ -95,6 +95,10 @@ MySQL connection attempt, matches a section name from the plugin configuration file. If not, the connection attempt is blocked. + + This setting is not only useful to restrict PHP to certain servers but also + to debug configuration file problems. + diff --git a/reference/mysqlnd_ms/quickstart.xml b/reference/mysqlnd_ms/quickstart.xml index d41db3b3de..2962aebce9 100755 --- a/reference/mysqlnd_ms/quickstart.xml +++ b/reference/mysqlnd_ms/quickstart.xml @@ -48,7 +48,7 @@ @@ -56,14 +56,18 @@ mysqlnd_ms.ini_file=/path/to/mysqlnd_ms_plugin.ini The plugin uses its own configuration file. Use the PHP configuration directive - mysqlnd_ms.ini_file + mysqlnd_ms.config_file to set the full file path to the plugin-specific configuration file. This file must be readable by PHP (e.g., the web server user). + Please note, the configuration directive mysqlnd_ms.config_file + superseeds mysqlnd_ms.ini_file + since 1.4.0. It is a common pitfall to use the old, no longer available + configuration directive. Create a plugin-specific configuration file. Save the file to the path set by the PHP configuration directive - mysqlnd_ms.ini_file. + mysqlnd_ms.config_file. The plugins configuration file @@ -190,6 +194,15 @@ mysqlnd_ms.ini_file=/path/to/mysqlnd_ms_plugin.ini + + The plugin attempts to notify you of invalid configurations. Since 1.5.0 it + will throw a warning during PHP startup if the configuration file cannot be read, + is empty or parsing the JSON failed. Depending on your PHP settings those + errors may appear in some log files only. Further validation is done when a connection + is to be established and the configuration file is searched for valid sections. + Setting mysqlnd_ms.force_config_usage + may help debugging a faulty setup. + @@ -612,7 +625,7 @@ $mysqli->close(); The current version of the plugin is not transaction safe by default, because it is not aware of running transactions in all cases. SQL transactions are - units of work to be run on a single server. The plugin does not always know + units of work to be run on a single server. The plugin does not always know when the unit of work starts and when it ends. Therefore, the plugin may decide to switch connections in the middle of a transaction. @@ -793,6 +806,11 @@ $mysqli->close(); requires PHP 5.4.0 or newer. + + Please note the restrictions outlined in the + transaction handling concepts + section. +
Service level and consistency @@ -1713,7 +1731,9 @@ var_dump($res->fetch_assoc()); and silent failover. Depending on the configuration, the automatic and silent failover will either attempt to fail over to the master before issuing and error or, try to connect to other slaves, given the query allowes for it, before attempting to connect - to a master. + to a master. Because automatic failover is + not fool-proof, it is not discussed in the quickstart. Instead, details are given + in the concepts section below. diff --git a/reference/mysqlnd_ms/setup.xml b/reference/mysqlnd_ms/setup.xml index 4ca5d29c09..da5e90a30e 100755 --- a/reference/mysqlnd_ms/setup.xml +++ b/reference/mysqlnd_ms/setup.xml @@ -49,7 +49,7 @@ The PHP configuration directive - mysqlnd_ms.ini_file + mysqlnd_ms.config_file is used to set the plugins configuration file. Please note, that the PHP configuration directive may not be evaluated for every web request. Therefore, changing the plugins configuration file name or location may