#47845 [NEW]: PDO_Firebird omits first row from query

[email protected] ("piotrt at itisit dot pl")
Newsgroups php.bugs
Message-ID <[email protected]>
From:             piotrt at itisit dot pl
Operating system: Windows XP
PHP version:      5.2.9
PHP Bug Type:     PDO related
Bug description:  PDO_Firebird omits first row from query

Description:
------------
PDO_Firebird omits first row from query.

Reproduce code:
---------------
First create sample table:
CREATE TABLE PDO_BUG(
  ID Integer NOT NULL,
  TEXTFIELD Varchar(20),
  NUMFIELD Numeric(18,2),
  PRIMARY KEY (ID)
);
INSERT INTO PDO_BUG (ID, TEXTFIELD, NUMFIELD) VALUES ('1', 'val1',
'992831.00');
INSERT INTO PDO_BUG (ID, TEXTFIELD, NUMFIELD) VALUES ('2', 'val2',
'488111.00');
INSERT INTO PDO_BUG (ID, TEXTFIELD, NUMFIELD) VALUES ('3', 'val3',
'1109911.00');

 $dbh = new
PDO('firebird:dbname=localhost:database','SYSDBA','masterkey');
 $sql = "select * from PDO_BUG order by ID" ;
 $stm = $dbh->prepare($sql);
 $stm->execute();
 $result = $stm->fetchAll(PDO::FETCH_ASSOC);
 print_r($result);

Expected result:
----------------
$result should containt 3 rows from query.

Actual result:
--------------
First row is omitted. I already tried different methods (with or without
prepare, fetching single rows etc.). I didn't find a way to make PDO return
all rows from query including first one.

-- 
Edit bug report at http://bugs.php.net/?id=47845&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        http://bugs.php.net/fix.php?id=47845&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        http://bugs.php.net/fix.php?id=47845&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        http://bugs.php.net/fix.php?id=47845&r=trysnapshot60
Fixed in CVS:                        http://bugs.php.net/fix.php?id=47845&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47845&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=47845&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=47845&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=47845&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=47845&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=47845&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=47845&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=47845&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=47845&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=47845&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47845&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47845&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=47845&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=47845&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=47845&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=47845&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=47845&r=mysqlcfg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.