Closed
Bug 858911
Opened 11 years ago
Closed 11 years ago
Oracle fails with "ORA-04043: object T_GROUP_CONCAT does not exist" when installing Bugzilla for the first time
Categories
(Bugzilla :: Installation & Upgrading, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
(Keywords: regression)
Attachments
(1 file)
748 bytes,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
This is a regression due to bug 780053, affecting Bugzilla 4.2.4 and newer. The first time you install Bugzilla using Oracle, T_GROUP_CONCAT doesn't exist yet and so "DROP TYPE T_GROUP_CONCAT" fails: DBD::Oracle::db do failed: ORA-04043: object T_GROUP_CONCAT does not exist (DBD ERROR: OCIStmtExecute) [for Statement "DROP TYPE T_GROUP_CONCAT"] at Bugzilla/DB/Oracle.pm line 387, <DATA> line 577. Bugzilla::DB::Oracle::do(undef, 'DROP TYPE T_GROUP_CONCAT') called at Bugzilla/DB/Oracle.pm line 534 Bugzilla::DB::Oracle::bz_setup_database('Bugzilla::DB::Oracle=HASH(0xab02468)') called at ./checksetup.pl line 118 So we need a conditional DROP, i.e. only execute this command if T_GROUP_CONCAT exists.
Flags: blocking4.4+
Flags: blocking4.2.6+
![]() |
Assignee | |
Comment 1•11 years ago
|
||
An alternative could be to just catching the exception: BEGIN EXECUTE IMMEDIATE 'DROP TYPE T_GROUP_CONCAT'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -4043 THEN RAISE; END IF; END; But since "CREATE OR REPLACE TYPE" is used, is the drop even needed?
![]() |
Assignee | |
Comment 3•11 years ago
|
||
(In reply to andershol from comment #2) > But since "CREATE OR REPLACE TYPE" is used, is the drop even needed? That's a question for you. You wrote that code, see bug 780053 comment 5: "Adds the "MAP MEMBER FUNCTION" (copied from David), and makes the "CREATE OR REPLACE TYPE T_CLOB_DELIM" run on every run to update old installations, but this made it nessesary to add a "DROP TYPE T_GROUP_CONCAT" since this type depended on T_CLOB_DELIM."
(In reply to Frédéric Buclin from comment #3) > (In reply to andershol from comment #2) > > But since "CREATE OR REPLACE TYPE" is used, is the drop even needed? > That's a question for you. You wrote that code, see bug 780053 comment 5: This bug is evidence that I was wrong in that bug, so I guess I was just wondering how wrong I was (and I believe I had overlooked the "OR REPLACE" at the time). Anyway, it seems safer to drop it first as you did in your patch, so I shouldn't have been intervening with "micro-optimizations", sorry.
Comment 5•11 years ago
|
||
The CREATE OR REPLACE TYPE T_CLOB_DELIM is unrelated, and looks fine. The DROP is for a different type, T_GROUP_CONCAT, that references T_CLOB_DELIM. As it won't exist in a new install, it needs to be conditional (or the exception caught as you said). The patch looks sensible to me...
Comment 6•11 years ago
|
||
Comment on attachment 734228 [details] [diff] [review] patch, v1 Review of attachment 734228 [details] [diff] [review]: ----------------------------------------------------------------- Works as expected. r=dkl
Attachment #734228 -
Flags: review?(dkl) → review+
![]() |
Assignee | |
Updated•11 years ago
|
Flags: approval4.4+
Flags: approval4.2+
Flags: approval+
![]() |
Assignee | |
Comment 7•11 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/DB/Oracle.pm Committed revision 8613. Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/ modified Bugzilla/DB/Oracle.pm Committed revision 8546. Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/ modified Bugzilla/DB/Oracle.pm Committed revision 8208.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•