From 5c779ad57796cf6c1f88efe2f3b88b1b96144004 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 13 Dec 2007 08:44:11 +0000 Subject: Bug 408037: [Oracle] Running checksetup.pl twice doesn't work Patch By Xiaoou Wu r=mkanat, a=mkanat --- Bugzilla/DB/Oracle.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Bugzilla/DB') diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 008f4be70..509dedaa1 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -421,8 +421,14 @@ sub bz_setup_database { $self->do("CREATE OR REPLACE FUNCTION NOW " . " RETURN DATE IS BEGIN RETURN SYSDATE; END;"); # Create a WORLD_LEXER named BZ_LEX for multilingual fulltext search - $self->do("BEGIN CTX_DDL.CREATE_PREFERENCE + my $lexer = $self->selectcol_arrayref( + "SELECT pre_name FROM CTXSYS.CTX_PREFERENCES WHERE pre_name = ? AND + pre_owner = ?", + undef,'BZ_LEX',uc(Bugzilla->localconfig->{db_user})); + if(!@$lexer) { + $self->do("BEGIN CTX_DDL.CREATE_PREFERENCE ('BZ_LEX', 'WORLD_LEXER'); END;"); + } $self->SUPER::bz_setup_database(@_); } -- cgit v1.2.3-24-g4f1b