Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
8ef93208
Commit
8ef93208
authored
Jul 02, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 289042: Implicit joins should be replaced by explicit joins - installment B
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, r=joel, a=justdave
parent
8f788c28
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
19 deletions
+25
-19
Bug.pm
Bugzilla/Bug.pm
+10
-6
Flag.pm
Bugzilla/Flag.pm
+12
-10
FlagType.pm
Bugzilla/FlagType.pm
+3
-3
No files found.
Bugzilla/Bug.pm
View file @
8ef93208
...
@@ -163,12 +163,16 @@ sub initBug {
...
@@ -163,12 +163,16 @@ sub initBug {
reporter_accessible, cclist_accessible,
reporter_accessible, cclist_accessible,
estimated_time, remaining_time, "
.
estimated_time, remaining_time, "
.
$dbh
->
sql_date_format
(
'deadline'
,
'%Y-%m-%d'
)
.
"
$dbh
->
sql_date_format
(
'deadline'
,
'%Y-%m-%d'
)
.
"
FROM bugs LEFT JOIN votes using(bug_id),
FROM bugs
classifications, products, components
LEFT JOIN votes
WHERE bugs.bug_id = ?
USING (bug_id)
AND classifications.id = products.classification_id
INNER JOIN components
AND products.id = bugs.product_id
ON components.id = bugs.component_id
AND components.id = bugs.component_id "
.
INNER JOIN products
ON products.id = bugs.product_id
INNER JOIN classifications
ON classifications.id = products.classification_id
WHERE bugs.bug_id = ? "
.
$dbh
->
sql_group_by
(
'bugs.bug_id'
,
'alias, products.classification_id,
$dbh
->
sql_group_by
(
'bugs.bug_id'
,
'alias, products.classification_id,
classifications.name, bugs.product_id, products.name, version,
classifications.name, bugs.product_id, products.name, version,
rep_platform, op_sys, bug_status, resolution, priority,
rep_platform, op_sys, bug_status, resolution, priority,
...
...
Bugzilla/Flag.pm
View file @
8ef93208
...
@@ -112,9 +112,9 @@ my @base_columns =
...
@@ -112,9 +112,9 @@ my @base_columns =
Which database(s) is the data coming from?
Which database(s) is the data coming from?
Note: when adding tables to @base_tables, make sure to include the separator
Note: when adding tables to @base_tables, make sure to include the separator
(i.e.
a comma or words like "LEFT OUTER JOIN") before the table name,
(i.e.
words like "LEFT OUTER JOIN") before the table name, since tables take
since tables take multiple separators based on the join type, and therefore
multiple separators based on the join type, and therefore it is not possible
it is not possible
to join them later using a single known separator.
to join them later using a single known separator.
B<Used by get, match, sqlify_criteria and perlify_record>
B<Used by get, match, sqlify_criteria and perlify_record>
=back
=back
...
@@ -400,14 +400,16 @@ sub process {
...
@@ -400,14 +400,16 @@ sub process {
# no longer valid.
# no longer valid.
my
$flag_ids
=
$dbh
->
selectcol_arrayref
(
my
$flag_ids
=
$dbh
->
selectcol_arrayref
(
"SELECT flags.id
"SELECT flags.id
FROM (flags INNER JOIN bugs ON flags.bug_id = bugs.bug_id)
FROM flags
LEFT OUTER JOIN flaginclusions i
INNER JOIN bugs
ON (flags.type_id = i.type_id
ON flags.bug_id = bugs.bug_id
LEFT JOIN flaginclusions AS i
ON flags.type_id = i.type_id
AND (bugs.product_id = i.product_id OR i.product_id IS NULL)
AND (bugs.product_id = i.product_id OR i.product_id IS NULL)
AND (bugs.component_id = i.component_id OR i.component_id IS NULL)
)
AND (bugs.component_id = i.component_id OR i.component_id IS NULL)
WHERE bugs.bug_id = ?
WHERE bugs.bug_id = ?
AND flags.is_active = 1
AND flags.is_active = 1
AND i.type_id IS NULL"
,
AND i.type_id IS NULL"
,
undef
,
$bug_id
);
undef
,
$bug_id
);
foreach
my
$flag_id
(
@$flag_ids
)
{
clear
(
$flag_id
)
}
foreach
my
$flag_id
(
@$flag_ids
)
{
clear
(
$flag_id
)
}
...
...
Bugzilla/FlagType.pm
View file @
8ef93208
...
@@ -101,9 +101,9 @@ my @base_columns =
...
@@ -101,9 +101,9 @@ my @base_columns =
Which database(s) is the data coming from?
Which database(s) is the data coming from?
Note: when adding tables to @base_tables, make sure to include the separator
Note: when adding tables to @base_tables, make sure to include the separator
(i.e.
a comma or words like C<LEFT OUTER JOIN>) before the table name,
(i.e.
words like "LEFT OUTER JOIN") before the table name, since tables take
since tables take multiple separators based on the join type, and therefore
multiple separators based on the join type, and therefore it is not possible
it is not possible
to join them later using a single known separator.
to join them later using a single known separator.
B<Used by get, match, sqlify_criteria and perlify_record>
B<Used by get, match, sqlify_criteria and perlify_record>
=back
=back
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment