Re: update query returns wrong number of rows affected

Dave Dyer <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
At 05:00 PM 9/15/2004, Jochen Wiedmann wrote:
>Dave Dyer wrote:
>
>>For some UPDATE queries (possibly those involving joins?), the number of
>>rows reported for the query is the number of rows processed, rather than the
>>number of rows actually changed.
>
>What does the distinction between "affected" and "matched" mean? Is it, that some rows already had the new value? If so, I would think that I would indeed want to see the value "matched", because the typical use case is I can see is comparing the number of rows against 0.

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.



-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.