summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPrzemysław Suliga <suligap@gmail.com>2015-05-31 20:15:45 +0200
committerTim Graham <timograham@gmail.com>2015-06-01 08:53:12 -0400
commitd29ed3f355b0c57e7036807f1d54f33796d8d820 (patch)
tree2f0485e8702253868ad6d5234cfec97ecd95b265 /docs
parent59383f1e3a8ab5a6477dbd5bb1d7c32366a9d8f8 (diff)
Fixed #24880 -- Added more explicit docs on select_for_update() on SQLite.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/querysets.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 100553bd87..0ad944fe3a 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -1485,14 +1485,17 @@ do not support ``nowait``, such as MySQL, will cause a
:exc:`~django.db.DatabaseError` to be raised. This is in order to prevent code
unexpectedly blocking.
-Evaluating a queryset with ``select_for_update()`` in autocommit mode is
-a :exc:`~django.db.transaction.TransactionManagementError` error because the
+Evaluating a queryset with ``select_for_update()`` in autocommit mode on
+backends which support ``SELECT ... FOR UPDATE`` is a
+:exc:`~django.db.transaction.TransactionManagementError` error because the
rows are not locked in that case. If allowed, this would facilitate data
corruption and could easily be caused by calling code that expects to be run in
a transaction outside of one.
Using ``select_for_update()`` on backends which do not support
``SELECT ... FOR UPDATE`` (such as SQLite) will have no effect.
+``SELECT ... FOR UPDATE`` will not be added to the query, and an error isn't
+raised if ``select_for_update()`` is used in autocommit mode.
.. warning::