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 <lambda>
    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:
This commit is contained in:
R. Tyler Ballance 2010-02-19 00:35:02 -08:00
parent 9d78231e92
commit adcb259bb8
1 changed files with 3 additions and 0 deletions

View File

@ -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):