          db.commit()
          
      def delete(self, key):
          cursor = db.cursor()
          cursor.execute("DELETE FROM %s WHERE key = %%s" % self._table, [key])
          db.commit()
          
      def has_key(self, key):
          cursor = db.cursor()
          cursor.execute("SELECT key FROM %s WHERE key = %%s" % self._table, [key])
 
</s> remove         cursor.execute("SELECT key FROM %s WHERE key = %%s" % self._table, [key])
 </s> add         cursor.execute("SELECT cache_key FROM %s WHERE cache_key = %%s" % self._table, [key]) </s> remove             cursor.execute("INSERT INTO %s (key, value, expires) VALUES (%%s, %%s, %%s)" % self._table, [key, encoded, str(exp)])
 </s> add             cursor.execute("INSERT INTO %s (cache_key, value, expires) VALUES (%%s, %%s, %%s)" % self._table, [key, encoded, str(exp)]) </s> remove             cursor.execute("UPDATE %s SET value = %%s, expires = %%s WHERE key = %%s" % self._table, [encoded, str(exp), key])
 </s> add             cursor.execute("UPDATE %s SET value = %%s, expires = %%s WHERE cache_key = %%s" % self._table, [encoded, str(exp), key]) </s> remove         cursor.execute("SELECT key, value, expires FROM %s WHERE key = %%s" % self._table, [key])
 </s> add         cursor.execute("SELECT cache_key, value, expires FROM %s WHERE cache_key = %%s" % self._table, [key]) </s> remove             cursor.execute("DELETE FROM %s WHERE key = %%s" % self._table, [key])
 </s> add             cursor.execute("DELETE FROM %s WHERE cache_key = %%s" % self._table, [key])
        cursor.execute("DELETE FROM %s WHERE cache_key = %%s" % self._table, [key])
          db.commit()
          
      def delete(self, key):
          cursor = db.cursor()
        cursor.execute("DELETE FROM %s WHERE cache_key = %%s" % self._table, [key])
          db.commit()
          
      def has_key(self, key):
          cursor = db.cursor()
          cursor.execute("SELECT key FROM %s WHERE key = %%s" % self._table, [key])
keep keep keep keep replace keep keep keep keep keep
 Fixed #515 (again) - renamed "key" field in SQL cache to "cache_key" because 
MySQL reserves "key".


git-svn-id: http://code.djangoproject.com/svn/django/trunk@695 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/core/cache.py