]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 437369: Deleting a bug doesn't remove related data from the bugs_fulltext table...
authorlpsolit%gmail.com <>
Sat, 7 Jun 2008 18:56:39 +0000 (18:56 +0000)
committerlpsolit%gmail.com <>
Sat, 7 Jun 2008 18:56:39 +0000 (18:56 +0000)
Bugzilla/Bug.pm [changed mode: 0755->0644]
sanitycheck.cgi

old mode 100755 (executable)
new mode 100644 (file)
index 736afbc..ec603e2
@@ -770,6 +770,7 @@ sub remove_from_db {
     # - bug_group_map
     # - bugs
     # - bugs_activity
+    # - bugs_fulltext
     # - cc
     # - dependencies
     # - duplicates
@@ -811,6 +812,9 @@ sub remove_from_db {
 
     $dbh->bz_commit_transaction();
 
+    # The bugs_fulltext table doesn't support transactions.
+    $dbh->do("DELETE FROM bugs_fulltext WHERE bug_id = ?", undef, $bug_id);
+
     # Now this bug no longer exists
     $self->DESTROY;
     return $self;
index 1332f75edd189076dac58cfd84c137487a5f2838..237eaab38218e307514664d0866c1d9db35cfe6e 100755 (executable)
@@ -272,7 +272,8 @@ if ($cgi->param('remove_invalid_bug_references')) {
 
     $dbh->bz_start_transaction();
 
-    foreach my $pair ('attachments/', 'bug_group_map/', 'bugs_activity/', 'cc/',
+    foreach my $pair ('attachments/', 'bug_group_map/', 'bugs_activity/',
+                      'bugs_fulltext/', 'cc/',
                       'dependencies/blocked', 'dependencies/dependson',
                       'duplicates/dupe', 'duplicates/dupe_of',
                       'flags/', 'keywords/', 'longdescs/', 'votes/') {
@@ -408,6 +409,7 @@ CrossCheck("flagtypes", "id",
 CrossCheck("bugs", "bug_id",
            ["bugs_activity", "bug_id"],
            ["bug_group_map", "bug_id"],
+           ["bugs_fulltext", "bug_id"],
            ["attachments", "bug_id"],
            ["cc", "bug_id"],
            ["longdescs", "bug_id"],