]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Revert "Bug 1497042 - Enclose table names in CREATE queries"
authorDylan William Hardison <dylan@hardison.net>
Sun, 7 Jul 2019 23:03:46 +0000 (19:03 -0400)
committerDylan William Hardison <dylan@hardison.net>
Sun, 7 Jul 2019 23:05:21 +0000 (19:05 -0400)
This reverts commit 62d5637a4c96abbcde6f308421d676a0336d8e25.

Bugzilla/DB/Schema/Mysql.pm

index 4c0d43523d3a8fdb5dd22c14abb24925c1c2777f..3c4e2dd5dc5d1bc168103cb263f9e960dc0729d9 100644 (file)
@@ -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);