From 5ce96c2b3bb00cfb93d00ed5cd4b3664d56906e7 Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Wed, 4 Nov 2009 16:09:07 +0000 Subject: Skipping if MySQL old password algorithm is in use as it seems to be the case on gcov.php.net --- ext/mysql/tests/mysql_pconn_max_links.phpt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ext') 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))); -- cgit v1.2.1