          else:
              return getattr(self.cursor, attr)
  
  class DatabaseOperations(BaseDatabaseOperations):
      def date_extract_sql(self, lookup_type, field_name):
          # http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html
          return "EXTRACT(%s FROM %s)" % (lookup_type.upper(), field_name)
  
 
</s> remove     if lookup_type in ('iexact', 'icontains', 'istartswith', 'iendswith') and backend.needs_upper_for_iops:
 </s> add     if lookup_type in ('iexact', 'icontains', 'istartswith', 'iendswith') and connection.features.needs_upper_for_iops:
class DatabaseFeatures(BaseDatabaseFeatures):
    autoindexes_primary_keys = False

          else:
              return getattr(self.cursor, attr)
  
class DatabaseFeatures(BaseDatabaseFeatures):
    autoindexes_primary_keys = False

  class DatabaseOperations(BaseDatabaseOperations):
      def date_extract_sql(self, lookup_type, field_name):
          # http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html
          return "EXTRACT(%s FROM %s)" % (lookup_type.upper(), field_name)
  
keep keep add keep keep keep keep keep
 Implemented BaseDatabaseFeatures and changed all code to access it -- connection.features.foo instead of backend.foo

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5974 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/db/backends/mysql_old/base.py