From:             randy at rcs-comp dot com
Operating system: Windows XP
PHP version:      5.2.0
PHP Bug Type:     PDO related
Bug description:  Inconsistent row count totals being returned with sqlite2 and 
sqlite3 PDO

Description:
------------
After using prepare() & execute() to retrieve a PDO Statement from a PDO
Sqlite2 connection, subsequent calls to exec() return a "rows affected"
value that appears to sum the previous calls to exec() together.

Reproduce code:
---------------
http://www.rcs-comp.com/phpcode/simple_pdo_test3.php.txt

Expected result:
----------------
>php simple_pdo_test3.php
rows updated w/ exec() (some): 2 2
rows updated w/ exec() (all): 3 3
statement preped and all records retrieved
rows updated w/ exec() (some): 2 2
rows updated w/ exec() (all): 3 3
rows updated w/ exec() (some): 2 2
rows updated w/ prep & execute() (all): 3 3


Actual result:
--------------
>php simple_pdo_test3.php
rows updated w/ exec() (some): 2 2
rows updated w/ exec() (all): 3 3
statement preped and all records retrieved
rows updated w/ exec() (some): 2 2
rows updated w/ exec() (all): 3 5 <-- notice the addition from the prev.
row
rows updated w/ exec() (some): 2 7 <-- notice the addition from the prev.
row
rows updated w/ prep & execute() (all): 3 3 <-- problem disappears


-- 
Edit bug report at http://bugs.php.net/?id=39618&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39618&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39618&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39618&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39618&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39618&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39618&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39618&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39618&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39618&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39618&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39618&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39618&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39618&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39618&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39618&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39618&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39618&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39618&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39618&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39618&r=mysqlcfg

Reply via email to