summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Mysql.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-15 00:30:39 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-15 00:30:39 +0200
commite6ea9c3931636f5ebfb7877da18af28b221cdc58 (patch)
tree83537fc05c09d7480aeea0c5e21aeaeeab4c4f63 /Bugzilla/DB/Mysql.pm
parent0fd1b7d50b118d6f1ddaebce987e9cbd9748efa7 (diff)
downloadbugzilla-e6ea9c3931636f5ebfb7877da18af28b221cdc58.tar.gz
bugzilla-e6ea9c3931636f5ebfb7877da18af28b221cdc58.tar.xz
Bug 578739: Instead of removing REFERENCES from _bz_real_schema and then
populating FKs from _bz_schema at the end of checksetup, store REFERENCES in _bz_real_schema with a special "created => 0" key that tells us that we still need to create the FK. r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'Bugzilla/DB/Mysql.pm')
-rw-r--r--Bugzilla/DB/Mysql.pm10
1 files changed, 3 insertions, 7 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index 66a261c75..699fcfdf6 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -721,7 +721,6 @@ EOT
print "Converting table storage format to UTF-8. This may take a",
" while.\n";
- my @dropped_fks;
foreach my $table ($self->bz_table_list_real) {
my $info_sth = $self->prepare("SHOW FULL COLUMNS FROM $table");
$info_sth->execute();
@@ -740,8 +739,9 @@ EOT
print "$table.$name needs to be converted to UTF-8...\n";
- my $dropped = $self->bz_drop_related_fks($table, $name);
- push(@dropped_fks, @$dropped);
+ # These will be automatically re-created at the end
+ # of checksetup.
+ $self->bz_drop_related_fks($table, $name);
my $col_info =
$self->bz_column_info_real($table, $name);
@@ -792,10 +792,6 @@ EOT
}
} # foreach my $table (@tables)
-
- foreach my $fk_args (@dropped_fks) {
- $self->bz_add_fk(@$fk_args);
- }
}
# Sometimes you can have a situation where all the tables are utf8,