1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Drop support for MYSQL_TEST_SKIP_CONNECT_FAILURE (#15461)

Closes GH-15457.
This commit is contained in:
Christoph M. Becker
2024-08-17 17:45:07 +02:00
committed by GitHub
parent 0064c42215
commit a3196b3f72
2 changed files with 4 additions and 7 deletions

View File

@@ -16,7 +16,6 @@
$db = getenv("MYSQL_TEST_DB") ?: "test";
$engine = getenv("MYSQL_TEST_ENGINE") ?: "InnoDB";
$socket = getenv("MYSQL_TEST_SOCKET") ?: null;
$skip_on_connect_failure = getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") ?: true;
if ($socket) {
ini_set('mysqli.default_socket', $socket);
}

View File

@@ -1,9 +1,7 @@
<?php
require_once 'connect.inc';
if ($skip_on_connect_failure) {
$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (!is_object($link))
die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
mysqli_close($link);
}
$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (!is_object($link))
die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
mysqli_close($link);
?>