php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43244 firebird: closeCursor w/o returned data kills process
Submitted: 2007-11-11 12:54 UTC Modified: 2007-11-15 00:29 UTC
From: hp-php dot net at oeri dot ch Assigned:
Status: Closed Package: PDO related
PHP Version: 5.3CVS-2007-11-11 (CVS) OS: Linux 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hp-php dot net at oeri dot ch
New email:
PHP Version: OS:

 

 [2007-11-11 12:54 UTC] hp-php dot net at oeri dot ch
Description:
------------
In pdo_firebird from CVS, calling PDOStatement->closeCursor on an executed statement that did *NOT* return any data kills the process.

Reproduce code:
---------------
<?php
	$pdo = new PDO( 'firebird:dbname=localhost:devel', 'devel', 'devel' );
	
	// VARIANT A: SECONDARY DATA
	$stmt = $pdo->prepare( 'UPDATE "a_data" SET "data"=200 RETURNING "a"' );
	$stmt->execute();
	
	// the following statement works fine
	$stmt->closeCursor();
	echo "I survived variant 'A'\n";
	
	// VARIANT B: REALLY NO DATA
	$stmt = $pdo->prepare( 'UPDATE "a_data" SET "data"=200' );
	$stmt->execute();
	
	// the following statement kills the process
	$stmt->closeCursor();
	echo "I don't survive upto here...\n";
?>

Expected result:
----------------
I survived variant 'A'
I don't survive upto here...

(Both statements executed an closeCursor called twice)

Actual result:
--------------
I survived variant 'A'

(Variant 'B' - the non-data statement - kills the process before echo.)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-15 00:29 UTC] lwe@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Now repeated calls to closecursor() won't cause a crash.

Fixed in PHP_5_3
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jun 02 18:01:26 2025 UTC