Skip to content

Commit

Permalink
utf8 => utf8mb4.
Browse files Browse the repository at this point in the history
  • Loading branch information
prwater committed May 13, 2024
1 parent d133a2d commit 1f91f4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pystratum_mysql/backend/MySqlRoutineLoaderWorker.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ def _read_configuration_file(self) -> None:
"""
CommonRoutineLoaderWorker._read_configuration_file(self)

self._character_set_client = self._config.get('database', 'character_set_client', fallback='utf-8')
self._collation_connection = self._config.get('database', 'collation_connection', fallback='utf8_general_ci')
self._character_set_client = self._config.get('database', 'character_set_client', fallback='utf8mb4')
self._collation_connection = self._config.get('database', 'collation_connection', fallback='utf8mb4_general_ci')
self._sql_mode = self._config.get('database', 'sql_mode')

# ----------------------------------------------------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions pystratum_mysql/backend/MySqlWorker.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def __read_configuration_file(self) -> Dict[str, Union[str, int]]:
'password': self.__get_option(self._config, 'database', 'password'),
'database': self.__get_option(self._config, 'database', 'database'),
'port': int(self.__get_option(self._config, 'database', 'port', fallback='3306')),
'charset': self.__get_option(self._config, 'database', 'character_set_client', fallback='utf-8'),
'charset': self.__get_option(self._config, 'database', 'character_set_client', fallback='utf8mb4'),
'collation': self.__get_option(self._config, 'database', 'collation_connection',
fallback='utf8_general_ci'),
fallback='utf8mb4_general_ci'),
'sql_mode': self.__get_option(self._config, 'database', 'sql_mode')
}

Expand Down
4 changes: 2 additions & 2 deletions test/etc/stratum.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ backend = pystratum_mysql.backend.MySqlBackend.MySqlBackend
[database]
rdbms = mysql
supplement = credentials.cfg
character_set_client = utf8
collation_connection = utf8_general_ci
character_set_client = utf8mb4
collation_connection = utf8mb4_general_ci
sql_mode = STRICT_ALL_TABLES

[constants]
Expand Down

0 comments on commit 1f91f4f

Please sign in to comment.