diff options
author | Ulf Wendel <uw@php.net> | 2009-11-04 16:09:07 +0000 |
---|---|---|
committer | Ulf Wendel <uw@php.net> | 2009-11-04 16:09:07 +0000 |
commit | 5ce96c2b3bb00cfb93d00ed5cd4b3664d56906e7 (patch) | |
tree | 3ac0fce75bbcde1a6341a8c65115c82ec9695178 /ext | |
parent | 41611fd003b60fcc3a9e0566acb2848416639da5 (diff) | |
download | php-git-5ce96c2b3bb00cfb93d00ed5cd4b3664d56906e7.tar.gz |
Skipping if MySQL old password algorithm is in use as it seems to be the case on gcov.php.net
Diffstat (limited to 'ext')
-rw-r--r-- | ext/mysql/tests/mysql_pconn_max_links.phpt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/mysql/tests/mysql_pconn_max_links.phpt b/ext/mysql/tests/mysql_pconn_max_links.phpt index 1d39e98b42..3eca0e534a 100644 --- a/ext/mysql/tests/mysql_pconn_max_links.phpt +++ b/ext/mysql/tests/mysql_pconn_max_links.phpt @@ -18,6 +18,19 @@ Persistent connections and mysql.max_persistent 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))); |