Commit 43f21c73 authored by Jérome Perrin's avatar Jérome Perrin

stack/erp5: use utf8mb4_unicode_ci mariadb collation

parent 8a1f4101
...@@ -100,7 +100,7 @@ class TestMariaDB(MariaDBTestCase): ...@@ -100,7 +100,7 @@ class TestMariaDB(MariaDBTestCase):
cnx.store_result() cnx.store_result()
cnx.query( cnx.query(
""" """
insert into test_utf8_collation values ("à"), ("あ") insert into test_utf8_collation values ("à"), ("あ"), ("😀")
""") """)
cnx.store_result() cnx.store_result()
...@@ -110,6 +110,18 @@ class TestMariaDB(MariaDBTestCase): ...@@ -110,6 +110,18 @@ class TestMariaDB(MariaDBTestCase):
""") """)
self.assertEqual((('à',),), cnx.store_result().fetch_row(maxrows=2)) self.assertEqual((('à',),), cnx.store_result().fetch_row(maxrows=2))
cnx.query(
"""
select * from test_utf8_collation where col1 = "ア"
""")
self.assertEqual((('あ',),), cnx.store_result().fetch_row(maxrows=2))
cnx.query(
"""
select * from test_utf8_collation where col1 = "😀"
""")
self.assertEqual((('😀',),), cnx.store_result().fetch_row(maxrows=2))
class TestMroonga(MariaDBTestCase): class TestMroonga(MariaDBTestCase):
def test_mroonga_plugin_loaded(self): def test_mroonga_plugin_loaded(self):
......
...@@ -42,7 +42,7 @@ md5sum = d32417746fcf671d4e86a70379815039 ...@@ -42,7 +42,7 @@ md5sum = d32417746fcf671d4e86a70379815039
[template-my-cnf] [template-my-cnf]
filename = my.cnf.in filename = my.cnf.in
md5sum = 7944ec58a2c6ee74a56219bacebfd145 md5sum = afefa29c683b7a72aef90bb8b409302d
[template-mariadb-initial-setup] [template-mariadb-initial-setup]
filename = mariadb_initial_setup.sql.in filename = mariadb_initial_setup.sql.in
......
...@@ -68,7 +68,7 @@ server_id = {{ parameter_dict['server-id'] }} ...@@ -68,7 +68,7 @@ server_id = {{ parameter_dict['server-id'] }}
# Force utf8 usage # Force utf8 usage
character_set_server = utf8mb4 character_set_server = utf8mb4
collation_server = utf8mb4_general_ci collation_server = utf8mb4_unicode_ci
skip_character_set_client_handshake skip_character_set_client_handshake
{% if 'ssl-key' in parameter_dict -%} {% if 'ssl-key' in parameter_dict -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment