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
184130db
Commit
184130db
authored
Jul 06, 2004
by
jocuri%softhome.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch for bug 249798: improve SQL capitalization in sanitycheck.cgi; r=joel, a=justdave.
parent
207f5584
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
sanitycheck.cgi
sanitycheck.cgi
+7
-7
No files found.
sanitycheck.cgi
View file @
184130db
...
...
@@ -97,18 +97,18 @@ PutHeader("Bugzilla Sanity Check");
if
(
defined
$cgi
->
param
(
'rebuildvotecache'
))
{
Status
(
"OK, now rebuilding vote cache."
);
SendSQL
(
"
lock tables bugs write, votes read
"
);
SendSQL
(
"
update bugs set votes = 0, delta_ts=
delta_ts"
);
SendSQL
(
"
select bug_id, sum(vote_count) from votes group by
bug_id"
);
SendSQL
(
"
LOCK TABLES bugs WRITE, votes READ
"
);
SendSQL
(
"
UPDATE bugs SET votes = 0, delta_ts =
delta_ts"
);
SendSQL
(
"
SELECT bug_id, SUM(vote_count) FROM votes GROUP BY
bug_id"
);
my
%
votes
;
while
(
@row
=
FetchSQLData
())
{
my
(
$id
,
$v
)
=
(
@row
);
$votes
{
$id
}
=
$v
;
}
foreach
my
$id
(
keys
%
votes
)
{
SendSQL
(
"
update bugs set votes = $votes{$id}, delta_ts=delta_ts where
bug_id = $id"
);
SendSQL
(
"
UPDATE bugs SET votes = $votes{$id}, delta_ts = delta_ts WHERE
bug_id = $id"
);
}
SendSQL
(
"
unlock tables
"
);
SendSQL
(
"
UNLOCK TABLES
"
);
Status
(
"Vote cache has been rebuilt."
);
}
...
...
@@ -436,7 +436,7 @@ sub AlertBadVoteCache {
$offervotecacherebuild
=
1
;
}
SendSQL
(
"SELECT bug_id,
votes,
keywords FROM bugs "
.
SendSQL
(
"SELECT bug_id,
votes,
keywords FROM bugs "
.
"WHERE votes != 0 OR keywords != ''"
);
my
%
votes
;
...
...
@@ -454,7 +454,7 @@ while (@row = FetchSQLData()) {
}
Status
(
"Checking cached vote counts"
);
SendSQL
(
"
select bug_id, sum(vote_count) from votes group by
bug_id"
);
SendSQL
(
"
SELECT bug_id, SUM(vote_count) FROM votes GROUP BY
bug_id"
);
while
(
@row
=
FetchSQLData
())
{
my
(
$id
,
$v
)
=
(
@row
);
...
...
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