No, MySQL will indicate if anything in the row has changed. If you are
updating with the same data, than nothing changes and MySQL doesn't
waste the time to lock the table, write the data and update the
indexes. It's much more efficient this way.
On Sep 20, 2004, at 3:22 PM, Jeff Demel wrote:
I'm seeing some odd behavior when I run an UPDATE query, and need to
know if this is something that MySQL does. It could be something the
MySQLDirect .NET provider is doing, and to cover that possibility I've
sent an email to their support team.
So anyway, here's the scenario.
If I run an UPDATE query, and my UPDATE statement contains the same
values that are already in the row, what should the return value be?
I'm occasionally sending the same exact data back to a row to refresh
it, and am getting 0 as a return value. If I send different data, then
I get a 1 back, which makes sense.
For example:
*Row values in ThisTable
ID(Int), Name(Text), Description(Text)
5,"thisname","thisdescription"
*SQL
UPDATE ThisTable Set
Name = 'thisname',
Description = 'thisdescription'
WHERE ID = 5;
So should this SQL statement return 0 or 1? I'm getting 0, but really
think I should be getting a 1. I would think that if there was no ID
with a value of 5, then it would return 0. But if there is a row with
an ID of 5, then it should refresh the row and return 1. Right?
-Jeff
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]