mysql: explicitly use utf8mb3
this fixes mysql v8.x. in mysql 8.0+ utf8mb3 is deprecated and utf8 alias doesn't work. Change-Id: I548eb43a3d5adbd84957b6b92d4b172bfdfb80a8
This commit is contained in:
parent
7a6666f4f3
commit
3ba1f0d955
@ -1,8 +1,8 @@
|
||||
{
|
||||
"databases": [
|
||||
{
|
||||
"character_set": "utf8",
|
||||
"collate": "utf8_general_ci",
|
||||
"character_set": "utf8mb3",
|
||||
"collate": "utf8mb3_general_ci",
|
||||
"name": "databaseA"
|
||||
},
|
||||
{
|
||||
|
@ -10,8 +10,8 @@
|
||||
},
|
||||
"databases": [
|
||||
{
|
||||
"character_set": "utf8",
|
||||
"collate": "utf8_general_ci",
|
||||
"character_set": "utf8mb3",
|
||||
"collate": "utf8mb3_general_ci",
|
||||
"name": "sampledb"
|
||||
},
|
||||
{
|
||||
|
2
releasenotes/notes/mysql8-6a81a8498ee2c229.yaml
Normal file
2
releasenotes/notes/mysql8-6a81a8498ee2c229.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
fixes:
|
||||
- explicitly specify utf8mb3 as character set for mysql
|
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user