Making test pass when MySQL runs on Win*

This commit is contained in:
Ulf Wendel 2009-10-20 08:41:11 +00:00
parent 9bb4db8781
commit 0efa2445ad

View file

@ -35,19 +35,23 @@ printf("[005] Expecting boolean/false, got %s/%s\n", gettype($link), $link);
// Run the following tests without an anoynmous MySQL user and use a password for the test user! // Run the following tests without an anoynmous MySQL user and use a password for the test user!
ini_set('mysql.default_socket', $socket); ini_set('mysql.default_socket', $socket);
if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) { if (!is_null($socket)) {
printf("[006] Usage of mysql.default_socket failed\n"); if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) {
} else { printf("[006] Usage of mysql.default_socket failed\n");
mysql_close($link); } else {
mysql_close($link);
}
} }
if (!ini_get('sql.safe_mode')) { if (!ini_get('sql.safe_mode')) {
ini_set('mysql.default_port', $port); ini_set('mysql.default_port', $port);
if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) { if (!is_null($port)) {
printf("[007] Usage of mysql.default_port failed\n"); if (!is_resource($link = mysql_connect($host, $user, $passwd, true))) {
} else { printf("[007] Usage of mysql.default_port failed\n");
mysql_close($link); } else {
mysql_close($link);
}
} }
ini_set('mysql.default_password', $passwd); ini_set('mysql.default_password', $passwd);