uw                                       Mon, 20 Sep 2010 17:26:39 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=303628

Log:
No reason not to run the tests with libmysql. Its long, long ago that pconnect 
has been a mysqlnd only feature

Changed paths:
    U   
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt
    U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_disabled.phpt
    U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_kill.phpt
    U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_limits.phpt
    U   
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_max_links.phpt
    U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_reuse.phpt
    U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_twice.phpt
    U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconnect.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_disabled.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_kill.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_limits.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_max_links.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_reuse.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_twice.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_pconnect.phpt

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -5,9 +5,6 @@
 require_once('skipif.inc');
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
-if (!$IS_MYSQLND)
-	die("skip mysqlnd test only");
-
 ?>
 --INI--
 mysqli.allow_persistent=1

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_disabled.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_disabled.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_disabled.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -6,9 +6,6 @@
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');

-if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
-	die("skip: only available in mysqlnd");
-
 die("skip TODO - we need to add a user level way to check if CHANGE_USER gets called by pconnect");
 ?>
 --INI--

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_kill.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_kill.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_kill.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -6,8 +6,6 @@
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
 require_once("connect.inc");
-if (!$IS_MYSQLND)
-	die("skip mysqlnd test only");
 ?>
 --INI--
 mysqli.allow_persistent=1

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_limits.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_limits.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_limits.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -6,9 +6,6 @@
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
 require_once("connect.inc");
-if (!$IS_MYSQLND)
-	die("skip mysqlnd test only");
-
 ?>
 --INI--
 mysqli.allow_persistent=1

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_max_links.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_max_links.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_max_links.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -5,15 +5,8 @@
 	require_once('skipif.inc');
 	require_once('skipifemb.inc');
 	require_once('skipifconnectfailure.inc');
-	require_once('connect.inc');
+	require_once('table.inc');

