summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-08-31 00:45:35 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-08-31 00:45:35 +0000
commit7a1b69418937fa589602ea104a24213d80585b47 (patch)
tree00ff30596c7faddbe90e5ecf58eddc226a350280 /django
parent4d8af2faa3bde14d2f3a5a30b0772b554c8af245 (diff)
[1.2.X] Fixed #14199 -- Added a missing table creation statement in the db cache backend cull implementation, and added tests for cache culling. Thanks to Tim for the report.
Backport of r13678 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/core/cache/backends/db.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/core/cache/backends/db.py b/django/core/cache/backends/db.py
index 1300dd4b66..833fa749aa 100644
--- a/django/core/cache/backends/db.py
+++ b/django/core/cache/backends/db.py
@@ -124,6 +124,7 @@ class CacheClass(BaseCache):
if self._cull_frequency == 0:
self.clear()
else:
+ table = connections[db].ops.quote_name(self._table)
cursor.execute("DELETE FROM %s WHERE expires < %%s" % table,
[connections[db].ops.value_to_db_datetime(now)])
cursor.execute("SELECT COUNT(*) FROM %s" % table)