Explicitly enable utf8 on jdbc connection url

Testing on review-dev has shown that newer gerrit won't support utf8
properly unless we explicitly enable utf8 on the mysql jdbc string.
Without this non ascii characters get entered into the db as literal
"?". Go ahead and add explicit utf8 parameters to the database url in
this change.

Note that this should be safe on older gerrit too as gerrit should
ignore any config options it doesn't know about.

Change-Id: Ib097f93951904951a285ec40a21096988fb13562
This commit is contained in:
Clark Boylan 2017-07-25 10:50:51 -07:00
parent a52cab89f3
commit 73fa243422
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@
hostname = <%= @mysql_host %>
database = reviewdb
username = gerrit2
url = jdbc:mysql://<%= @mysql_host %>/reviewdb?characterSetResults=utf8&characterEncoding=utf8&connectionCollation=utf8_bin&useUnicode=yes
<% if @database_poollimit != "" -%>
poolLimit = <%= @database_poollimit %>
<% end -%>