From: Dylan William Hardison Date: Sun, 7 Jul 2019 23:03:46 +0000 (-0400) Subject: Revert "Bug 1497042 - Enclose table names in CREATE queries" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1349edb7b40f78d944695179638155d2c16bf294;p=thirdparty%2Fbugzilla.git Revert "Bug 1497042 - Enclose table names in CREATE queries" This reverts commit 62d5637a4c96abbcde6f308421d676a0336d8e25. --- diff --git a/Bugzilla/DB/Schema/Mysql.pm b/Bugzilla/DB/Schema/Mysql.pm index 4c0d43523d..3c4e2dd5dc 100644 --- a/Bugzilla/DB/Schema/Mysql.pm +++ b/Bugzilla/DB/Schema/Mysql.pm @@ -135,12 +135,8 @@ sub _get_create_table_ddl { my $charset = Bugzilla->dbh->bz_db_is_utf8 ? "CHARACTER SET utf8" : ''; my $type = grep($_ eq $table, MYISAM_TABLES) ? 'MYISAM' : 'InnoDB'; - - my $ddl = $self->SUPER::_get_create_table_ddl($table); - $ddl =~ s/CREATE TABLE (.*) \(/CREATE TABLE `$1` (/; - $ddl .= " ENGINE = $type $charset"; - - return $ddl; + return ( + $self->SUPER::_get_create_table_ddl($table) . " ENGINE = $type $charset"); } #eosub--_get_create_table_ddl @@ -155,7 +151,7 @@ sub _get_create_index_ddl { my $sql = "CREATE "; $sql .= "$index_type " if ($index_type eq 'UNIQUE' || $index_type eq 'FULLTEXT'); - $sql .= "INDEX \`$index_name\` ON \`$table_name\` \(" + $sql .= "INDEX \`$index_name\` ON $table_name \(" . join(", ", @$index_fields) . "\)"; return ($sql);