summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-08-17 00:31:57 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-08-17 00:31:57 -0400
commitb83a1564f1f4bc8da2af2d33bfb4f524b620382b (patch)
tree07bd0923e608d0a7496d4716422d7f4b64cc66fa
parentade6b233d78ca1d98e86fcd6c4fe92ba9732319d (diff)
downloadsqlalchemy-b83a1564f1f4bc8da2af2d33bfb4f524b620382b.tar.gz
Improved support for the cymysql driver, supporting version 0.6.5,
courtesy Hajime Nakagami.
-rw-r--r--doc/build/changelog/changelog_09.rst6
-rw-r--r--lib/sqlalchemy/dialects/mysql/cymysql.py4
-rw-r--r--lib/sqlalchemy/util/__init__.py2
-rw-r--r--test/aaa_profiling/test_memusage.py3
-rw-r--r--test/engine/test_transaction.py1
-rw-r--r--test/orm/test_naturalpks.py2
6 files changed, 13 insertions, 5 deletions
diff --git a/doc/build/changelog/changelog_09.rst b/doc/build/changelog/changelog_09.rst
index 2c4cf7cbc..3e755125b 100644
--- a/doc/build/changelog/changelog_09.rst
+++ b/doc/build/changelog/changelog_09.rst
@@ -7,6 +7,12 @@
:version: 0.9.0
.. change::
+ :tags: bug, mysql
+
+ Improved support for the cymysql driver, supporting version 0.6.5,
+ courtesy Hajime Nakagami.
+
+ .. change::
:tags: bug, examples
Added "autoincrement=False" to the history table created in the
diff --git a/lib/sqlalchemy/dialects/mysql/cymysql.py b/lib/sqlalchemy/dialects/mysql/cymysql.py
index deb2de449..420d2572d 100644
--- a/lib/sqlalchemy/dialects/mysql/cymysql.py
+++ b/lib/sqlalchemy/dialects/mysql/cymysql.py
@@ -37,7 +37,9 @@ class MySQLDialect_cymysql(MySQLDialect_mysqldb):
driver = 'cymysql'
description_encoding = None
- supports_sane_rowcount = False
+ supports_sane_rowcount = True
+ supports_sane_multi_rowcount = False
+ supports_unicode_statements = True
colspecs = util.update_copy(
MySQLDialect.colspecs,
diff --git a/lib/sqlalchemy/util/__init__.py b/lib/sqlalchemy/util/__init__.py
index 968421c8b..c52b86f0a 100644
--- a/lib/sqlalchemy/util/__init__.py
+++ b/lib/sqlalchemy/util/__init__.py
@@ -10,7 +10,7 @@ from .compat import callable, cmp, reduce, \
raise_from_cause, text_type, string_types, int_types, binary_type, \
quote_plus, with_metaclass, print_, itertools_filterfalse, u, ue, b,\
unquote_plus, b64decode, b64encode, byte_buffer, itertools_filter,\
- StringIO, inspect_getargspec
+ iterbytes, StringIO, inspect_getargspec
from ._collections import KeyedTuple, ImmutableContainer, immutabledict, \
Properties, OrderedProperties, ImmutableProperties, OrderedDict, \
diff --git a/test/aaa_profiling/test_memusage.py b/test/aaa_profiling/test_memusage.py
index 7e6688b95..3766abb88 100644
--- a/test/aaa_profiling/test_memusage.py
+++ b/test/aaa_profiling/test_memusage.py
@@ -308,7 +308,7 @@ class MemUsageTest(EnsureZeroed):
finally:
metadata.drop_all()
- @testing.crashes('mysql+cymysql', 'blocking with cymysql >= 0.6')
+ @testing.crashes('mysql+cymysql', 'blocking')
def test_unicode_warnings(self):
metadata = MetaData(testing.db)
table1 = Table('mytable', metadata, Column('col1', Integer,
@@ -604,6 +604,7 @@ class MemUsageTest(EnsureZeroed):
# in pysqlite itself. background at:
# http://thread.gmane.org/gmane.comp.python.db.pysqlite.user/2290
+ @testing.crashes('mysql+cymysql', 'blocking')
def test_join_cache(self):
metadata = MetaData(testing.db)
table1 = Table('table1', metadata, Column('id', Integer,
diff --git a/test/engine/test_transaction.py b/test/engine/test_transaction.py
index ffc12b5b9..50d38e257 100644
--- a/test/engine/test_transaction.py
+++ b/test/engine/test_transaction.py
@@ -29,7 +29,6 @@ class TransactionTest(fixtures.TestBase):
testing.db.execute(users.delete()).close()
@classmethod
- @testing.crashes('mysql+cymysql', 'deadlock')
def teardown_class(cls):
users.drop(testing.db)
diff --git a/test/orm/test_naturalpks.py b/test/orm/test_naturalpks.py
index 173408b82..a4663217f 100644
--- a/test/orm/test_naturalpks.py
+++ b/test/orm/test_naturalpks.py
@@ -391,7 +391,7 @@ class NaturalPKTest(fixtures.MappedTest):
# mysqldb executemany() of the association table fails to
# report the correct row count
@testing.fails_if(lambda: testing.against('mysql')
- and not testing.against('+zxjdbc'))
+ and not (testing.against('+zxjdbc') or testing.against('+cymysql')))
def test_manytomany_nonpassive(self):
self._test_manytomany(False)