Closed Bug 71396 Opened 25 years ago Closed 25 years ago

$::db->do isn't needed anymore

Categories

(Bugzilla :: Bugzilla-General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.14

People

(Reporter: jacob, Assigned: kiko)

References

()

Details

(Keywords: regression)

Attachments

(2 files)

At the time that these lines were added ('round about line 601 of editproducts.cgi) there was no real way to do an SQL call while another was in process. Since then, Dan added a PushSQLState and PopSQLState (or something like that). Adding those would allow the $::db->do lines to be replaced w/SendSQL().
Target Milestone: --- → Bugzilla 2.16
This is also true of approx. line 608 of editcomponents.cgi (which is still using "$::db->query").
Note that this is a possible data corruption if you are using shadow databases, since bypassing the SendSQL routine also bypasses the shadowing mechanism.
and editversions, and editmilestones...
the lines mentioned in editcomponents.cgi here are left over from when we were using the Mysql module, and are not supported by DBI. These have been broken since we made the switch to DBI. (It was just pointed out on n.p.m.w. that this was still here...)
Keywords: regression
Target Milestone: Bugzilla 2.16 → Bugzilla 2.14
I've added the changes proposed and it WORKSFORME. We do use $db->do also in syncshadowdb, but it's necessary ("SET OPTION..." isn't SQL and SendSQL doesn't like it) - if people deem we should add a coment for that, I have it here in a local copy. Is this as easy as it looks?
Yep, it's that easy... editcomponents.cgi, editversions, and editmilestones need to be done too.
Assignee: tara → kiko
Okay, added fix v2 that touched editmilestones.cgi editversions.cgi editcomponents.cgi and editproducts.cgi By the way, I haven't seen an answer: should the db->do in syncshadowdb be commented as special?
Attachment 38678 [details] [diff] checked in r=jake I think commenting the remaining db->do in syncshadow db isn't really important.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
the patch applied to editversions.cgi has two PushGlobalSQLState calls instead of a PushGlobalSQLState and a PopGlobalSQLState.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Bad Jake. Missed that in review. Thanks for the catch Dave. Changed the second PushGlobalSQLState() to PopGlobalSQLState().
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
*** Bug 90163 has been marked as a duplicate of this bug. ***
Moving to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: Bugzilla 2.10 → unspecified
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: