From adcb259bb8efb8df6a01eeec780bda6e6647b6a4 Mon Sep 17 00:00:00 2001 From: "R. Tyler Ballance" Date: Fri, 19 Feb 2010 00:35:02 -0800 Subject: [PATCH] Borrow some attributes from the MySQLdb-backend's DatabaseFeatures class I did not take the attribute `empty_fetchmany_value = ()` which results in blocking on fetchmany() For example, this is where we "hang" in that case (just including the pertinent part of the traceback):: File "/usr/local/lib/python2.6/site-packages/django/db/models/sql/query.py", line 2383, in result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)), File "/usr/local/lib/python2.6/site-packages/mysql/connector/cursor.py", line 492, in fetchmany while cnt > 0 and self._have_result: --- mysql/django/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mysql/django/base.py b/mysql/django/base.py index 8d0d8c1..059319b 100644 --- a/mysql/django/base.py +++ b/mysql/django/base.py @@ -62,8 +62,11 @@ server_version_re = re.compile(r'(\d{1,2})\.(\d{1,2})\.(\d{1,2})') # TRADITIONAL will automatically cause most warnings to be treated as errors. class DatabaseFeatures(BaseDatabaseFeatures): + allows_group_by_pk = True autoindexes_primary_keys = False inline_fk_references = False + related_fields_match_type = True + update_can_self_select = False class DatabaseWrapper(BaseDatabaseWrapper):