summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2013-04-18 01:26:19 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2013-04-18 01:26:19 +0200
commit2aecaaf29af1866367a362bbd57c6b5258d6440e (patch)
treee2f49df1859d1c4f29c1009ae7f2e8a78bcfe204 /Bugzilla/DB
parent8d3676154f746a5ec4f3234d5a12656c222e37ff (diff)
downloadbugzilla-2aecaaf29af1866367a362bbd57c6b5258d6440e.tar.gz
bugzilla-2aecaaf29af1866367a362bbd57c6b5258d6440e.tar.xz
Bug 858911: Oracle fails with "ORA-04043: object T_GROUP_CONCAT does not exist" when installing Bugzilla for the first time
r=dkl a=LpSolit
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Oracle.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm
index ebf59533f..622609f15 100644
--- a/Bugzilla/DB/Oracle.pm
+++ b/Bugzilla/DB/Oracle.pm
@@ -550,7 +550,9 @@ sub bz_setup_database {
. " RETURN NUMBER IS BEGIN RETURN LENGTH(COLUMN_NAME); END;");
# Create types for group_concat
- $self->do("DROP TYPE T_GROUP_CONCAT");
+ my $type_exists = $self->selectrow_array("SELECT 1 FROM user_types
+ WHERE type_name = 'T_GROUP_CONCAT'");
+ $self->do("DROP TYPE T_GROUP_CONCAT") if $type_exists;
$self->do("CREATE OR REPLACE TYPE T_CLOB_DELIM AS OBJECT "
. "( p_CONTENT CLOB, p_DELIMITER VARCHAR2(256)"
. ", MAP MEMBER FUNCTION T_CLOB_DELIM_ToVarchar return VARCHAR2"