Skip to content

Commit 0c8ad0b

Browse files
authored
fix(ibis): Enforcing MySQL utf8mb4 charset in connections (#1091)
1 parent e233981 commit 0c8ad0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ibis-server/app/model/data_source.py

+4
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ def get_mssql_connection(cls, info: MSSqlConnectionInfo) -> BaseBackend:
154154
def get_mysql_connection(cls, info: MySqlConnectionInfo) -> BaseBackend:
155155
ssl_context = cls._create_ssl_context(info)
156156
kwargs = {"ssl": ssl_context} if ssl_context else {}
157+
158+
# utf8mb4 is the actual charset used by MySQL for utf8
159+
kwargs.setdefault("charset", "utf8mb4")
160+
157161
if info.kwargs:
158162
kwargs.update(info.kwargs)
159163
return ibis.mysql.connect(

0 commit comments

Comments
 (0)