mirror of
https://github.com/django/django.git
synced 2025-09-07 03:00:43 +00:00
Refs #16614 -- Called _prepare_cursor() on every created cursor.
This commit is contained in:
parent
1f10c3994c
commit
05bdf4f44d
2 changed files with 3 additions and 4 deletions
|
@ -223,14 +223,13 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
|||
|
||||
def chunked_cursor(self):
|
||||
self._named_cursor_idx += 1
|
||||
db_cursor = self._cursor(
|
||||
return self._cursor(
|
||||
name='_django_curs_%d_%d' % (
|
||||
# Avoid reusing name in other threads
|
||||
threading.current_thread().ident,
|
||||
self._named_cursor_idx,
|
||||
)
|
||||
)
|
||||
return self._prepare_cursor(db_cursor)
|
||||
|
||||
def _set_autocommit(self, autocommit):
|
||||
with self.wrap_database_errors:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue