[Rt-commit] r15385 - rt/3.8/branches/parallel-testing/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Fri Aug 22 18:51:56 EDT 2008
Author: ruz
Date: Fri Aug 22 18:51:56 2008
New Revision: 15385
Modified:
rt/3.8/branches/parallel-testing/lib/RT/Handle.pm
Log:
* adjust Oracle connect a little. DatabaseName is oracle SID
as it always have been, but now if you define database host
as well then you can connect without TWO_TASK, ORACLE_SID
and all other stuff you usually had to use
Modified: rt/3.8/branches/parallel-testing/lib/RT/Handle.pm
==============================================================================
--- rt/3.8/branches/parallel-testing/lib/RT/Handle.pm (original)
+++ rt/3.8/branches/parallel-testing/lib/RT/Handle.pm Fri Aug 22 18:51:56 2008
@@ -143,16 +143,18 @@
$db_name = File::Spec->catfile($RT::VarPath, $db_name)
if $db_type eq 'SQLite' && !File::Spec->file_name_is_absolute($db_name);
-
- $self->SUPER::BuildDSN( Host => $db_host,
- Database => $db_name,
- Port => $db_port,
- Driver => $db_type,
- RequireSSL => RT->Config->Get('DatabaseRequireSSL'),
- DisconnectHandleOnDestroy => 1,
- );
-
-
+ my %args = (
+ Host => $db_host,
+ Database => $db_name,
+ Port => $db_port,
+ Driver => $db_type,
+ RequireSSL => RT->Config->Get('DatabaseRequireSSL'),
+ DisconnectHandleOnDestroy => 1,
+ );
+ if ( $db_type eq 'Oracle' && $db_host ) {
+ $args{'SID'} = delete $args{'Database'};
+ }
+ $self->SUPER::BuildDSN( %args );
}
=head2 DSN
More information about the Rt-commit
mailing list