Closed
Bug 186173
Opened 22 years ago
Closed 22 years ago
attachment.cgi must LOCK groups
Categories
(Bugzilla :: Attachments & Requests, defect, P1)
Tracking
()
RESOLVED
INVALID
People
(Reporter: bugreport, Assigned: bugreport)
Details
Since attachment.cgi needs to check group permissions for users that may require
a rederive, it needs to LOCK groups at the same time it locks everything else.
In fixing this, watch for nested locks!!!
| Assignee | ||
Comment 1•22 years ago
|
||
OK... fundamental bbaetz question....
Functions that need to lock tables will be called from within other functions
that lock tables.
The simplest thing to do would be to have the enclosing LOCK include all the
locks needed for enclosed functions and then have a global lock_counter. So, I
replace...
LOCK whatever
with
if ($::lockcount == 0) {
LOCK whatever
$::lockcount = 1;
} else {
$::lockcount++;
}
and replace
UNLOCK TABLES
with
if ($::lockcount == 1) {
UNLOCK TABLES
$::lockcount = 0;
} else {
$::lockcount--;
}
Would this be the right approach?
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.18
| Assignee | ||
Comment 2•22 years ago
|
||
Doh! This was caused by a site hack.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Target Milestone: Bugzilla 2.18 → ---
Comment 3•22 years ago
|
||
> Functions that need to lock tables will be called from within other functions
> that lock tables.
Ideally, noone should be locking any table. SELECT FOR UPDATE + transactions
would do this for us.
So lets leave this problem until we do need to worry :)
Updated•19 years ago
|
Severity: critical → trivial
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•