Closed Bug 107718 Opened 20 years ago Closed 20 years ago

masschange gives all changed bugs the groupset of the first bug in the list


(Bugzilla :: Creating/Changing Bugs, defect, P1)




Bugzilla 2.16


(Reporter: bbaetz, Assigned: bbaetz)



(Keywords: dataloss)


(2 files, 2 obsolete files)

myk, this should be considered for being a blocker for the b.m.o upgrade.

I noticed this happening once before, but just thought that the wrong button was

If you do a mass change, then one of the options is to leave everything as it is
However, the code to handle this is run once, not once per bug (~ line 564 in

    } elsif ($::FORM{"bit-$b"} == -1) {
      # If we get here, the user came from the change several bugs form, and
      # said not to change this group restriction.  So we'll add this group
      # back in only if the bug already has it.
      if ($bughasgroup) {
        $::query .= " + $b";
For setting/clearing, this is OK, but not for keeping as is. I suspect (but its
late, and I haven't tested) that we just need to set groupset to groupset in the
init code, rather than 0, and then this branch of the if statements should then
be a noop. Removing a group (ie !$bughasgroup && $::FORM{"bit-$b"} == 1) should
then just subtract the bit.
Oh, and $bughasgroup but no form element should imply keep-as-is, regardless of
whether or not the user is in the group.
Keywords: dataloss
Blocks: 103885
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.16
No longer blocks: 103885
Blocks: 103885
Actually, my suggestion doesn't work, because obviously the initial groupset is

I'm going to keep two vars, a groupsetadd and a groupsetdel, and then update teh
bugs groupset (in the sql statement) to be:

(groupset & ~groupsetdel) | groupsetadd

Assignee: myk → bbaetz
Attached patch patch (obsolete) — Splinter Review
Keywords: patch, review
Comment on attachment 55982 [details] [diff] [review]

r= justdave
the perl compiles.  all tests pass.
I tested the SQL locally, and it works the way it's supposed to.
Attachment #55982 - Flags: review+
Comment on attachment 55982 [details] [diff] [review]

OK, it makes sence to me now... must've just taken some time to sink in :)

Anyway, it works as extected in all the tests I put it through...
Attachment #55982 - Flags: review+
Closed: 20 years ago
Resolution: --- → FIXED
MySQL < 3.23.5 doesn't support the ~ bitwise negation operator.

Landfill is now broken.  (Jake and I both appear to have 3.23.x at home where we
tested this - Landfill has 3.22.32)
Resolution: FIXED → ---
Current thinking on this is that the groupset math is all going to have to be
done over again for the groups schema change (since groups will be individual
entities instead of a bitfield), so if we hurry and get that in, this all won't
even matter.  In the meantime, Bugzilla only runs on MySQL 3.23.5 and newer.

Note that reopening this should not block the b.m.o upgrade because they're also
upgrading their MySQL server, and the new one will handle this fine.
Depends on: 68022
[midaired with dave]

Can we just up the mysql requirements? I suspect that the pgsql code would get a
lot nicer if we could use some of the ansi features. dkl - is that true?

Or we could just get the group patch in, but has anyone checked that we actually
still run with our current requirement of 3.22.5 ? ~ wasn't something I'd have
thought to check, since its a fairly basic operation to support if you claim to
support bitsets. Even if I had checked, its mentioned in the docs.

mysql 3.22.5 was released in August 1998. Thats over three years ago, which is a
Long Time on the net.

/me goes to comment on bug 87958
>Can we just up the mysql requirements? I suspect that the pgsql code would get 
>a lot nicer if we could use some of the ansi features. dkl - is that true?

I am not sure when support for the ~ operator was brought into PostgreSQL but 
it is fine for the releases I am supporting for the PostgreSQL port (7.1.x).
Granted I still have to add in the int8() wrappers to make it work properly. The
new group scheme should work for any database. 

Upping the Mysql requirements for 2.16 in case the group changes do not make it
in would solve the problem in the short term.
No longer blocks: 103885
Can we temporarily achieve ~ with subtraction?  ie for 32 bit numbers, not is
really (2 ^ 32) - X.
We're running mysql 3.22.32 on a production machine that can't really be
upgraded right now (maybe over the semester break, but maybe not til next
summer). I've currently made a workaround by doing the work in perl before
sending the query, but that's not very elegant, and I don't want to keep doing
it as more ~s creep into the code. :)
See bug 87958. I can fix this case, I guess - using subtraction will work. But
there are features from 3.23 that we really want to use. For example, temporary
tables will be a faster way of doing some things, but they aren't available in
3.22. Theres also the lack of testing.
Attached patch use subtraction (obsolete) — Splinter Review
This also reverts the temporary change I added.

How does the use vars line I added work?
Attachment #55982 - Attachment is obsolete: true
Thanks for the checksetup patch to re-allow mysql 3.22. There's one problem,
though, but I'm not sure if it's in your patch or if it's already in cvs:
Making a restricted bug public by unchecking all groups' checkboxes doesn't seem
to work. 
Actually, I managed to make my test bug public again, but I had to do this in
two steps. I had three groups: 
bit-512 (A) 
bit-256 (B)
bit-128 (C)
Going from [A][B] to none failed, but going from [A][B] to [C] or to [B][C]
worked, and going from [C] to none worked, too. Strange...
Oops. Try this, instead
Attachment #57691 - Attachment is obsolete: true
Better :-) Seems to work now. Thanks.
Comment on attachment 57701 [details] [diff] [review]
add correct bracketing, too

Tested on 3.23 and 3.22 and it works great :)
Attachment #57701 - Flags: review+
Fix checked in.
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
This patch is a combination of the two patches reviewed above, so for the
2.14.1 branch, it turned into an entirely different patch.

Even though both patches applied cleanly to the branch (when done in order,
D'oh!), I'll wait for r=/r2= before checking this in; I'm pretty confident I
got it right, but I want someone else to make sure I did.
Comment on attachment 85131 [details] [diff] [review]
Backported patch for the 2_14_1-BRANCH

This looks fine to me - its what I had before, at least.
Attachment #85131 - Flags: review+
Comment on attachment 85131 [details] [diff] [review]
Backported patch for the 2_14_1-BRANCH

Works correctly in testing.
Attachment #85131 - Flags: review+
Backported patch checked in:

Checking in process_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v  <--  process_bug.cgi
new revision:; previous revision:
*** Bug 174041 has been marked as a duplicate of this bug. ***
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.