תשובה: Re: DBD 2.9002 and documentat ion
nitzan shaked <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <[email protected]> |
Rudy, Paul Thanks for your answers. At least now I know this is the intended behavior and I feel better in relying on this. Best regards, Nitzan ----- הודעה מקורית ----- מאת: Rudy Lippan <[email protected]> תאריך: יום ד', ספטמבר 14, 2005 16:55 נושא: Re: DBD 2.9002 and documentation > > > 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. > > -r > -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/[email protected]