update query returns wrong number of rows affected

Dave Dyer <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
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.

This shows the results from a command prompt:

mysql> UPDATE jobpage LEFT JOIN dbin.pagedata as plant
    ->    ON pagenum=page_numberid AND job_numberid='7' and job_yearid='2004'
    ->    SET  jobpage.date_received=plant.date_received
    ->    WHERE number='7-2004'
    -> ;
Query OK, 0 rows affected (5.14 sec)
Rows matched: 224  Changed: 0  Warnings: 0

Using dbd-mysql, the result returned is 224 rather than 0

----

win2k

Binary build 809 provided by ActiveState Corp. http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Feb  3 2004 00:28:51

Crypt-TEA 1.44: up to date.
Crypt-Tea 1.44: up to date.
DBD-mysql 2.9003: up to date.
DBI 1.43: up to date.
Data-Dump 1.01: up to date.
IO-Zlib 1.01: up to date.
Mail-Sender 0.8.10: up to date.
Mail-Sendmail 0.79: up to date.
TimeDate 1.16: up to date.
libwin32 0.21: up to date.

mysql  Ver 12.22 Distrib 4.0.20a, for Win95/Win98 (i32)


-- 
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.