#10438: Rowcount for updates not correct with MySQL
---------------------------------------------------+------------------------
          Reporter:  mtredinnick                   |         Owner:  nobody
            Status:  new                           |     Milestone:  1.1   
         Component:  Database layer (models, ORM)  |       Version:  SVN   
        Resolution:                                |      Keywords:        
             Stage:  Accepted                      |     Has_patch:  1     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by Daniel Tang <[email protected]>):

  * has_patch:  0 => 1

Comment:

 Also sent to django-developers:

 Not sure if this is an end-all solution, but you can pass a client_flag
 kwarg that makes MySQLdb return the number of matched rows instead of
 affected rows. In MySQLdb.constants.CLIENT there is a FOUND_ROWS constant.
 Passing it to connect resolves this problem. Patch attached just to show
 what I did.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10438#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to