[prev in list] [next in list] [prev in thread] [next in thread]
List: msql-mysql-modules
Subject: Re: DBD 2.9002 and documentation
From: Paul DuBois <paul () mysql ! com>
Date: 2005-09-14 16:31:00
Message-ID: p06230918bf4e00896269 () [192 ! 168 ! 0 ! 35]
[Download RAW message or body]
At 9:55 -0400 9/14/05, Rudy Lippan wrote:
>On Wed, 14 Sep 2005, nitzan shaked wrote:
>
>>DBD 2.9002 changed the behavior of returned value from do(): it now
>>returns the number of *matched*
>>rows by default, and not the number of actually-changed rows. This
>>is documented in the changelog.
>>
>>However, the DBI documentation states the value returned is the
>>number of affected rows (not
>>matched rows), and even still claims (under the "MySQL features")
>>that you can "change this using
>>a connection-string parameter".
>>
>>This suggests to me that the documentation is wrong: it
>>acknowledges that both options exist, and
>>that claims the default is something which it's not.
>>
>
>The docs are wrong. I probably forgot to update them when I made the change.
>Mea culpa, mea culpa....
>
>>The question is also what happens in the C (and other) API: is this
>>the default or not? Is the default
>>*different* between APIs?
>>
>>In short, is this:
>>1) A documentation error, and all API's are aligned, or:
>>2) A DBD-specific error, which should conform to some default but doesn't.
>>
>
>Neither :). It is a documentation error, and the documentation
>should read that rows() (and do()) returns the number of matched
>rows by default. The
>C API defaults to the number of changed rows, so if you want the C
>API behaviour, you have to pass "mysql_found_rows=0" to connect.
Also, with regard to the "(and other)", there are other APIs that
have a different default than the C API -- MySQL Connector/J (JDBC)
also defaults to rows-matched, because that it required by the JDBC
spec.
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=msql-mysql-modules@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic