[Sqlalchemy-commits] commit/sqlalchemy: zzzeek: - The MySQL CAST compilation now takes into account
Brought to you by:
zzzeek
From: Bitbucket <com...@bi...> - 2014-01-13 19:06:29
|
1 new commit in sqlalchemy: https://bitbucket.org/zzzeek/sqlalchemy/commits/1536bc4664a2/ Changeset: 1536bc4664a2 Branch: None User: zzzeek Date: 2014-01-13 20:05:05 Summary: - The MySQL CAST compilation now takes into account aspects of a string type such as "charset" and "collation". While MySQL wants all character- based CAST calls to use the CHAR type, we now create a real CHAR object at CAST time and copy over all the parameters it has, so that an expression like ``cast(x, mysql.TEXT(charset='utf8'))`` will render ``CAST(t.col AS CHAR CHARACTER SET utf8)``. - Added new "unicode returns" detection to the MySQL dialect and to the default dialect system overall, such that any dialect can add extra "tests" to the on-first-connect "does this DBAPI return unicode directly?" detection. In this case, we are adding a check specifically against the "utf8" encoding with an explicit "utf8_bin" collation type (after checking that this collation is available) to test for some buggy unicode behavior observed with MySQLdb version 1.2.3. While MySQLdb has resolved this issue as of 1.2.4, the check here should guard against regressions. The change also allows the "unicode" checks to log in the engine logs, which was not previously the case. [ticket:2906] Affected #: 8 files Repository URL: https://bitbucket.org/zzzeek/sqlalchemy/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |