summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/provision.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-01-13 18:15:52 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2019-01-15 10:04:09 -0500
commitc0e6ebd70b04c7941b7750c77cd4329b043679f8 (patch)
treee109d1fc5a7fb3db2f26525a8e66d14e00f7c7e5 /lib/sqlalchemy/testing/provision.py
parentb229a50c7786d8cbe65a2bf471b57a806f4259e3 (diff)
downloadsqlalchemy-c0e6ebd70b04c7941b7750c77cd4329b043679f8.tar.gz
Render N'' for SQL Server unicode literals
The ``literal_processor`` for the :class:`.Unicode` and :class:`.UnicodeText` datatypes now render an ``N`` character in front of the literal string expression as required by SQL Server for Unicode string values rendered in SQL expressions. Note that this adds full unicode characters to the standard test suite, which means we also need to bump MySQL provisioning up to utf8mb4. Modern installs do not seem to be reproducing the 1271 issue locally, if it reproduces in CI it would be better for us to skip those ORM-centric tests for MySQL. Also remove unused _StringType from SQL Server dialect Fixes: #4442 Change-Id: Id55817b3e8a2d81ddc8b7b27f85e3f1dcc1cea7e
Diffstat (limited to 'lib/sqlalchemy/testing/provision.py')
-rw-r--r--lib/sqlalchemy/testing/provision.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py
index 88dc28528..70ace0511 100644
--- a/lib/sqlalchemy/testing/provision.py
+++ b/lib/sqlalchemy/testing/provision.py
@@ -207,15 +207,12 @@ def _mysql_create_db(cfg, eng, ident):
except Exception:
pass
- # using utf8mb4 we are getting collation errors on UNIONS:
- # test/orm/inheritance/test_polymorphic_rel.py"
- # 1271, u"Illegal mix of collations for operation 'UNION'"
- conn.execute("CREATE DATABASE %s CHARACTER SET utf8mb3" % ident)
+ conn.execute("CREATE DATABASE %s CHARACTER SET utf8mb4" % ident)
conn.execute(
- "CREATE DATABASE %s_test_schema CHARACTER SET utf8mb3" % ident
+ "CREATE DATABASE %s_test_schema CHARACTER SET utf8mb4" % ident
)
conn.execute(
- "CREATE DATABASE %s_test_schema_2 CHARACTER SET utf8mb3" % ident
+ "CREATE DATABASE %s_test_schema_2 CHARACTER SET utf8mb4" % ident
)