Updated docs after changing select_for_update() to raise NotSupportedError.

Follow up to 054a44d6f0.
This commit is contained in:
Ran Benita 2017-04-11 18:52:53 +03:00 committed by Tim Graham
parent 5dbf1c4b23
commit 2a6b4e6521
3 changed files with 8 additions and 7 deletions

View file

@ -569,7 +569,8 @@ Row locking with ``QuerySet.select_for_update()``
MySQL does not support the ``NOWAIT`` and ``SKIP LOCKED`` options to the
``SELECT ... FOR UPDATE`` statement. If ``select_for_update()`` is used with
``nowait=True`` or ``skip_locked=True`` then a ``DatabaseError`` will be raised.
``nowait=True`` or ``skip_locked=True``, then a
:exc:`~django.db.NotSupportedError` is raised.
Automatic typecasting can cause unexpected results
--------------------------------------------------

View file

@ -1640,8 +1640,8 @@ backends support ``select_for_update()``. However, MySQL doesn't support the
``nowait`` and ``skip_locked`` arguments.
Passing ``nowait=True`` or ``skip_locked=True`` to ``select_for_update()``
using database backends that do not support these options, such as MySQL, will
cause a :exc:`~django.db.DatabaseError` to be raised. This prevents code from
using database backends that do not support these options, such as MySQL,
raises a :exc:`~django.db.NotSupportedError`. This prevents code from
unexpectedly blocking.
Evaluating a queryset with ``select_for_update()`` in autocommit mode on