On Jul 31, 2007, at 3:40 AM, Arun Kumar PG wrote:
> Looks like the problem is coming because of the fact when we are > updating a row in table with the same data the rowcount returned by > mysql is 0. Only when there is a change in data the rowcount is > returned. > > Assuming RollValue column is changing from 99 to 100 if I execute > the following statements: > > UPDATE TABLE_X Set RollValue=100 WHERE ID=100; > > >> this will return rowcount = 1 > > Again running this, UPDATE TABLE_X Set RollValue=100 WHERE ID=100; > > >> will return rowcount = 0 and therefore the transaction fails. > > Has anything changed in latest version of SA and I recently moved > to SA 3.9 after post which I am facing this problem. > are you using a custom connection function ? or some ancient version of MySQLDB ? we explicitly set an option on the MySQLDB connection so that rowcount works properly. very old versions of SA didnt set this variable and ignored MySQLDB's rowcount...but that would be early versions of 0.3 at the most recent. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
