Ticket #10438: mysql_rows.patch

File mysql_rows.patch, 931 bytes (added by Daniel Tang <dytang@…>, 16 years ago)
  • django/db/backends/mysql/base.py

    diff -r 8e2ff4057e07 django/db/backends/mysql/base.py
    a b  
    88
    99try:
    1010    import MySQLdb as Database
     11    import MySQLdb.constants.CLIENT as client_const
    1112except ImportError, e:
    1213    from django.core.exceptions import ImproperlyConfigured
    1314    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
     
    273274                kwargs['host'] = settings_dict['DATABASE_HOST']
    274275            if settings_dict['DATABASE_PORT']:
    275276                kwargs['port'] = int(settings_dict['DATABASE_PORT'])
     277            kwargs['client_flag'] = client_const.FOUND_ROWS
    276278            kwargs.update(settings_dict['DATABASE_OPTIONS'])
    277279            self.connection = Database.connect(**kwargs)
    278280            self.connection.encoders[SafeUnicode] = self.connection.encoders[unicode]
Back to Top