svn: /php/php-src/ branches/PHP_5_3/ext/mysql/tests/mysql_pconn_max_links.phpt trunk/ext/mysql/tests/mysql_pconn_max_links.phpt
| From: | Ulf Wendel | Date: | Wed, 04 Nov 2009 16:09:07 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/mysql/tests/mysql_pconn_max_links.phpt trunk/ext/mysql/tests/mysql_pconn_max_links.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-60843@lists.php.net to get a copy of this message | ||
uw Wed, 04 Nov 2009 16:09:07 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290206
Log:
Skipping if MySQL old password algorithm is in use as it seems to be the case on gcov.php.net
Changed paths:
U php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_pconn_max_links.phpt
U php/php-src/trunk/ext/mysql/tests/mysql_pconn_max_links.phpt
Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_pconn_max_links.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_pconn_max_links.phpt 2009-11-04 15:51:00 UTC
(rev 290205)
+++ php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_pconn_max_links.phpt 2009-11-04 16:09:07 UTC
(rev 290206)
@@ -18,6 +18,19 @@
if (!mysql_select_db($db, $link))
die(sprintf("skip [%d] %s", mysql_errno($link), mysql_error($link)));
+ if (!$res = mysql_query('SHOW VARIABLES LIKE "old_passwords"', $link)) {
+ die(sprintf("skip [%d] %s", mysql_errno($link), mysql_error($link)));
+ }
+
+ if (mysql_num_rows($res) != 1) {
+ die(sprintf("skip Can't check if old_passwords = ON"));
+ }
+
+ $row = mysql_fetch_assoc($res);
+ mysql_free_result($res);
+ if ($row['Value'] == "ON")
+ die(sprintf("skip Test will fail because old_passwords = ON. Hint: old passwords are
insecure!"));
+
if (!$res = mysql_query("SELECT CURRENT_USER() AS _user", $link))
die(sprintf("skip [%d] %s", mysql_errno($link), mysql_error($link)));
Modified: php/php-src/trunk/ext/mysql/tests/mysql_pconn_max_links.phpt
===================================================================
--- php/php-src/trunk/ext/mysql/tests/mysql_pconn_max_links.phpt 2009-11-04 15:51:00 UTC (rev
290205)
+++ php/php-src/trunk/ext/mysql/tests/mysql_pconn_max_links.phpt 2009-11-04 16:09:07 UTC (rev
290206)
@@ -18,6 +18,19 @@
if (!mysql_select_db($db, $link))
die(sprintf("skip [%d] %s", mysql_errno($link), mysql_error($link)));
+ if (!$res = mysql_query('SHOW VARIABLES LIKE "old_passwords"', $link)) {
+ die(sprintf("skip [%d] %s", mysql_errno($link), mysql_error($link)));
+ }
+
+ if (mysql_num_rows($res) != 1) {
+ die(sprintf("skip Can't check if old_passwords = ON"));
+ }
+
+ $row = mysql_fetch_assoc($res);
+ mysql_free_result($res);
+ if ($row['Value'] == "ON")
+ die(sprintf("skip Test will fail because old_passwords = ON. Hint: old passwords are
insecure!"));
+
if (!$res = mysql_query("SELECT CURRENT_USER() AS _user", $link))
die(sprintf("skip [%d] %s", mysql_errno($link), mysql_error($link)));