]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Improved support for the cymysql driver, supporting version 0.6.5,
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 17 Aug 2013 04:31:57 +0000 (00:31 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 17 Aug 2013 04:31:57 +0000 (00:31 -0400)
courtesy Hajime Nakagami.

doc/build/changelog/changelog_09.rst
lib/sqlalchemy/dialects/mysql/cymysql.py
lib/sqlalchemy/util/__init__.py
test/aaa_profiling/test_memusage.py
test/engine/test_transaction.py
test/orm/test_naturalpks.py

index 2c4cf7cbcf0b33b489a00a10c0b5acbe8866d12a..3e755125bf1b3c15da21fb55da9e21829705fcff 100644 (file)
@@ -6,6 +6,12 @@
 .. changelog::
     :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
 
index deb2de449d8ee1b434a54473cad2c24202d1e243..420d2572dce27c9f44a8f3187051ac815cd945c8 100644 (file)
@@ -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,
index 968421c8bdc9003e35dc15c3b7b6c86821c4d3bb..c52b86f0a89af5d4538c41ff1d0dfce4977f9550 100644 (file)
@@ -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, \
index 7e6688b95da8594b8d7c4e28d25b1014d07d1b26..3766abb88980a3d23e9309aa549380fe4bef6425 100644 (file)
@@ -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,
index ffc12b5b97d7e02e0c876d3d1ffa6069c9a17b4b..50d38e25794177c5cd9e2bf70c626b581f0c199b 100644 (file)
@@ -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)
 
index 173408b82928fa5bc37383e7f399e9427b3465a7..a4663217fe48cf6cb041447a805a5caa78336b29 100644 (file)
@@ -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)