Merge "mysql: explicitly use utf8mb3"

This commit is contained in:
Zuul 2023-07-04 04:56:11 +00:00 committed by Gerrit Code Review
commit 17af8eab8c
6 changed files with 12 additions and 8 deletions

View File

@ -1,8 +1,8 @@
{
"databases": [
{
"character_set": "utf8",
"collate": "utf8_general_ci",
"character_set": "utf8mb3",
"collate": "utf8mb3_general_ci",
"name": "databaseA"
},
{

View File

@ -10,8 +10,8 @@
},
"databases": [
{
"character_set": "utf8",
"collate": "utf8_general_ci",
"character_set": "utf8mb3",
"collate": "utf8mb3_general_ci",
"name": "sampledb"
},
{

View File

@ -0,0 +1,2 @@
fixes:
- explicitly specify utf8mb3 as character set for mysql

View File

@ -79,6 +79,7 @@ charset = {"big5": ["big5_chinese_ci", "big5_bin"],
"utf8_general_mysql500_ci"
],
"utf8mb4": ["utf8mb4_0900_ai_ci"],
"utf8mb3": ["utf8mb3_general_ci"],
"ucs2": ["ucs2_general_ci",
"ucs2_bin",
"ucs2_unicode_ci",
@ -268,6 +269,7 @@ collation = {"big5_chinese_ci": "big5",
"armscii8_general_ci": "armscii8",
"armscii8_bin": "armscii8",
"utf8_general_ci": "utf8",
"utf8mb3_general_ci": "utf8mb3",
"utf8_bin": "utf8",
"utf8_unicode_ci": "utf8",
"utf8_icelandic_ci": "utf8",

View File

@ -29,8 +29,8 @@ class MySQLSchema(models.DatastoreSchema):
"""Represents a MySQL database and its properties."""
# Defaults
__charset__ = "utf8"
__collation__ = "utf8_general_ci"
__charset__ = "utf8mb3"
__collation__ = "utf8mb3_general_ci"
dbname = re.compile(r"^[A-Za-z0-9_-]+[\s\?\#\@]*[A-Za-z0-9_-]+$")
# Complete list of acceptable values

View File

@ -1093,8 +1093,8 @@ class TestInstanceMgmtInfo(object):
'databases': [
{
'name': 'db2',
'character_set': 'utf8',
'collate': 'utf8_general_ci',
'character_set': 'utf8mb3',
'collate': 'utf8mb3_general_ci',
},
{
'name': 'firstdb',