From: hp-php dot net at oeri dot ch
Operating system: Linux 2.6
PHP version: 5.3CVS-2007-11-11 (CVS)
PHP Bug Type: PDO related
Bug description: firebird: INSERT ... RETURNING ... throws exception
Description:
------------
Executing (prepared or directly) an "INSERT ... RETURNING" throws an
exception
Reproduce code:
---------------
<?php
$pdo = new PDO( 'firebird:dbname=localhost:devel', 'devel', 'devel' );
$pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
// VARIANT A: ORDINARY INSERT
$stmt = $pdo->query( 'INSERT INTO "a" ("data") VALUES (2500)' );
echo "Variant 'A': done";
// VARIANT B: RETURNING INSERT
$stmt = $pdo->query( 'INSERT INTO "a" ("data") VALUES (2500) RETURNING
"data"' );
$res = $stmt->fetchAll( PDO::FETCH_ASSOC );
print_r( $res );
echo "Variant 'B': done";
?>
Expected result:
----------------
Variant 'A': done
Variant 'B': done
(Both statements executed)
Actual result:
--------------
Variant 'A': done<br />
<b>Fatal error</b>: Uncaught exception 'PDOException' with message
'SQLSTATE[HY000]: General error: -804 Dynamic SQL Error SQL error code =
-804 Incorrect values within SQLDA structure ' in PHPDocument4:11
Stack trace:
#0 PHPDocument4(11): PDO->query('INSERT INTO "a"...')
#1 /var/www/devel/htdocs/dummy.php(1): include('PHPDocument4')
#2 {main}
thrown in <b>PHPDocument4</b> on line <b>11</b><br />
--
Edit bug report at http://bugs.php.net/?id=43246&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43246&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43246&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43246&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43246&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43246&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43246&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43246&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43246&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43246&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43246&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43246&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43246&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43246&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43246&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43246&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43246&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43246&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43246&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43246&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43246&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43246&r=mysqlcfg