Re: update query returns wrong number of rows affected
Dave Dyer <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <[email protected]> |
At 06:17 PM 9/15/2004, Jochen Wiedmann wrote: >Dave Dyer wrote: > >>The case in point, I'm merging two databases and all the >>rows are usually the same. I'm interested in the exceptions; >>and to me "affected rows" means changed rows. >>Maybe it's always been this way, but the C api makes the number >>of changed rows easily available, I find it very useful. > >But you can answer that question by performing a simple count query? There are good reasons to just want the count as a side effect. For one, it's reliable to say "change this and tell me how many changed" it's not reliable to say "if I changed this, how many would change" and then say "ok do it" and expect the number of changed records to be the same. For another, in the case in point, the query takes several seconds and I do thousands of them. Doubling up would not be especially smart. It's obvious you shouldn't change the definition of numrows at this late date, but I'd like the other number to be available. -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/[email protected]