#13906: REPEATABLE READ (as used by default on MySQL) breaks atleast QuerySet.get_or_create(). -------------------------------------+------------------------------------- Reporter: | Owner: sebastian_noack | Status: new Type: | Component: Database layer Cleanup/optimization | (models, ORM) Milestone: 1.4 | Severity: Normal Version: SVN | Keywords: mysql transaction Resolution: | isolation Triage Stage: Accepted | Has patch: 1 Needs documentation: 1 | Needs tests: 0 Patch needs improvement: 1 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+-------------------------------------
Comment (by mila): I would use [http://dev.mysql.com/doc/refman/5.0/en/innodb-locking- reads.html SELECT ... FOR UPDATE or SELECT ... LOCK IN SHARE MODE] option and get fresh data instead of changing global transaction level because of one concrete bug. This should be easy now when Queryset.select_for_update method was implemented [16058]. Note that "REPEATABLE READ" isolation level is [http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt more strict] that "READ COMMITTED" - which means that switching to "READ COMMITTED" level does not guarantee anything extra. If it fixes this problem it is just implementation detail which we should not rely on. -- Ticket URL: <https://code.djangoproject.com/ticket/13906#comment:20> Django <https://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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.