ID:               39618
 User updated by:  randy at rcs-comp dot com
 Reported By:      randy at rcs-comp dot com
 Status:           Open
 Bug Type:         PDO related
 Operating System: Windows XP
 PHP Version:      5.2.0
 New Comment:

Tony,

Sorry, I am not going to let this one drop unless someone else chimes
in.  I have been around bugs.php.net to know that you are reluctant to
fix bugs that are truly bugs.  Case in point:

http://bugs.php.net/bug.php?id=37846

This is a bug and not a documentation problem!


Previous Comments:
------------------------------------------------------------------------

[2006-11-28 14:39:00] randy at rcs-comp dot com

Another reason it is a bug is because the PDO SQLite2 driver is
inconsistent itself!

Notice that the bug only appears after a prepared statement is
requested.  If this is not a bug, then under "Actual Results" I should
have:

>php simple_pdo_test3.php
rows updated w/ exec() (some): 2 2
rows updated w/ exec() (all): 3 3 //<-- if truly not a bug, then this
should say "3 5"
statement preped and all records retrieved
rows updated w/ exec() (some): 2 2
rows updated w/ exec() (all): 3 5 
rows updated w/ exec() (some): 2 7
rows updated w/ prep & execute() (all): 3 3

------------------------------------------------------------------------

[2006-11-28 14:36:08] [EMAIL PROTECTED]

The very same issue in SQLite bug db
(http://www.sqlite.org/cvstrac/tktview?tn=383) has beem resolved by
adding it to the docs.
If you think it's wrong, then you can report it to SQLite developers
and persuade them to fix it in SQLite.

Since this is the way SQLite works, we can't fix it in PHP and this
should be documented.

>If you insist that this is a documentation problem
Yes, I do.

>will you please have another PHP developer chime in and agree with
you.
No, thank you.

------------------------------------------------------------------------

[2006-11-28 14:26:33] randy at rcs-comp dot com

THIS IS NOT A DOCUMENTATION PROBLEM!!!  The documentation describes the
best way for the function to work.

It is a problem with a PDO driver not working like every other PDO
driver!  What is the point of a database abstraction layer if you can't
rely upon it to be consistent across drivers!!!!

If you insist that this is a documentation problem, will you please
have another PHP developer chime in and agree with you.  If so, I will
leave the bug report alone.

Thank you.

------------------------------------------------------------------------

[2006-11-28 14:22:46] [EMAIL PROTECTED]

Reclassified as docu problem.

------------------------------------------------------------------------

[2006-11-28 14:20:00] randy at rcs-comp dot com

Tony,

Thank you for your time on this and the explanation.  However, I still
think this represents a bug in PHP for three reasons.

1)  The documentation says "PDOStatement::rowCount --  Returns the
number of rows affected by the last SQL statement"

Notice that it says "the last" SQL statement.  In my example, the
rowCount() returns the SUM of several SQL statements not the total of
the "last SQL statement."  This function does not work the way the
documentation says it does, and is therefore buggy.

2)  I understand what you are saying about "this is how it is supposed
to work in Sqlite2."  However, just because SQLite2 is working
correctly does not automatically mean that PDO is working correctly. 
PDO is a database abstraction layer whose purpose is to hide the
implimenation details of the specific drivers for PHP developers.  If
you don't fix this bug, every SQLite2 developer would need to be aware
of this driver specific issue and code around it.

3) I tested PDO MySQL, PDO Mssql, and PDO SQLite 3 and NONE of them
exhibit the behavior of PDO SQLite2.  This is a huge incompatability
for the SQLite 2 driver.

I welcome a difference of opinion, but honestly it seems pretty clear
to me that this is a bug.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/39618

-- 
Edit this bug report at http://bugs.php.net/?id=39618&edit=1

Reply via email to