summaryrefslogtreecommitdiff
path: root/test/dialect/mysql/test_reflection.py
diff options
context:
space:
mode:
authorGeorg Richter <georg@mariadb.com>2021-09-30 18:13:49 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-10-01 13:08:00 -0400
commit2e6285d8d1d293c841f18313c94e493b2804055c (patch)
treef93f19a00e16e2a0d62cf43d06909433637509d7 /test/dialect/mysql/test_reflection.py
parentab6605aee23ed2c70c38bd5b9f50a6395ac3f2e1 (diff)
downloadsqlalchemy-2e6285d8d1d293c841f18313c94e493b2804055c.tar.gz
correct charset for mariadb connector with mdb 10.6
Updated test suite to pass correctly for MariaDB 10.6 when using the mariadb-connector driver, which made some adjustments to default encoding. Pull request courtesy Georg Richter. Use character set utf8mb4 instead of utf8: 1) Character set for mariadb connector is utf8mb4 and cannot be changed. 2) Since MariaDB 10.6.1 utf8 is mapped to utf8mb3, and will be mapped to utf8mb4 in 10.7, see [MDEV-8334](https://jira.mariadb.org/browse/MDEV-8334) (rename utf8 to utf8mb3) utf8mb4 character set support was added 12 years ago and will work with all non eoled MariaDB server versions. Fixes: #7115 Closes: #7116 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7116 Pull-request-sha: 79516ccce2dead11e6658596c9ad400b964d24c9 Change-Id: I86c30fb636c46307cb551080641e324d2bbc1cb3
Diffstat (limited to 'test/dialect/mysql/test_reflection.py')
-rw-r--r--test/dialect/mysql/test_reflection.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/dialect/mysql/test_reflection.py b/test/dialect/mysql/test_reflection.py
index 3091a6a7d..60d7e3a5d 100644
--- a/test/dialect/mysql/test_reflection.py
+++ b/test/dialect/mysql/test_reflection.py
@@ -307,7 +307,7 @@ class ReflectionTest(fixtures.TestBase, AssertsCompiledSQL):
if testing.against("mariadb"):
kwargs = dict(
mariadb_engine="MEMORY",
- mariadb_default_charset="utf8",
+ mariadb_default_charset="utf8mb4",
mariadb_auto_increment="5",
mariadb_avg_row_length="3",
mariadb_password="secret",
@@ -338,7 +338,7 @@ class ReflectionTest(fixtures.TestBase, AssertsCompiledSQL):
if testing.against("mariadb"):
assert def_table.kwargs["mariadb_engine"] == "MEMORY"
assert def_table.comment == comment
- assert def_table.kwargs["mariadb_default_charset"] == "utf8"
+ assert def_table.kwargs["mariadb_default_charset"] == "utf8mb4"
assert def_table.kwargs["mariadb_auto_increment"] == "5"
assert def_table.kwargs["mariadb_avg_row_length"] == "3"
assert def_table.kwargs["mariadb_password"] == "secret"
@@ -348,7 +348,7 @@ class ReflectionTest(fixtures.TestBase, AssertsCompiledSQL):
assert reflected.comment == comment
assert reflected.kwargs["mariadb_comment"] == comment
- assert reflected.kwargs["mariadb_default charset"] == "utf8"
+ assert reflected.kwargs["mariadb_default charset"] == "utf8mb4"
assert reflected.kwargs["mariadb_avg_row_length"] == "3"
assert reflected.kwargs["mariadb_connection"] == "fish"