#13906: REPEATABLE READ (as used by default on MySQL) breaks atleast
QuerySet.get_or_create().
------------------------------------------+---------------------------------
 Reporter:  sebastian_noack               |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.2       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 MySQL is the only database supported by django, which support transactions
 but is using an other isolation level than READ COMMITED. MySQL is using
 REPEATABLE READ by default. That means that when you execute a select
 statement, the result set will be the same for all subsequent queries,
 selcting the same rows (even if no rows ere returned). This obviously
 breaks concurrent calls of QuerySet.get_or_create(). It is hard to writing
 code using transactions, running on multiple RDBMS using different
 isolation levels. So i suggest, to make the MySQL backend set the
 isolation level to READ COMMITTED on each new connection. And add a
 setting disabling this behaviour for those who really know what they are
 doing or those who have configured it already as global default in their
 MySQL server.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13906>
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