summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-04-15 07:49:25 +0200
committermkanat%kerio.com <>2005-04-15 07:49:25 +0200
commit6b2e132ec32b657e8f806eedc4d9f06fc66131ef (patch)
tree64dfb3e32fc228c26b5ba55774f9b84937200de2
parentd172c9db58a3517ef139831ff7a5508fb008da35 (diff)
downloadbugzilla-6b2e132ec32b657e8f806eedc4d9f06fc66131ef.tar.gz
bugzilla-6b2e132ec32b657e8f806eedc4d9f06fc66131ef.tar.xz
Bug 78276: change name of "when" index on bugs_activity.bug_when column
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=myk, a=myk
-rw-r--r--Bugzilla/DB/Mysql.pm3
-rw-r--r--Bugzilla/DB/Schema/Mysql.pm4
2 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index c1fd52844..e0918a22a 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -278,7 +278,8 @@ sub bz_setup_database {
# to a standard. We store those names here, so that they
# can be properly renamed.
my $bad_names = {
- bugs_activity => ['bugs_activity_bugid_idx',
+ # 'when' is a possible leftover from Bugzillas before 2.8
+ bugs_activity => ['when', 'bugs_activity_bugid_idx',
'bugs_activity_bugwhen_idx'],
longdescs => ['longdescs_bugid_idx',
'longdescs_bugwhen_idx'],
diff --git a/Bugzilla/DB/Schema/Mysql.pm b/Bugzilla/DB/Schema/Mysql.pm
index 07d7036e4..cc30246cc 100644
--- a/Bugzilla/DB/Schema/Mysql.pm
+++ b/Bugzilla/DB/Schema/Mysql.pm
@@ -90,7 +90,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);
@@ -107,7 +107,7 @@ sub get_alter_column_ddl {
sub get_drop_index_ddl {
my ($self, $table, $name) = @_;
- return ("DROP INDEX $name ON $table");
+ return ("DROP INDEX \`$name\` ON $table");
}
sub get_rename_column_ddl {