Commit 70e3b646 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Checkin fix for Bug 280633, which didn't work when the utf8 parameter was turned on.

parent 496a78f6
...@@ -53,6 +53,7 @@ our $_request_cache = {}; ...@@ -53,6 +53,7 @@ our $_request_cache = {};
use constant SHUTDOWNHTML_EXEMPT => [ use constant SHUTDOWNHTML_EXEMPT => [
'editparams.cgi', 'editparams.cgi',
'checksetup.pl', 'checksetup.pl',
'recode.pl',
]; ];
# Non-cgi scripts that should silently exit. # Non-cgi scripts that should silently exit.
......
...@@ -174,9 +174,17 @@ if (exists $switch{'overrides'}) { ...@@ -174,9 +174,17 @@ if (exists $switch{'overrides'}) {
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
# Make the database give us raw bytes. if ($dbh->isa('Bugzilla::DB::Mysql')) {
$dbh->do('SET character_set_results = NULL') # Get the actual current encoding of the DB.
if $dbh->isa('Bugzilla::DB::Mysql'); my $collation_data = $dbh->selectrow_arrayref(
"SHOW VARIABLES LIKE 'character_set_database'");
my $db_charset = $collation_data->[1];
# Set our connection encoding to *that* encoding, so that MySQL
# correctly accepts our changes.
$dbh->do("SET NAMES $db_charset");
# Make the database give us raw bytes.
$dbh->do('SET character_set_results = NULL')
}
$dbh->begin_work; $dbh->begin_work;
......
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