]> granicus.if.org Git - php/commitdiff
Removed mysqlnd stats from phpinfo page
authorPieter Hordijk <info@pieterhordijk.com>
Wed, 15 May 2019 14:13:34 +0000 (17:13 +0300)
committerJoe Watkins <krakjoe@php.net>
Wed, 3 Jul 2019 06:20:54 +0000 (08:20 +0200)
All information can already be retrieved using the APIs at https://www.php.net/manual/en/mysqlnd.stats.php. Closes https://bugs.php.net/bug.php?id=60594

NEWS
ext/mysqli/tests/mysqli_phpinfo.phpt
ext/mysqlnd/php_mysqlnd.c

diff --git a/NEWS b/NEWS
index 179935c8ab5ff0ae1ae1d98f0fb7aa6898cafb69..47a738036ceb5ce66f6bc7ac0d0b7c407b729783 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,9 @@ PHP                                                                        NEWS
 - Opcache:
   . Fixed #78202 (Opcache stats for cache hits are capped at 32bit NUM). (cmb)
 
+- mysqlnd:
+  . Fixed #60594 (mysqlnd exposes 160 lines of stats in phpinfo). (PeeHaa)
+
 - PDO:
   . Implemented FR #78033 (PDO - support username & password specified in
     DSN). (sjon)
index 02913daa6907243a1e98d45627d93cfbb7a161fa..4f856f2b65c8b115f415ccb004231c8c04628847 100644 (file)
@@ -46,17 +46,6 @@ require_once('skipifconnectfailure.inc');
 
        if ($IS_MYSQLND) {
                $expected = array(
-                       'mysqlnd statistics',
-                       'bytes_sent', 'bytes_received', 'packets_sent', 'packets_received',
-                       'protocol_overhead_in', 'protocol_overhead_out', 'result_set_queries',
-                       'non_result_set_queries', 'no_index_used', 'bad_index_used',
-                       'buffered_sets', 'unbuffered_sets', 'ps_buffered_sets', 'ps_unbuffered_sets',
-                       'flushed_normal_sets', 'flushed_ps_sets', 'rows_fetched_from_server',
-                       'rows_fetched_from_client', 'rows_skipped', 'copy_on_write_saved',
-                       'copy_on_write_performed', 'command_buffer_too_small', 'connect_success',
-                       'connect_failure', 'connection_reused', 'explicit_close', 'implicit_close',
-                       'disconnect_close', 'in_middle_of_command_close', 'explicit_free_result',
-                       'implicit_free_result', 'explicit_stmt_close', 'implicit_stmt_close',
                        'size',
                        'mysqli.allow_local_infile',
                        'mysqli.allow_persistent', 'mysqli.max_persistent'
index bf509724ca5fd5ee8c9e68942ba6b1aa838ac60c..276d8968cd2f0f2497ea470f1ae3f451a71951d2 100644 (file)
@@ -51,29 +51,6 @@ mysqlnd_minfo_print_hash(zval *values)
 /* }}} */
 
 
-/* {{{ mysqlnd_minfo_dump_plugin_stats */
-static int
-mysqlnd_minfo_dump_plugin_stats(zval *el, void * argument)
-{
-       struct st_mysqlnd_plugin_header * plugin_header = (struct st_mysqlnd_plugin_header *)Z_PTR_P(el);
-       if (plugin_header->plugin_stats.values) {
-               char buf[64];
-               zval values;
-               snprintf(buf, sizeof(buf), "%s statistics", plugin_header->plugin_name);
-
-               mysqlnd_fill_stats_hash(plugin_header->plugin_stats.values, plugin_header->plugin_stats.names, &values ZEND_FILE_LINE_CC);
-
-               php_info_print_table_start();
-               php_info_print_table_header(2, buf, "");
-               mysqlnd_minfo_print_hash(&values);
-               php_info_print_table_end();
-               zend_array_destroy(Z_ARR(values));
-       }
-       return ZEND_HASH_APPLY_KEEP;
-}
-/* }}} */
-
-
 /* {{{ mysqlnd_minfo_dump_loaded_plugins */
 static int
 mysqlnd_minfo_dump_loaded_plugins(zval *el, void * buf)
@@ -161,10 +138,6 @@ PHP_MINFO_FUNCTION(mysqlnd)
        }
 
        php_info_print_table_end();
-
-
-       /* Print client stats */
-       mysqlnd_plugin_apply_with_argument(mysqlnd_minfo_dump_plugin_stats, NULL);
 }
 /* }}} */