From 73fa2434222cf755e207fb4dea73fa2063b88547 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 25 Jul 2017 10:50:51 -0700 Subject: [PATCH] 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 --- templates/gerrit.config.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/gerrit.config.erb b/templates/gerrit.config.erb index 21a862c..b19987b 100644 --- a/templates/gerrit.config.erb +++ b/templates/gerrit.config.erb @@ -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 -%>