Bug 520363 - [Match BZ34 DB change]: Add column bugs.cf_issuetracker, Drop bug_cf_issuetracker table
Summary: [Match BZ34 DB change]: Add column bugs.cf_issuetracker, Drop bug_cf_issuetra...
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Red Hat
Component: Hardware Catalog
Version: 5.3
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: XINSUN
QA Contact:
Depends On:
Blocks: 520358
TreeView+ depends on / blocked
Reported: 2009-08-31 07:13 UTC by XINSUN
Modified: 2009-09-30 02:50 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-09-30 02:50:59 UTC

Attachments (Terms of Use)

Description XINSUN 2009-08-31 07:13:48 UTC
Description of problem:

DB change:    Add column bugs.cf_issuetracker, Drop bug_cf_issuetracker table:
Incidence:    (grep bug_cf_issuetracker * -r -C4)
     Bugzilla/IssueTrackerList.pm-sub _fromDB {
     Bugzilla/IssueTrackerList.pm-    my ($field1, $field2, $id) = @_;
     Bugzilla/IssueTrackerList.pm-    my $result = [];
     Bugzilla/IssueTrackerList.pm-    &::SendSQL(
     Bugzilla/IssueTrackerList.pm:        "SELECT $field1 FROM bug_cf_issuetracker WHERE $field2 = ". &::SqlQuote($id)
     Bugzilla/IssueTrackerList.pm-    );
     Bugzilla/IssueTrackerList.pm-    while (&::MoreSQLData) {
     Bugzilla/IssueTrackerList.pm-        push @$result, &::FetchOneColumn();
     Bugzilla/IssueTrackerList.pm-    }

     Analysis: Above lines is used to query issuetrack info which will be shown in summary section of catalog. This should be modified as query from bugs.cf_issuetracker not from bug_cf_issutracker table anymore when bz3.4 push

     process.cgi-    Bugzilla::DB::LockTables(
     process.cgi-            "LOCK TABLES bugs $write, bugs_activity $write, cc $write, " .
     process.cgi-            "cc AS selectVisible_cc $write, " .
     process.cgi-            "profiles $write, dependencies $write, votes $write, " .
     process.cgi:            "products READ, components READ, bz_it_map $write, bug_cf_issuetracker READ, " .
     process.cgi-            "keywords $write, longdescs $write, bugs_fulltext $write, fielddefs $write, " .
     process.cgi-            "bug_group_map $write, flags $write, duplicates $write," .
     process.cgi-            # user_group_map would be a READ lock except that Flag::process
     process.cgi-            # may call Flag::notify, which creates a new user object,
     Analysis: bug_cf_issuetracker table will not exist anymore when bz3.4 push. so will failed to lock a missing table

Comment 1 David Lawrence 2009-08-31 22:18:16 UTC
I am not sure that this bug is valid. bug_cf_issuetracker is not going away for 3.4 and should still be used after the upgrade. bug_cf_issuetracker is a separate multiple select value table where bugs.cf_issuetracker would only allow one value. So we will still need to have the separate table.

Please get with Tony to see what is wrong with the schema diff if it is showing this table as being removed.


Note You need to log in before you can comment on or make changes to this bug.