mysqli won't accept empty string for socket, skip test of mysqli.default_socket if test run does not use socket

This commit is contained in:
Ulf Wendel 2009-11-04 16:56:32 +00:00
parent 6553871f9e
commit c6e297ad4b

View File

@ -9,7 +9,11 @@ new mysqli()
$tmp = NULL;
$link = NULL;
if ($socket != "")
/* mysqli.default_socket requires non-empty string */
ini_set('mysqli.default_socket', 'socket');
ini_set('mysqli.default_port', 9999);
ini_set('mysqli.default_pw', 'password');
ini_set('mysqli.default_user', 'user');
@ -18,6 +22,7 @@ new mysqli()
mysqli_report(MYSQLI_REPORT_OFF);
mysqli_report(MYSQLI_REPORT_STRICT);
if ($socket != "") {
ini_set('mysqli.default_socket', $socket);
try {
$mysqli = mysqli_init();
@ -34,6 +39,7 @@ new mysqli()
printf("%s\n", $e->getMessage());
printf("[002] Usage of mysqli.default_socket failed\n");
}
}
ini_set('mysqli.default_port', $port);
try {