Skip to content

Commit 912b13a

Browse files
nielsdosKentarouTakedacmb69
authored
Test Firebird in 32-bit Linux CI (#17045)
Co-authored-by: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= <takeda@youmind.jp> Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
1 parent 2b80b2e commit 912b13a

File tree

7 files changed

+19
-3
lines changed

7 files changed

+19
-3
lines changed

.github/actions/apt-x32/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ runs:
3838
libxml2-dev:i386 \
3939
libxpm-dev:i386 \
4040
libxslt1-dev:i386 \
41+
firebird-dev:i386 \
4142
locales \
4243
make \
4344
pkg-config:i386 \

.github/actions/configure-x32/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ runs:
2727
--with-pgsql \
2828
--with-pdo-pgsql \
2929
--with-pdo-sqlite \
30+
--with-pdo-firebird \
3031
--without-pear \
3132
--enable-gd \
3233
--with-jpeg \

.github/actions/test-linux/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ runs:
3030
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres"
3131
fi
3232
export PDO_FIREBIRD_TEST_DATABASE=test.fdb
33-
export PDO_FIREBIRD_TEST_DSN=firebird:dbname=localhost:test.fdb
33+
if [[ -z "$PDO_FIREBIRD_TEST_DSN" ]]; then
34+
export PDO_FIREBIRD_TEST_DSN=firebird:dbname=localhost:test.fdb
35+
fi
3436
export PDO_FIREBIRD_TEST_PASS=test
3537
export PDO_FIREBIRD_TEST_USER=test
3638
export ODBC_TEST_USER="odbc_test"

.github/workflows/push.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ jobs:
147147
MYSQL_TEST_HOST: mysql
148148
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
149149
PDO_MYSQL_TEST_HOST: mysql
150+
PDO_FIREBIRD_TEST_DSN: firebird:dbname=firebird:test.fdb
150151
services:
151152
mysql:
152153
image: mysql:8.3
@@ -155,6 +156,15 @@ jobs:
155156
env:
156157
MYSQL_DATABASE: test
157158
MYSQL_ROOT_PASSWORD: root
159+
firebird:
160+
image: jacobalberty/firebird
161+
ports:
162+
- 3050:3050
163+
env:
164+
ISC_PASSWORD: test
165+
FIREBIRD_DATABASE: test.fdb
166+
FIREBIRD_USER: test
167+
FIREBIRD_PASSWORD: test
158168
steps:
159169
- name: git checkout
160170
uses: actions/checkout@v4

ext/pdo_firebird/firebird_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /*
14091409
char errmsg[512];
14101410
const ISC_STATUS *s = H->isc_status;
14111411
fb_interpret(errmsg, sizeof(errmsg),&s);
1412-
zend_throw_exception_ex(php_pdo_get_exception(), H->isc_status[1], "SQLSTATE[%s] [%ld] %s",
1412+
zend_throw_exception_ex(php_pdo_get_exception(), H->isc_status[1], "SQLSTATE[%s] [%" PRIiPTR "] %s",
14131413
"HY000", H->isc_status[1], errmsg);
14141414
}
14151415

ext/pdo_firebird/tests/bug_15604.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $dbh = getDbConnection();
1515

1616
$dbh->exec('
1717
recreate table t_bug_15604 (
18-
id bigint not null,
18+
id int not null,
1919
a int not null,
2020
b int,
2121
constraint pk_bug_15604 primary key(id)

ext/pdo_firebird/tests/bug_76448.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ sockets
66
--XLEAK--
77
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
88
See https://github.com/FirebirdSQL/firebird/issues/7849
9+
--SKIPIF--
10+
<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
911
--FILE--
1012
<?php
1113
require_once "payload_server.inc";

0 commit comments

Comments
 (0)