From: Dave Miller Date: Sat, 8 Jun 2024 18:18:30 +0000 (-0400) Subject: Bug 1898161: fix utf8-conversion on MySQL 8 (#136) X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ede41711604063895b42d142fff1899cfd35d024;p=thirdparty%2Fbugzilla.git Bug 1898161: fix utf8-conversion on MySQL 8 (#136) --- diff --git a/Bugzilla/DB/MariaDB.pm b/Bugzilla/DB/MariaDB.pm index ab3b8420a..3f99afd00 100644 --- a/Bugzilla/DB/MariaDB.pm +++ b/Bugzilla/DB/MariaDB.pm @@ -654,7 +654,7 @@ sub bz_setup_database { print "Converting table storage format to $charset (collate $collate). This may take a while.\n"; foreach my $table ($self->bz_table_list_real) { - my $info_sth = $self->prepare("SHOW FULL COLUMNS FROM $table"); + my $info_sth = $self->prepare("SHOW FULL COLUMNS FROM " . $self->quote_identifier($table)); $info_sth->execute(); my (@binary_sql, @utf8_sql); while (my $column = $info_sth->fetchrow_hashref) { diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index 5d744b0bd..1f3a03fd9 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -655,7 +655,7 @@ sub bz_setup_database { print "Converting table storage format to $charset (collate $collate). This may take a while.\n"; foreach my $table ($self->bz_table_list_real) { - my $info_sth = $self->prepare("SHOW FULL COLUMNS FROM $table"); + my $info_sth = $self->prepare("SHOW FULL COLUMNS FROM " . $self->quote_identifier($table)); $info_sth->execute(); my (@binary_sql, @utf8_sql); while (my $column = $info_sth->fetchrow_hashref) {