From 50328f0a618674b7143d86acaa7016c5293e9774 Mon Sep 17 00:00:00 2001 From: Anssi Kääriäinen Date: Wed, 20 Feb 2013 03:11:54 +0200 Subject: Fixed #19861 -- Transaction ._dirty flag improvement There were a couple of errors in ._dirty flag handling: * It started as None, but was never reset to None. * The _dirty flag was sometimes used to indicate if the connection was inside transaction management, but this was not done consistently. This also meant the flag had three separate values. * The None value had a special meaning, causing for example inability to commit() on new connection unless enter/leave tx management was done. * The _dirty was tracking "connection in transaction" state, but only in managed transactions. * Some tests never reset the transaction state of the used connection. * And some additional less important changes. This commit has some potential for regressions, but as the above list shows, the current situation isn't perfect either. --- docs/ref/models/querysets.txt | 5 ----- 1 file changed, 5 deletions(-) (limited to 'docs') diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index f77f87dd8e..0fa8b8e361 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -1249,11 +1249,6 @@ make the call non-blocking. If a conflicting lock is already acquired by another transaction, :exc:`~django.db.DatabaseError` will be raised when the queryset is evaluated. -Note that using ``select_for_update()`` will cause the current transaction to be -considered dirty, if under transaction management. This is to ensure that -Django issues a ``COMMIT`` or ``ROLLBACK``, releasing any locks held by the -``SELECT FOR UPDATE``. - Currently, the ``postgresql_psycopg2``, ``oracle``, and ``mysql`` database backends support ``select_for_update()``. However, MySQL has no support for the ``nowait`` argument. Obviously, users of external third-party backends should -- cgit v1.3