php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72931 PDO_FIREBIRD with Firebird 3.0 not work on returning statement
Submitted: 2016-08-23 11:27 UTC Modified: -
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:0 (0.0%)
From: edgardmessias at gmail dot com Assigned:
Status: Closed Package: PDO Firebird
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: edgardmessias at gmail dot com
New email:
PHP Version: OS:

 

 [2016-08-23 11:27 UTC] edgardmessias at gmail dot com
Description:
------------
The problem occurs when Firebird 3.0 is used.

Using the "pdo_firebird" extension, the problem occurs.

If you use the "Interbase" extension is run normally.

Test script:
---------------
<?php
$pdo = new PDO('firebird:dbname=localhost:/tmp/TEST.FDB;charset=ISO8859_1', 'SYSDBA', 'masterkey', array(
    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
    PDO::ATTR_CASE    => PDO::CASE_LOWER,
        ));

$stmt = $pdo->prepare("INSERT INTO animal (type) VALUES ('cat') RETURNING type");

$stmt->execute();

echo $stmt->fetchColumn();
?>

Expected result:
----------------
cat

Actual result:
--------------
SQLSTATE[HY000]: General error: -902 Dynamic SQL Error SQLDA error Wrong number of parameters (expected 1, got 0)

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-05 16:45 UTC] dorin dot marcoci at gmail dot com
All current pdo_firebird tests passed OK. My own scenarios passed.
Patch submited in Firebird community for further testing.
 [2016-12-07 20:18 UTC] ab@php.net
Automatic comment on behalf of dorin.marcoci@marcodor.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=13ffa88e1f62c4407c55e1b82c299fc452211662
Log: Fixed bug #72931 PDO_FIREBIRD with Firebird 3.0 not work on returning statement
 [2016-12-07 20:18 UTC] ab@php.net
-Status: Open +Status: Closed
 [2016-12-07 20:19 UTC] ab@php.net
Automatic comment on behalf of dorin.marcoci@marcodor.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=13ffa88e1f62c4407c55e1b82c299fc452211662
Log: Fixed bug #72931 PDO_FIREBIRD with Firebird 3.0 not work on returning statement
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC