diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-09-09 16:18:38 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-09-09 16:18:38 +0000 |
| commit | ddaca29d3dc2b4a917a9e527fd90a14ef8bc47e4 (patch) | |
| tree | 276dfb04bb0b7127206401588c4fbac074f6206a /django/core/cache | |
| parent | 387e192f2584d283d989ebe92e63d174413e30e4 (diff) | |
Fixed a bunch of imports of the email stdlib module now that we are on Python 2.5 to ease the Python 3 port. Thanks, Martin von Löwis.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/cache')
| -rw-r--r-- | django/core/cache/backends/db.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/cache/backends/db.py b/django/core/cache/backends/db.py index af343ffc5d..88d7ae2973 100644 --- a/django/core/cache/backends/db.py +++ b/django/core/cache/backends/db.py @@ -139,7 +139,7 @@ class DatabaseCache(BaseDatabaseCache): if connections[db].vendor == 'oracle': # Special case for Oracle because it doesn't support LIMIT + OFFSET cursor.execute("SELECT cache_key FROM (SELECT ROW_NUMBER() OVER (ORDER BY cache_key) AS counter, cache_key FROM %s) WHERE counter > %%s AND COUNTER <= %%s" % table, [cull_num, cull_num + 1]) - else: + else: # This isn't standard SQL, it's likely to break with some non officially supported databases cursor.execute("SELECT cache_key FROM %s ORDER BY cache_key LIMIT 1 OFFSET %%s" % table, [cull_num]) cursor.execute("DELETE FROM %s WHERE cache_key < %%s" % table, [cursor.fetchone()[0]]) |
