summaryrefslogtreecommitdiffstats
path: root/heartbeat.cgi
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-07-13 00:20:25 +0200
committerGitHub <noreply@github.com>2018-07-13 00:20:25 +0200
commita671f4ebe0f80686d9d98d51c754a07f4bb68d31 (patch)
treeddec19fe13f75475c2c7c86b212134a93f6d33ad /heartbeat.cgi
parente671c6b2bd6ef20f357ed710377258a730e268a3 (diff)
downloadbugzilla-a671f4ebe0f80686d9d98d51c754a07f4bb68d31.tar.gz
bugzilla-a671f4ebe0f80686d9d98d51c754a07f4bb68d31.tar.xz
Bug 1328659 - Add support for utf8=utf8mb4 (switches to dynamic/compressed row format, and changes charset to utf8mb4)
Diffstat (limited to 'heartbeat.cgi')
-rwxr-xr-xheartbeat.cgi9
1 files changed, 9 insertions, 0 deletions
diff --git a/heartbeat.cgi b/heartbeat.cgi
index 0597f1e3a..3edbed371 100755
--- a/heartbeat.cgi
+++ b/heartbeat.cgi
@@ -30,6 +30,15 @@ my $ok = eval {
die "database not available" unless $database_ok;
die "memcached server(s) not available" unless $memcached_ok;
die "mod_perl not configured?" unless $ENV{MOD_PERL};
+ if ($dbh->isa('Bugzilla::DB::Mysql') && Bugzilla->params->{utf8} eq 'utf8mb4') {
+ my $mysql_var = $dbh->selectall_hashref(q{SHOW VARIABLES LIKE 'character_set%'}, 'Variable_name');
+ foreach my $name (qw( character_set_client character_set_connection character_set_database )) {
+ my $value = $mysql_var->{$name}{Value};
+ if ($value ne 'utf8mb4') {
+ die "Expected MySQL variable '$name' to be 'utf8mb4', found '$value'";
+ }
+ }
+ }
1;
};
FATAL("heartbeat error: $@") if !$ok && $@;