Closed
Bug 476943
Opened 16 years ago
Closed 16 years ago
Edit multiple issues token after switching to shadow DB
Categories
(Bugzilla :: Query/Bug List, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: gregaryh, Assigned: gregaryh)
References
Details
(Keywords: regression, selenium)
Attachments
(1 file, 2 obsolete files)
777 bytes,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
As part of the fix to Bug 466748 a token is now generated in buglist.cgi. This is done after the switch to the shadow db, meaning that issue_token tries to write the token to the shadow database. If the shadow is in readonly mode (as it should be), this will fail with the following error: DBD::mysql::db do failed: The MySQL server is running with the --read-only option so it cannot execute this statement [for Statement "INSERT INTO tokens (userid, issuedate, token, tokentype, eventdata) VALUES (?, NOW(), ?, ?, ?)"] at Bugzilla/Token.pm line 418 Bugzilla::Token::_create_token(9, 'session', 'buglist_mass_change') called at Bugzilla/Token.pm line 173 Bugzilla::Token::issue_session_token('buglist_mass_change') called at /shared/bugzilla/docroot/buglist.cgi line 1252
Assignee | ||
Comment 1•16 years ago
|
||
I have tested this on our installation and it seems to work.
Assignee: query-and-buglist → ghendricks
Attachment #360590 -
Flags: review?(mkanat)
Comment 2•16 years ago
|
||
Comment on attachment 360590 [details] [diff] [review] V1 This then generates the token for all searches, which we definitely don't want to do. What would probably be ideal would be function like: on_main_db { issue_session_token } This can be accomplished by writing a function with a prototype of (&). Then we can make sure that certain code always runs on the main DB even if we're currently on the shadow DB. So that's my thought unless you have any other idea. I'm not perfectly happy with it, because it seems like a hacky solution instead of a good architectural solution, but it's the best idea I have.
Attachment #360590 -
Flags: review?(mkanat) → review-
Comment 3•16 years ago
|
||
But for 3.2, you can just wrap it in switch_to_main_db and switch_to_shadow_db.
Comment 4•16 years ago
|
||
(In reply to comment #3) > But for 3.2, you can just wrap it in switch_to_main_db and switch_to_shadow_db. I think you should use them even on tip. We don't need anything else.
Assignee | ||
Comment 5•16 years ago
|
||
Attachment #360590 -
Attachment is obsolete: true
Attachment #360601 -
Flags: review?(mkanat)
Comment 6•16 years ago
|
||
(In reply to comment #0) > As part of the fix to Bug 466748 a token is now generated in buglist.cgi. No, this token has been introduced in bug 26257, which affects 3.2.1 and newer only. 3.0.x is not affected.
Depends on: 26257
Flags: blocking3.2.3+
Keywords: regression
OS: Linux → All
Hardware: x86 → All
Target Milestone: --- → Bugzilla 3.2
Comment 7•16 years ago
|
||
Comment on attachment 360601 [details] [diff] [review] V2 You actually don't even need the $dbh = bits. Could I get a new patch without them? (I just don't like relying on checkin fixes for important multi-branch patches like this one.)
Attachment #360601 -
Flags: review?(mkanat) → review-
Assignee | ||
Comment 8•16 years ago
|
||
I just copied and pasted without looking closely. Sorry. Fixed now.
Attachment #360601 -
Attachment is obsolete: true
Attachment #360732 -
Flags: review?(mkanat)
Comment 9•16 years ago
|
||
Comment on attachment 360732 [details] [diff] [review] V3 Looks fine.
Attachment #360732 -
Flags: review?(mkanat) → review+
Updated•16 years ago
|
Flags: approval3.2+
Flags: approval+
Assignee | ||
Comment 10•16 years ago
|
||
Checking in buglist.cgi; /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi new revision: 1.374.2.8; previous revision: 1.374.2.7
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 11•16 years ago
|
||
Please also commit it on tip.
Assignee | ||
Comment 12•16 years ago
|
||
Checking in buglist.cgi; /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi new revision: 1.393; previous revision: 1.392
Comment 14•16 years ago
|
||
Will be tested by test_bug_editing.t, see qa bug 3098.
Flags: testcase?
Keywords: selenium
Updated•13 years ago
|
Flags: testcase? → testcase+
You need to log in
before you can comment on or make changes to this bug.
Description
•