From 3f8f1f16bd9e284afee910a6036fcb0958a6c0c2 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 18 Aug 2015 12:40:18 -0400 Subject: - as the Concatenable mixin was changed to support calling down to "super" instead of hardcoding to "self.type" for the default return value, the base Comparator was returning other_comparator.type. It's not clear what the rationale for this was, though in theory the base Comparator should possibly even throw an exception if the two types aren't the same (or of the same affinity?) . - mysql.SET was broken on this because the bitwise version adds "0" to the value to force an integer within column_expression, we are doing type_coerces here now in any case so that there is no type ambiguity for this operation --- lib/sqlalchemy/dialects/mysql/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/mysql') diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index fee05fd2d..4b3e5bcd1 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -1584,7 +1584,10 @@ class SET(_EnumeratedValues): def column_expression(self, colexpr): if self.retrieve_as_bitwise: - return colexpr + 0 + return sql.type_coerce( + sql.type_coerce(colexpr, sqltypes.Integer) + 0, + self + ) else: return colexpr -- cgit v1.2.1