As mentioned in my earlier email thread: I am using pool.QueuePool for managing connections and this pool is fed with a creator function which returns an instance of my own custom DBAPI class (I need this because of some logging stuff that I am doing). This custom DBAPI class returns a Connection object returned by MySQLdb.connect.
>> we explicitly set an option on the MySQLDB connection >> so that rowcount works properly. Are you referring to the changes in sa/databases/mysql.py where in we are setting the 'client_flag' ? Quick question: the rowcount related update as mentioned by you will work even if I am creating an engine passing in a pool - right? Looks like something is going wrong somewhere in my code.. any helpful pointers for troubleshooting this down ? On 7/31/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > > 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. > > > > > > > -- Cheers, - A --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---