Commit 473660b2c45 for php

commit 473660b2c45f79c6237d39a0aec401a4d3b787a4
Author: Kamil Tekiela <tekiela246@gmail.com>
Date:   Fri Oct 9 18:20:35 2026 +0100

    Fix ext\mysqli\tests\gh8978.phpt (#24221)

diff --git a/ext/mysqli/tests/bug51647.phpt b/ext/mysqli/tests/bug51647.phpt
index afd136ddfc2..bd6988b8e17 100644
--- a/ext/mysqli/tests/bug51647.phpt
+++ b/ext/mysqli/tests/bug51647.phpt
@@ -16,27 +16,12 @@
 if (false === strpos($link->host_info, 'TCP/IP'))
     die(sprintf("skip SSL only supported on TCP/IP"));

-$row = NULL;
-if ($res = $link->query('SHOW VARIABLES LIKE "have_ssl"')) {
-    $row = $res->fetch_row();
-} else {
-    if ($link->errno == 1064 && ($res = $link->query("SHOW VARIABLES"))) {
-        while ($row = $res->fetch_row())
-            if ($row[0] == 'have_ssl')
-                break;
-    } else {
-        die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
-    }
+$res = $link->query('SHOW VARIABLES LIKE "have_ssl"');
+$row = $res ? $res->fetch_row() : null;
+// MySQL 8.4+ no longer has have_ssl so the check is only relevant for older versions and MariaDB
+if ($row && $row[1] !== 'YES') {
+    die('skip Server has no SSL support');
 }
-
-
-if (empty($row))
-    die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
-
-if (($row[1] == 'NO') || ($row[1] == 'DISABLED'))
-    die(sprintf("skip MySQL has no SSL support, [%d] %s", $link->errno, $link->error));
-
-$link->close();
 ?>
 --FILE--
 <?php
diff --git a/ext/mysqli/tests/bug55283.phpt b/ext/mysqli/tests/bug55283.phpt
index 692968f9ee2..57f90d6a9fc 100644
--- a/ext/mysqli/tests/bug55283.phpt
+++ b/ext/mysqli/tests/bug55283.phpt
@@ -16,27 +16,12 @@
 if (false === strpos($link->host_info, 'TCP/IP'))
     die(sprintf("skip SSL only supported on TCP/IP"));

-$row = NULL;
-if ($res = $link->query('SHOW VARIABLES LIKE "have_ssl"')) {
-    $row = $res->fetch_row();
-} else {
-    if ($link->errno == 1064 && ($res = $link->query("SHOW VARIABLES"))) {
-        while ($row = $res->fetch_row())
-            if ($row[0] == 'have_ssl')
-                break;
-    } else {
-        die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
-    }
+$res = $link->query('SHOW VARIABLES LIKE "have_ssl"');
+$row = $res ? $res->fetch_row() : null;
+// MySQL 8.4+ no longer has have_ssl so the check is only relevant for older versions and MariaDB
+if ($row && $row[1] !== 'YES') {
+    die('skip Server has no SSL support');
 }
-
-
-if (empty($row))
-    die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
-
-if (($row[1] == 'NO') || ($row[1] == 'DISABLED'))
-    die(sprintf("skip MySQL has no SSL support, [%d] %s", $link->errno, $link->error));
-
-$link->close();
 ?>
 --FILE--
 <?php
diff --git a/ext/mysqli/tests/gh8978.phpt b/ext/mysqli/tests/gh8978.phpt
index 92de63b381c..9f67ff1fa0b 100644
--- a/ext/mysqli/tests/gh8978.phpt
+++ b/ext/mysqli/tests/gh8978.phpt
@@ -4,7 +4,17 @@
 mysqli
 --SKIPIF--
 <?php
-require_once 'skipifconnectfailure.inc';
+require_once 'connect.inc';
+
+if (!($link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
+    die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+
+$res = $link->query("SHOW VARIABLES LIKE 'have_ssl'");
+$row = $res ? $res->fetch_row() : null;
+// MySQL 8.4+ no longer has have_ssl so the check is only relevant for older versions and MariaDB
+if ($row && $row[1] !== 'YES') {
+    die('skip Server has no SSL support');
+}
 ?>
 --FILE--
 <?php