-	if (!$IS_MYSQLND)
-		die("skip mysqlnd only test");
-
-	// we need a second DB user to test for a possible flaw in the ext/mysql[i] code
-	if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
-		die(sprintf("skip Cannot connect [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
-
 	mysqli_query($link, 'DROP USER pcontest');
 	mysqli_query($link, 'DROP USER pcont...@localhost');

@@ -54,6 +47,17 @@
 	require_once("connect.inc");
 	require_once('table.inc');

+
+	if (!mysqli_query($link, 'DROP USER pcontest') ||
+		!mysqli_query($link, 'DROP USER pcont...@localhost') ||
+		!mysqli_query($link, 'CREATE USER pcontest@"%" IDENTIFIED BY "pcontest"') ||
+		!mysqli_query($link, 'CREATE USER pcont...@localhost IDENTIFIED BY "pcontest"') ||
+		!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pcontest@'%%'", $db)) ||
+		!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pcontest@'localhost'", $db))) {
+		printf("[000] Init failed, [%d] %s\n",
+			mysqli_errno($plink), mysqli_error($plink));
+	}
+
 	if (!$plink = my_mysqli_connect('p:' . $host, 'pcontest', 'pcontest', $db, $port, $socket))
 		printf("[001] Cannot connect using the second DB user created during SKIPIF, [%d] %s\n",
 			mysqli_connect_errno(), mysqli_connect_error());
@@ -188,5 +192,5 @@
   %unicode|string%(1) "a"
 }

-Warning: my_mysqli_connect(): Too many open persistent links (%d) in %s on line %d
+Warning: %s: Too many open persistent links (%d) in %s on line %d
 done!
\ No newline at end of file

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_reuse.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_reuse.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_reuse.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -7,9 +7,6 @@
 require_once('skipif.inc');
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
-
-if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
-	die("skip: only available in mysqlnd");
 ?>
 --INI--
 mysqli.allow_persistent=1

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_twice.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_twice.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconn_twice.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -5,8 +5,6 @@
 require_once('skipif.inc');
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
-if (!$IS_MYSQLND)
-	die("skip mysqlnd test only");

 ?>
 --INI--

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconnect.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconnect.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_pconnect.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -5,9 +5,6 @@
 require_once('skipif.inc');
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
-
-if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
-	die("skip: only available in mysqlnd");
 ?>
 --FILE--
 <?php

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -5,9 +5,6 @@
 require_once('skipif.inc');
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
-if (!$IS_MYSQLND)
-	die("skip mysqlnd test only");
-
 ?>
 --INI--
 mysqli.allow_persistent=1

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_disabled.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_disabled.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_disabled.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -6,9 +6,6 @@
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');

-if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
-	die("skip: only available in mysqlnd");
-
 die("skip TODO - we need to add a user level way to check if CHANGE_USER gets called by pconnect");
 ?>
 --INI--

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_kill.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_kill.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_kill.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -6,8 +6,6 @@
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
 require_once("connect.inc");
-if (!$IS_MYSQLND)
-	die("skip mysqlnd test only");
 ?>
 --INI--
 mysqli.allow_persistent=1

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_limits.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_limits.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_limits.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -6,9 +6,6 @@
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
 require_once("connect.inc");
-if (!$IS_MYSQLND)
-	die("skip mysqlnd test only");
-
 ?>
 --INI--
 mysqli.allow_persistent=1

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_max_links.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_max_links.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_max_links.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -5,15 +5,8 @@
 	require_once('skipif.inc');
 	require_once('skipifemb.inc');
 	require_once('skipifconnectfailure.inc');
-	require_once('connect.inc');
+	require_once('table.inc');

-	if (!$IS_MYSQLND)
-		die("skip mysqlnd only test");
-
-	// we need a second DB user to test for a possible flaw in the ext/mysql[i] code
-	if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
-		die(sprintf("skip Cannot connect [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
-
 	mysqli_query($link, 'DROP USER pcontest');
 	mysqli_query($link, 'DROP USER pcont...@localhost');

@@ -54,6 +47,17 @@
 	require_once("connect.inc");
 	require_once('table.inc');

+
+	if (!mysqli_query($link, 'DROP USER pcontest') ||
+		!mysqli_query($link, 'DROP USER pcont...@localhost') ||
+		!mysqli_query($link, 'CREATE USER pcontest@"%" IDENTIFIED BY "pcontest"') ||
+		!mysqli_query($link, 'CREATE USER pcont...@localhost IDENTIFIED BY "pcontest"') ||
+		!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pcontest@'%%'", $db)) ||
+		!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pcontest@'localhost'", $db))) {
+		printf("[000] Init failed, [%d] %s\n",
+			mysqli_errno($plink), mysqli_error($plink));
+	}
+
 	if (!$plink = my_mysqli_connect('p:' . $host, 'pcontest', 'pcontest', $db, $port, $socket))
 		printf("[001] Cannot connect using the second DB user created during SKIPIF, [%d] %s\n",
 			mysqli_connect_errno(), mysqli_connect_error());
@@ -188,5 +192,5 @@
   %unicode|string%(1) "a"
 }

-Warning: my_mysqli_connect(): Too many open persistent links (%d) in %s on line %d
+Warning: %s: Too many open persistent links (%d) in %s on line %d
 done!
\ No newline at end of file

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_reuse.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_reuse.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_reuse.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -7,9 +7,6 @@
 require_once('skipif.inc');
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
-
-if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
-	die("skip: only available in mysqlnd");
 ?>
 --INI--
 mysqli.allow_persistent=1

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_twice.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_twice.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_pconn_twice.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -5,8 +5,6 @@
 require_once('skipif.inc');
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
-if (!$IS_MYSQLND)
-	die("skip mysqlnd test only");

 ?>
 --INI--

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_pconnect.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_pconnect.phpt	2010-09-20 17:20:38 UTC (rev 303627)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_pconnect.phpt	2010-09-20 17:26:39 UTC (rev 303628)
@@ -5,9 +5,6 @@
 require_once('skipif.inc');
 require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
-
-if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
-	die("skip: only available in mysqlnd");
 ?>
 --FILE--
 <?php
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to