Skip to content

Commit 6ab04a6

Browse files
PeeHaakrakjoe
authored andcommitted
Removed mysqlnd stats from phpinfo page
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
1 parent a45192e commit 6ab04a6

File tree

3 files changed

+3
-38
lines changed

3 files changed

+3
-38
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ PHP NEWS
1212
- Opcache:
1313
. Fixed #78202 (Opcache stats for cache hits are capped at 32bit NUM). (cmb)
1414

15+
- mysqlnd:
16+
. Fixed #60594 (mysqlnd exposes 160 lines of stats in phpinfo). (PeeHaa)
17+
1518
- PDO:
1619
. Implemented FR #78033 (PDO - support username & password specified in
1720
DSN). (sjon)

ext/mysqli/tests/mysqli_phpinfo.phpt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,6 @@ require_once('skipifconnectfailure.inc');
4646

4747
if ($IS_MYSQLND) {
4848
$expected = array(
49-
'mysqlnd statistics',
50-
'bytes_sent', 'bytes_received', 'packets_sent', 'packets_received',
51-
'protocol_overhead_in', 'protocol_overhead_out', 'result_set_queries',
52-
'non_result_set_queries', 'no_index_used', 'bad_index_used',
53-
'buffered_sets', 'unbuffered_sets', 'ps_buffered_sets', 'ps_unbuffered_sets',
54-
'flushed_normal_sets', 'flushed_ps_sets', 'rows_fetched_from_server',
55-
'rows_fetched_from_client', 'rows_skipped', 'copy_on_write_saved',
56-
'copy_on_write_performed', 'command_buffer_too_small', 'connect_success',
57-
'connect_failure', 'connection_reused', 'explicit_close', 'implicit_close',
58-
'disconnect_close', 'in_middle_of_command_close', 'explicit_free_result',
59-
'implicit_free_result', 'explicit_stmt_close', 'implicit_stmt_close',
6049
'size',
6150
'mysqli.allow_local_infile',
6251
'mysqli.allow_persistent', 'mysqli.max_persistent'

ext/mysqlnd/php_mysqlnd.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,6 @@ mysqlnd_minfo_print_hash(zval *values)
5151
/* }}} */
5252

5353

54-
/* {{{ mysqlnd_minfo_dump_plugin_stats */
55-
static int
56-
mysqlnd_minfo_dump_plugin_stats(zval *el, void * argument)
57-
{
58-
struct st_mysqlnd_plugin_header * plugin_header = (struct st_mysqlnd_plugin_header *)Z_PTR_P(el);
59-
if (plugin_header->plugin_stats.values) {
60-
char buf[64];
61-
zval values;
62-
snprintf(buf, sizeof(buf), "%s statistics", plugin_header->plugin_name);
63-
64-
mysqlnd_fill_stats_hash(plugin_header->plugin_stats.values, plugin_header->plugin_stats.names, &values ZEND_FILE_LINE_CC);
65-
66-
php_info_print_table_start();
67-
php_info_print_table_header(2, buf, "");
68-
mysqlnd_minfo_print_hash(&values);
69-
php_info_print_table_end();
70-
zend_array_destroy(Z_ARR(values));
71-
}
72-
return ZEND_HASH_APPLY_KEEP;
73-
}
74-
/* }}} */
75-
76-
7754
/* {{{ mysqlnd_minfo_dump_loaded_plugins */
7855
static int
7956
mysqlnd_minfo_dump_loaded_plugins(zval *el, void * buf)
@@ -161,10 +138,6 @@ PHP_MINFO_FUNCTION(mysqlnd)
161138
}
162139

163140
php_info_print_table_end();
164-
165-
166-
/* Print client stats */
167-
mysqlnd_plugin_apply_with_argument(mysqlnd_minfo_dump_plugin_stats, NULL);
168141
}
169142
/* }}} */
170143

0 commit comments

Comments
 (0)