8000 Merge branch 'issue/BUG34675508' into release/8.0.32 · mysql/mysql-connector-python@adbec22 · GitHub
[go: up one dir, main page]

Skip to content

Commit adbec22

Browse files
committed
Merge branch 'issue/BUG34675508' into release/8.0.32
Change-Id: I91af7ba9904fbfde5100794de92b65f9c79c66bb
2 parents 0681493 + 6171c91 commit adbec22

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ v8.0.32
1515
- WL#15036: Support for type hints
1616
- BUG#34710366: Django implementation does not pass unit tests
1717
- BUG#34689812: Fix datetime conversion when using prepared cursors
18+
- BUG#34675508: Character set 'utf8' unsupported in python mysql connector when using MariaDB
1819
- BUG#34556157: Kerberos authorization fails when using SSPI as security interface
1920
- BUG#34499578: MySQLCursor.executemany() fails to correctly identify BULK data loading ops
2021
- BUG#30089671: Fix decoding VARBINARY columns when using a prepared cursor

lib/mysql/connector/constants.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,9 @@ class CharacterSet(_Constants):
679679
name of the used character set or collation.
680680
"""
681681

682-
desc: List[Optional[Tuple[str, str, bool]]] = MYSQL_CHARACTER_SETS # type: ignore[assignment]
683-
mysql_version: Tuple[int, ...] = (8, 0)
682+
# Use LTS character set as default
683+
desc: List[Optional[Tuple[str, str, bool]]] = MYSQL_CHARACTER_SETS_57 # type: ignore[assignment]
684+
mysql_version: Tuple[int, ...] = (5, 7)
684685

685686
# Multi-byte character sets which use 5c (backslash) in characters
686687
slash_charsets: Tuple[int, ...] = (1, 13, 28, 84, 87, 88)
@@ -693,8 +694,8 @@ def set_mysql_version(cls, version: Tuple[int, ...]) -> None:
693694
version (tuple): MySQL version tuple.
694695
"""
695696
cls.mysql_version = version[:2]
696-
if cls.mysql_version == (5, 7):
697-
cls.desc = MYSQL_CHARACTER_SETS_57
697+
if cls.mysql_version == (8, 0):
698+
cls.desc = MYSQL_CHARACTER_SETS
698699

699700
@classmethod
700701
def get_info(cls, setid: int) -> Tuple[str, str]:

0 commit comments

Comments
 (0)
0