mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Revert changes to mysqli_get_connection_stats.phpt
This commit is contained in:
@@ -14,12 +14,9 @@ if (!function_exists('mysqli_get_connection_stats')) {
|
|||||||
?>
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require_once 'connect.inc';
|
// Use the operations performed in table.inc to create some traffic on the connection
|
||||||
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
// so that we can collect some statistics.
|
||||||
printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
require 'table.inc';
|
||||||
$host, $user, $db, $port, $socket);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
|
if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
|
||||||
printf("[003] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
|
printf("[003] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
|
||||||
@@ -60,11 +57,7 @@ if (!function_exists('mysqli_get_connection_stats')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mysqli_close($link);
|
mysqli_close($link);
|
||||||
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
require 'table.inc';
|
||||||
printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
|
||||||
$host, $user, $db, $port, $socket);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
|
if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
|
||||||
printf("[008] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
|
printf("[008] Expecting array/any_non_empty, got %s/%s\n", gettype($info), $info);
|
||||||
@@ -81,5 +74,9 @@ if (!function_exists('mysqli_get_connection_stats')) {
|
|||||||
|
|
||||||
print "done!";
|
print "done!";
|
||||||
?>
|
?>
|
||||||
|
--CLEAN--
|
||||||
|
<?php
|
||||||
|
require_once 'clean_table.inc';
|
||||||
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
done!
|
done!
|
||||||
|
|||||||
Reference in New Issue
Block a user