summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/DB/Mysql.pm2
-rw-r--r--Bugzilla/DB/Schema.pm2
-rw-r--r--Bugzilla/DB/Schema/Mysql.pm2
-rw-r--r--Bugzilla/DB/Schema/Pg.pm2
4 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index ae158e0f6..ef983ce55 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -839,7 +839,7 @@ sub _fix_defaults {
sub _alter_db_charset_to_utf8 {
my $self = shift;
my $db_name = Bugzilla->localconfig->{db_name};
- $self->do("ALTER DATABASE $db_name CHARACTER SET utf8");
+ $self->do("ALTER DATABASE `$db_name` CHARACTER SET utf8");
}
sub bz_db_is_utf8 {
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index 0698585bb..d340cf03d 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -2205,7 +2205,7 @@ sub get_table_indexes_abstract {
sub get_create_database_sql {
my ($self, $name) = @_;
- return ("CREATE DATABASE $name");
+ return ("CREATE DATABASE \"$name\"");
}
sub get_table_ddl {
diff --git a/Bugzilla/DB/Schema/Mysql.pm b/Bugzilla/DB/Schema/Mysql.pm
index 0195fcb06..1dc408654 100644
--- a/Bugzilla/DB/Schema/Mysql.pm
+++ b/Bugzilla/DB/Schema/Mysql.pm
@@ -153,7 +153,7 @@ sub get_create_database_sql {
my $create_utf8 = Bugzilla->params->{'utf8'}
|| !defined Bugzilla->params->{'utf8'};
my $charset = $create_utf8 ? "CHARACTER SET utf8" : '';
- return ("CREATE DATABASE $name $charset");
+ return ("CREATE DATABASE `$name` $charset");
}
# MySQL has a simpler ALTER TABLE syntax than ANSI.
diff --git a/Bugzilla/DB/Schema/Pg.pm b/Bugzilla/DB/Schema/Pg.pm
index 55a932272..03a3b0a48 100644
--- a/Bugzilla/DB/Schema/Pg.pm
+++ b/Bugzilla/DB/Schema/Pg.pm
@@ -84,7 +84,7 @@ sub get_create_database_sql {
my $create_utf8 = Bugzilla->params->{'utf8'}
|| !defined Bugzilla->params->{'utf8'};
my $charset = $create_utf8 ? "ENCODING 'UTF8' TEMPLATE template0" : '';
- return ("CREATE DATABASE $name $charset");
+ return ("CREATE DATABASE \"$name\" $charset");
}
sub get_rename_column_ddl {