From f1797f5f51d997fed0f27f87a7f5ba534d4ce2a7 Mon Sep 17 00:00:00 2001 From: Anthony Bedford Date: Wed, 15 Sep 2010 14:34:29 +0000 Subject: [PATCH] Added info on mysqlnd.log_mask. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@303398 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mysqlnd/config.xml | 235 +++++++++++++++++++++++------------ 1 file changed, 157 insertions(+), 78 deletions(-) diff --git a/reference/mysqlnd/config.xml b/reference/mysqlnd/config.xml index 7d95af5e79..89e3e3ae8d 100644 --- a/reference/mysqlnd/config.xml +++ b/reference/mysqlnd/config.xml @@ -6,88 +6,167 @@ &extension.runtime; - - MySQL Native Driver Configuration Options - - - - Name - Default - Changeable - Changelog - - - - - mysqlnd.collect_statistics - "1" - PHP_INI_SYSTEM - Available since PHP 5.3.0. - - - mysqlnd.collect_memory_statistics - "0" - PHP_INI_SYSTEM - Available since PHP 5.3.0. - - - -
- &ini.php.constants; -
+ + MySQL Native Driver Configuration Options + + + + Name + Default + Changeable + Changelog + + + + + mysqlnd.collect_statistics + "1" + PHP_INI_SYSTEM + Available since PHP 5.3.0. + + + mysqlnd.collect_memory_statistics + "0" + PHP_INI_SYSTEM + Available since PHP 5.3.0. + + + mysqlnd.log_mask + "0" + PHP_INI_SYSTEM + Available since PHP 5.3.0. + + + +
+ &ini.php.constants; + &ini.descriptions.title; - - - - mysqlnd.collect_statistics - boolean - - - - Enables the collection of various client statistics which can be - accessed through mysqli_get_client_stats, - mysqli_get_connection_stats, - mysqli_get_cache_stats and are shown in - mysqlnd section of the output of the - phpinfo function as well. - - - - This configuration setting enables all - MySQL Native Driver statistics - except those relating to memory management. - - - - - - - mysqlnd.collect_memory_statistics - boolean - - - - Enable the collection of various memory statistics which can be - accessed through mysqli_get_client_stats, - mysqli_get_connection_stats, - mysqli_get_cache_stats and are shown in - mysqlnd section of the output of the - phpinfo function as well. - - - - This configuration setting enables the memory management statistics - within the overall set of MySQL Native - Driver statistics. - - - - - - + + + + mysqlnd.collect_statistics + boolean + + + + Enables the collection of various client statistics which can be + accessed through mysqli_get_client_stats, + mysqli_get_connection_stats, + mysqli_get_cache_stats and are shown in + mysqlnd section of the output of the + phpinfo function as well. + + + This configuration setting enables all + MySQL Native Driver + statistics except those relating to memory management. + + + + + + mysqlnd.collect_memory_statistics + boolean + + + + Enable the collection of various memory statistics which can be + accessed through mysqli_get_client_stats, + mysqli_get_connection_stats, + mysqli_get_cache_stats and are shown in + mysqlnd section of the output of the + phpinfo function as well. + + + This configuration setting enables the memory management + statistics within the overall set of + MySQL Native Driver + statistics. + + + + + + mysqlnd.log_mask integer + + + + The PHP configuration setting mysqlnd.log_mask + defines which queries will be logged. The default is + mysqlnd.log_mask = "0", which disables logging. + + + This setting can have values assigned according to the following + table: + + + + + + SERVER_STATUS_IN_TRANS + 1 + + + SERVER_STATUS_AUTOCOMMIT + 2 + + + SERVER_MORE_RESULTS_EXISTS + 8 + + + SERVER_QUERY_NO_GOOD_INDEX_USED + 16 + + + SERVER_QUERY_NO_INDEX_USED + 32 + + + SERVER_STATUS_CURSOR_EXISTS + 64 + + + SERVER_STATUS_LAST_ROW_SENT + 128 + + + SERVER_STATUS_DB_DROPPED + 256 + + + SERVER_STATUS_NO_BACKSLASH_ESCAPES + 512 + + + SERVER_QUERY_WAS_SLOW + 1024 + + + + + + It is possible to add the values together, to log multiple query + types. For example, you can set it to 16 + 32 = 48 to log slow + queries which either use no good index + (SERVER_QUERY_NO_GOOD_INDEX_USED = 16) or no index at all + (SERVER_QUERY_NO_INDEX_USED = 32). + + + Note, the SERVER_* constants are MySQL internal (C-level) + constants, not exported to the PHP userland. There are no + corresponding PHP constants. However, you can look up the values + in the table which has been created by inspecting the MySQL Native + Driver source. + + + + +