summaryrefslogtreecommitdiff
path: root/django/db/backends/utils.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-06-07 14:09:27 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-06-07 14:37:43 +0200
commitcfcca7ccce3dc527d16757ff6dc978e50c4a2e61 (patch)
tree81b5ac70392c045d4ed7f9fa3adf7cd5d875cb96 /django/db/backends/utils.py
parente2112edd9ac6a5f1877a62dd1c88d2d1726350de (diff)
Fixed #3711, #6734, #12581 -- Bounded connection.queries.
Prevented unlimited memory consumption when running background tasks with DEBUG=True. Thanks Rob, Alex, Baptiste, and others.
Diffstat (limited to 'django/db/backends/utils.py')
-rw-r--r--django/db/backends/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/backends/utils.py b/django/db/backends/utils.py
index 8078af9f95..77132e3f25 100644
--- a/django/db/backends/utils.py
+++ b/django/db/backends/utils.py
@@ -80,7 +80,7 @@ class CursorDebugWrapper(CursorWrapper):
stop = time()
duration = stop - start
sql = self.db.ops.last_executed_query(self.cursor, sql, params)
- self.db.queries.append({
+ self.db.queries_log.append({
'sql': sql,
'time': "%.3f" % duration,
})
@@ -99,7 +99,7 @@ class CursorDebugWrapper(CursorWrapper):
times = len(param_list)
except TypeError: # param_list could be an iterator
times = '?'
- self.db.queries.append({
+ self.db.queries_log.append({
'sql': '%s times: %s' % (times, sql),
'time': "%.3f" % duration,
})