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

Skip fb4_datatypes*.phpt for Firebird server < 4.0.0 (GH-15354)

Using a newer fbclient version with an older server is generally
supported, and as such we must not only skip these tests for older
fbclients, but also for older servers.

In lack of some readily available function, we're querying the server
to find its version.
This commit is contained in:
Christoph M. Becker
2024-08-13 00:14:23 +02:00
committed by GitHub
parent 81150187fb
commit 266192372c
2 changed files with 14 additions and 0 deletions

View File

@@ -7,6 +7,13 @@ pdo_firebird
if (Pdo\Firebird::getApiVersion() < 40) {
die('skip: Firebird API version must be greater than or equal to 40');
}
require 'testdb.inc';
$dbh = getDbConnection();
$stmt = $dbh->query("SELECT RDB\$get_context('SYSTEM', 'ENGINE_VERSION') AS VERSION FROM RDB\$DATABASE");
$data = $stmt->fetch(\PDO::FETCH_ASSOC);
if (!$data || !array_key_exists('VERSION', $data) || version_compare($data['VERSION'], '4.0.0') < 0) {
die("skip Firebird Server version must be greater than or equal to 4.0.0");
}
?>
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.

View File

@@ -7,6 +7,13 @@ pdo_firebird
if (Pdo\Firebird::getApiVersion() < 40) {
die('skip: Firebird API version must be greater than or equal to 40');
}
require 'testdb.inc';
$dbh = getDbConnection();
$stmt = $dbh->query("SELECT RDB\$get_context('SYSTEM', 'ENGINE_VERSION') AS VERSION FROM RDB\$DATABASE");
$data = $stmt->fetch(\PDO::FETCH_ASSOC);
if (!$data || !array_key_exists('VERSION', $data) || version_compare($data['VERSION'], '4.0.0') < 0) {
die("skip Firebird Server version must be greater than or equal to 4.0.0");
}
?>
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.