summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-04-15 07:42:22 +0200
committermkanat%kerio.com <>2005-04-15 07:42:22 +0200
commitd172c9db58a3517ef139831ff7a5508fb008da35 (patch)
tree05f8e4831548a7d9a0f2e9de8d3f53742890393a /Bugzilla/DB
parentc48fd6c4d71411630ccdea80ea848fe53edd37cb (diff)
downloadbugzilla-d172c9db58a3517ef139831ff7a5508fb008da35.tar.gz
bugzilla-d172c9db58a3517ef139831ff7a5508fb008da35.tar.xz
Bug 289999: $bad_names hash in index-renaming code throws an "odd number of elements" warning
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=glob, a=myk
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Mysql.pm20
1 files changed, 10 insertions, 10 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index d80b1bbbb..c1fd52844 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -278,15 +278,15 @@ 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',
- 'bugs_activity_bugwhen_idx'),
- longdescs => ('longdescs_bugid_idx',
- 'longdescs_bugwhen_idx'),
- flags => ('flags_bidattid_idx'),
- flaginclusions => ('flaginclusions_tpcid_idx'),
- flagexclusions => ('flagexclusions_tpc_id_idx'),
- profiles_activity => ('profiles_activity_when_idx'),
- group_control_map => ('group_control_map_gid_idx')
+ bugs_activity => ['bugs_activity_bugid_idx',
+ 'bugs_activity_bugwhen_idx'],
+ longdescs => ['longdescs_bugid_idx',
+ 'longdescs_bugwhen_idx'],
+ flags => ['flags_bidattid_idx'],
+ flaginclusions => ['flaginclusions_tpcid_idx'],
+ flagexclusions => ['flagexclusions_tpc_id_idx'],
+ profiles_activity => ['profiles_activity_when_idx'],
+ group_control_map => ['group_control_map_gid_idx']
# series_categories is dealt with below, not here.
};
@@ -346,7 +346,7 @@ sub bz_setup_database {
push(@columns, "${table}_unique_idx");
}
# And this is how we fix the other inconsistent Schema naming.
- push(@columns, $bad_names->{$table})
+ push(@columns, @{$bad_names->{$table}})
if (exists $bad_names->{$table});
foreach my $column (@columns) {
# If we have an index named after this column, it's an