diff options
Diffstat (limited to 'docs/ref/models')
| -rw-r--r-- | docs/ref/models/querysets.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 69e15dc0e9..14e2cfac18 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -1314,9 +1314,19 @@ 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. +Executing a queryset with ``select_for_update`` in autocommit mode is +an error because the rows are then not locked. If allowed, this would +facilitate data corruption, and could easily be caused by calling, +outside of any transaction, code that expects to be run in one. + Using ``select_for_update`` on backends which do not support ``SELECT ... FOR UPDATE`` (such as SQLite) will have no effect. +.. versionchanged:: 1.6.3 + + It is now an error to execute a query with ``select_for_update()`` in + autocommit mode. With earlier releases in the 1.6 series it was a no-op. + Methods that do not return QuerySets ------------------------------------ |
