php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77888 autocommit is not working !!
Submitted: 2019-04-13 16:31 UTC Modified: 2021-10-10 04:22 UTC
From: ch dot derenne at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: PDO Firebird
PHP Version: 7.3.4 OS: fedora28
Private report: No CVE-ID: None
 [2019-04-13 16:31 UTC] ch dot derenne at gmail dot com
Description:
------------
Autocommit is not working well with firebird :
In fact :
Create a selecatble stored procedure that juste insert a row in a table

Connect to pdo firebird database
Use autocommit :
$db->setAttribute( PDO::ATTR_AUTOCOMMIT, 1 );

Call the stored procedure
Close the connection

Do a select of tha table : the row is not present !!
Now insert a commit just before closing connection.
Execute the script : the row is present !!

Expected result:
----------------
The transaction should be commited

Actual result:
--------------
The transaction is not commited

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-09-27 16:14 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-09-27 16:14 UTC] cmb@php.net
The following script gives the desired results for me (PHP-7.4
with Firebird 3.0.7):

<?php
$pdo = new PDO("firebird:dbname=C:\\test.fdb", "sysdba", "masterkey", [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
$pdo->exec("CREATE TABLE bug77888 (nam VARCHAR(50))");
$pdo->exec("CREATE PROCEDURE prc AS BEGIN INSERT INTO bug77888 VALUES ('foo'); END");
$pdo->exec("EXECUTE PROCEDURE prc");
$stmt = $pdo->query("SELECT nam FROM bug77888");
var_dump($stmt->fetchAll());
?>

If you still experience issues with any of the actively supported
PHP versions[1], please provide a small self-contained reproducer,
and/or further details of your system.

[1] <https://www.php.net/supported-versions.php>
 [2021-10-10 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC