wrong dialect variable checked when encoding bind keys

Issue #2101 resolved
Mike Bayer repo owner created an issue
--- a/lib/sqlalchemy/engine/default.py  Mon Mar 21 11:49:43 2011 -0400
+++ b/lib/sqlalchemy/engine/default.py  Tue Mar 22 15:53:49 2011 -0400
@@ -450,7 +450,7 @@
                         param.append(compiled_params[key](key))
                 parameters.append(dialect.execute_sequence_format(param))
         else:
-            encode = not dialect.supports_unicode_statements
+            encode = not dialect.supports_unicode_binds
             for compiled_params in self.compiled_parameters:
                 param = {}
                 if encode:

can be seen with the cx_oracle dialect using a foreign character col name. Need tests in test/sql/test_unicode that emit SELECT with a WHERE clause, generates binds, etc.

Comments (2)

  1. Mike Bayer reporter

    bzzt, unicode_binds refers to the values. statements refers to the string names of the bind params. the issues in #2100 were getting me mixed up.

  2. Log in to comment