[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-bugs
Subject:    Re: mysql_affected_rows() function no effect
From:       Michael Widenius <monty () mysql ! com>
Date:       2001-03-23 17:02:31
[Download RAW message or body]


Hi!

>>>>> "Christophe" == Christophe Baegert <cbaegert@europeanservers.net> writes:

Christophe> Hello,
Christophe> I've seen that

Christophe> "delete from table" returns 0
Christophe> "delete from table where num=xxx" returns the number of rows where num=xxx

Christophe> so mysql_affected_rows talks about the where, not about the delete.

Christophe> I don't know if this could be named "a bug"... If the developers wanted this
Christophe> feature, it isn't a bug.

It's a bug and it's documented in the 'known bugs' section in the
MySQL manual.  It will be fixed in 4.0.  (The problem is that current
DELETE ... without a where is implemented as TRUNCATE and as this
doesn't open the original table, it can't return the number of deleted
rows).

Regards,
Monty

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail bugs-thread1142@lists.mysql.com
To unsubscribe, e-mail <bugs-unsubscribe@lists.mysql.com>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic