@@ -14,12 +14,9 @@ if (!function_exists('mysqli_get_connection_stats')) {
1414?>
1515--FILE--
1616<?php
17- require_once 'connect.inc ' ;
18- if (!$ link = my_mysqli_connect ($ host , $ user , $ passwd , $ db , $ port , $ socket )) {
19- printf ("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s \n" ,
20- $ host , $ user , $ db , $ port , $ socket );
21- exit (1 );
22- }
17+ // Use the operations performed in table.inc to create some traffic on the connection
18+ // so that we can collect some statistics.
19+ require 'table.inc ' ;
2320
2421 if (!is_array ($ info = mysqli_get_connection_stats ($ link )) || empty ($ info ))
2522 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')) {
6057 }
6158
6259 mysqli_close ($ link );
63- if (!$ link = my_mysqli_connect ($ host , $ user , $ passwd , $ db , $ port , $ socket )) {
64- printf ("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s \n" ,
65- $ host , $ user , $ db , $ port , $ socket );
66- exit (1 );
67- }
60+ require 'table.inc ' ;
6861
6962 if (!is_array ($ info = mysqli_get_connection_stats ($ link )) || empty ($ info ))
7063 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')) {
8174
8275 print "done! " ;
8376?>
77+ --CLEAN--
78+ <?php
79+ require_once 'clean_table.inc ' ;
80+ ?>
8481--EXPECT--
8582done!
0 commit comments