1--TEST--
2PDO_Firebird: Bug 72931 Insert returning fails on Firebird 3
3--EXTENSIONS--
4pdo_firebird
5--SKIPIF--
6<?php require('skipif.inc'); ?>
7--XLEAK--
8A bug in firebird causes a memory leak when calling `isc_attach_database()`.
9See https://github.com/FirebirdSQL/firebird/issues/7849
10--FILE--
11<?php
12require 'testdb.inc';
13
14$dbh = getDbConnection();
15$dbh->exec('recreate table test72931 (id integer)');
16$S = $dbh->prepare('insert into test72931 (id) values (1) returning id');
17$S->execute();
18$D = $S->fetch(PDO::FETCH_NUM);
19echo $D[0];
20unset($S);
21unset($dbh);
22?>
23--CLEAN--
24<?php
25require 'testdb.inc';
26$dbh = getDbConnection();
27@$dbh->exec("DROP TABLE test72931");
28unset($dbh);
29?>
30--EXPECT--
311
32