]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1898161: fix utf8-conversion on MySQL 8 (#136)
authorDave Miller <justdave@bugzilla.org>
Sat, 8 Jun 2024 18:18:30 +0000 (14:18 -0400)
committerGitHub <noreply@github.com>
Sat, 8 Jun 2024 18:18:30 +0000 (14:18 -0400)
Bugzilla/DB/MariaDB.pm
Bugzilla/DB/Mysql.pm

index ab3b8420ae3a8df1662fd3bb016f69036a040e69..3f99afd001418e10617bbb5d66376cf1fbf1fc24 100644 (file)
@@ -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) {
index 5d744b0bd8d43d620ae78be433dea1f9f2ad1f52..1f3a03fd920c744f7cddcb2f90c81ea90baf82d5 100644 (file)
@@ -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) {