Author: byterock
Date: Fri Jun 4 18:48:36 2010
New Revision: 14111
Modified:
dbd-oracle/branches/DRCP_1.25/Makefile.PL
dbd-oracle/branches/DRCP_1.25/Oracle.xs
dbd-oracle/branches/DRCP_1.25/ocitrace.h
dbd-oracle/branches/DRCP_1.25/t/10general.t
Log:
first successful check in for this now the ping is there
Modified: dbd-oracle/branches/DRCP_1.25/Makefile.PL
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/Makefile.PL (original)
+++ dbd-oracle/branches/DRCP_1.25/Makefile.PL Fri Jun 4 18:48:36 2010
@@ -131,7 +131,7 @@
if (!$OH) {
$OH = find_oracle_home() || die qq{
- The $ORACLE_ENV environment variable is not set and I couldn't guess it.
+ The $ORACLE_ENV environment variable is not set and I couldn\'t guess it.
It must be set to hold the path to an Oracle installation directory
on this machine (or a machine with a compatible architecture).
See the appropriate README file for your OS for more information.
@@ -162,8 +162,8 @@
# $client_version => Major.Minor, $client_version_full => Major.Minor.X.Y.Z
my ($client_version, $client_version_full) = get_client_version($::opt_V);
-die "DBD::Oracle no longer supports Oracle versions before 8.\n"
- if $client_version < 8;
+die "DBD::Oracle no longer supports Oracle client versions before 9.\n Try any version before 1.20"
+ if $client_version < 9;
# Check for symbol table problem in libclntsh.dylib.9.0 on MacOS X
@@ -671,9 +671,14 @@
# use this if, for some reason the default handling for this function
# doesn't work or you are building a binary release for distribution
# to machines with older client libraries.
-$opts{DEFINE} .= " -DORA_OCI_8" if ($::opt_V && $client_version == 8.0)
- or ($^O eq 'VMS' && $client_version < 9.0); # OCILobIsTemporary
+
+print "\nclient_version=$client_version\n\n";
+
+$opts{DEFINE} .= " -DORA_OCI_102" if ($::opt_V && $client_version == 10.2)
+ or ( $client_version >= 10.2); # OCILobIsTemporary
+
+print "\DEFINE=$opts{DEFINE}\n\n";
# OCIStmntFetch2() is a feature of OCI 9.0.0
$opts{DEFINE} .= " -DUSE_ORA_OCI_STMNT_FETCH " if ( $client_version < 9.0 );
@@ -1601,7 +1606,7 @@
if (!$client_version_full) {
$client_version_full = "8.0.0.0";
print qq{
-WARNING: I could not determine Oracle client version so I'll just
+WARNING: I could not determine Oracle client version so I\'ll just
default to version $client_version_full. Some features of DBD::Oracle may not work.
Oracle version based logic in Makefile.PL may produce erroneous results.
You can use "perl Makefile.PL -V X.Y.Z" to specify a your client version.\n
Modified: dbd-oracle/branches/DRCP_1.25/Oracle.xs
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/Oracle.xs (original)
+++ dbd-oracle/branches/DRCP_1.25/Oracle.xs Fri Jun 4 18:48:36 2010
@@ -263,7 +263,9 @@
PREINIT:
D_imp_dbh(dbh);
sword status;
+#if !defined(ORA_OCI_102)
text buf[2];
+#endif
CODE:
/*simply does a call to OCIServerVersion which should make 1 round trip*/
/*later I will replace this with the actual OCIPing command*/
@@ -271,7 +273,11 @@
/*If the listener goes down it is another case as the Listener is needed to establish the connection not maintain it*/
/*so we should stay connected but we cannot get nay new connections*/
{
+#if !defined(ORA_OCI_102)
OCIServerVersion_log_stat(imp_dbh->svchp,imp_dbh->errhp,buf,2,OCI_HTYPE_SVCCTX,status);
+#else
+ OCIPing_log_stat(imp_dbh->svchp,imp_dbh->errhp,status);
+#endif
if (status != OCI_SUCCESS){
XSRETURN_IV(0);
} else {
Modified: dbd-oracle/branches/DRCP_1.25/ocitrace.h
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/ocitrace.h (original)
+++ dbd-oracle/branches/DRCP_1.25/ocitrace.h Fri Jun 4 18:48:36 2010
@@ -36,13 +36,21 @@
If done well the log will read like a compilable program.
*/
-
+#if defined(ORA_OCI_102)
+#define OCIPing_log_stat(sc,errhp,stat)\
+ stat =OCIPing(sc,errhp,OCI_DEFAULT);\
+ (DBD_OCI_TRACEON) \
+ ? PerlIO_printf(DBD_OCI_TRACEFP,\
+ "%sOCIPing(%p)=%s\n",\
+ OciTp, sc,oci_status_name(stat)),stat \
+ : stat
+#endif
#define OCIServerVersion_log_stat(sc,errhp,b,bl,ht,stat)\
stat =OCIServerVersion(sc,errhp,b,bl,ht);\
(DBD_OCI_TRACEON) \
? PerlIO_printf(DBD_OCI_TRACEFP,\
- "%sCIServerVersion_log_stat(%p,%s)=%s\n",\
+ "%sOCIServerVersion_log_stat(%p,%s)=%s\n",\
OciTp, sc,b,oci_status_name(stat)),stat \
: stat
Modified: dbd-oracle/branches/DRCP_1.25/t/10general.t
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/t/10general.t (original)
+++ dbd-oracle/branches/DRCP_1.25/t/10general.t Fri Jun 4 18:48:36 2010
@@ -20,7 +20,10 @@
my $dsn = oracle_test_dsn();
my $dbuser = $ENV{ORACLE_USERID} || 'scott/tiger';
my $dbh = DBI->connect($dsn, $dbuser, '');
+$dbh->{dbd_verbose}=15;
+warn ("ping=".$dbh->ping());
+exit;
unless($dbh) {
BAIL_OUT("Unable to connect to Oracle ($DBI::errstr)\nTests skipped.\n");
exit 0;
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.