Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

[svn:dbd-oracle] r2333 - in dbd-oracle/trunk: . t
Author: timbo
Date: Wed Dec 28 14:21:26 2005
New Revision: 2333

Added:
dbd-oracle/trunk/README
- copied unchanged from r2332, dbd-oracle/branches/pythian/README
dbd-oracle/trunk/README.aix.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.aix.txt
dbd-oracle/trunk/README.clients.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.clients.tx
t
dbd-oracle/trunk/README.explain.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.explain.tx
t
dbd-oracle/trunk/README.help.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.help.txt
dbd-oracle/trunk/README.hpux.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.hpux.txt
dbd-oracle/trunk/README.java.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.java.txt
dbd-oracle/trunk/README.linux.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.linux.txt
dbd-oracle/trunk/README.login.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.login.txt
dbd-oracle/trunk/README.longs.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.longs.txt
dbd-oracle/trunk/README.macosx.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.macosx.txt
dbd-oracle/trunk/README.sec.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.sec.txt
dbd-oracle/trunk/README.utf8.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.utf8.txt
dbd-oracle/trunk/README.vms.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.vms.txt
dbd-oracle/trunk/README.win32.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.win32.txt
dbd-oracle/trunk/README.wingcc.txt
- copied unchanged from r2332, dbd-oracle/branches/pythian/README.wingcc.txt
Removed:
dbd-oracle/trunk/README.aix
dbd-oracle/trunk/README.clients
dbd-oracle/trunk/README.explain
dbd-oracle/trunk/README.help
dbd-oracle/trunk/README.hpux
dbd-oracle/trunk/README.java
dbd-oracle/trunk/README.linux
dbd-oracle/trunk/README.login
dbd-oracle/trunk/README.longs
dbd-oracle/trunk/README.macosx
dbd-oracle/trunk/README.sec
dbd-oracle/trunk/README.utf8
dbd-oracle/trunk/README.vms
dbd-oracle/trunk/README.win32
dbd-oracle/trunk/README.wingcc
Modified:
dbd-oracle/trunk/Changes
dbd-oracle/trunk/MANIFEST
dbd-oracle/trunk/Makefile.PL
dbd-oracle/trunk/Oracle.pm
dbd-oracle/trunk/dbdimp.c
dbd-oracle/trunk/oci8.c
dbd-oracle/trunk/t/10general.t
dbd-oracle/trunk/t/20select.t
Log:
svn merge https://svn.perl.org/modules/dbd-oracle/trunk https://svn.perl.org/modul
e...ranches/pythian


Modified: dbd-oracle/trunk/Changes
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/Changes	(original)
+++ dbd-oracle/trunk/Changes	Wed Dec 28 14:21:26 2005
@@ -3,12 +3,13 @@
Fixed csform setting for Oracle 8.0.
Fixed csform setting for some UTF8 cases.
Fixed INTERVAL DAY TO SECOND thanks to Honza Pazdziora.
-  Fixed $sth->{PRECISION} for utf-8, with thanks Eric Lenio.
+  Fixed undef warnings when connecting with undef $user.

Added support for nested cursors in select lists thanks to Charles Jardine.
Added "Trailing Spaces" section to docs thanks to Michael A Chase.
-  Changed "Binding Cursors" docs, clarifying examples thanks to Charles Jar
dine.
+  Added support for binary floats/doubles thanks to Dennis Box.

+  Changed "Binding Cursors" docs, clarifying examples thanks to Charles Jar
dine.
Changed Makefile.PL to avoid risk of sqlplus hanging thanks to Mark Dedlow.
Changed Makefile.PL to prefer ~/rdbms/public over other ~/rdbms/* for .h fil
es.
Changed Makefile.PL to improve build rule detection.
@@ -17,6 +18,7 @@
Updated README.vms re logical name tables thanks to Jakob Snoer.
Updated README.aix thanks to Stephen de Vries.
Updated README.macosx thanks to Stephen de Vries.
+  Renamed README.*'s to add .txt suffix to make life easier for some.

The Copyright terms for DBD::Oracle have been simplified and now read:
The DBD::Oracle module is free software; you can redistribute it

Modified: dbd-oracle/trunk/MANIFEST
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/MANIFEST	(original)
+++ dbd-oracle/trunk/MANIFEST	Wed Dec 28 14:21:26 2005
@@ -18,21 +18,21 @@ Oracle.pm
Oracle.xs
Oraperl.pm
README
-README.aix
-README.clients
-README.explain
-README.help
-README.hpux
-README.java
-README.linux
-README.login
-README.longs
-README.macosx
-README.sec
-README.utf8
-README.vms
-README.win32
-README.wingcc			Notes about building with mingw32 and cygwin32
+README.aix.txt
+README.clients.txt
+README.explain.txt
+README.help.txt
+README.hpux.txt
+README.java.txt
+README.linux.txt
+README.login.txt
+README.longs.txt
+README.macosx.txt
+README.sec.txt
+README.utf8.txt
+README.vms.txt
+README.win32.txt
+README.wingcc.txt			Notes about building with mingw32 and cygwin32
Todo
dbdimp.c
dbdimp.h

Modified: dbd-oracle/trunk/Makefile.PL
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/Makefile.PL	(original)
+++ dbd-oracle/trunk/Makefile.PL	Wed Dec 28 14:21:26 2005
@@ -1,6 +1,24 @@
##
##  You should not need to edit this file.
-##
+##  Ok I edited it! So what are you going to do about it?
+##  John Scoles The Pythian Group
+##  September 20 2005
+##  scoles@pythian.com
+##  changes made
+##  Removed option flag '-ic10'.
+##  Added a new elsif block  that searches for libclntsh.so.10.1 file on th
e path $HO
+##  In this block it sets a  link to libclntsh.so.10.1  as libclntsh.so
+##  then hard codes the lib to clntsh and then carries on.
+##  I attempted to hardcode libclntsh.so.10.1 for clntsh but this does not
+##  not work. It seems that others are getting this same form of error as w
ell
+##  i.e.  The compiler does not recognize .10.1 as a lib
+##
+##  John Scoles (TPG)
+##  October 07 2005
+##  Changes made
+##  Adding in a few changes suggested by Andy Hassall <andy@andyh.co.uk>
+##  that will enable the compile to work for Windows version of the IC
+
# vim: ts=8:sw=4

BEGIN { $^W = 1 }
@@ -41,6 +59,7 @@ my $os = $^O;
my $osvers = $Config{osvers}; $osvers =~ s/^\s*(\d+\.\d+).*/$1/; # drop
 sub-sub-version: 2.5.1 -> 2.5
my $exe_ext = ($os eq 'VMS') ? '.pl' : '';
my $BELL = "\a";
+# put this here as it might change
$| = 1;

my %opts = (
@@ -74,9 +93,10 @@ my %mk_target_rules;

# Options (rarely needed)
# to turn off an option prefix with 'no', ie 'perl Makefile.PL -nob'
+#$::opt_ic10 = 1;   # Build for Oracle 10g instantclient
$::opt_b = 1;	# try to use Oracle's own 'build' rule
$::opt_r = '';	# With -b above, use this names build rule (eg -r=build64)
-$::opt_m = 0;	# path to proc.mk or oracle.mk file to read
+$::opt_m = '';	# path to proc.mk or oracle.mk file to read
$::opt_p = '';	# alter preference for oracle.mk over proc
$::opt_n = '';	# Oracle .mk macro name to use for library list to link with
$::opt_c = 0;	# don't encourage use of shared library
@@ -120,7 +140,6 @@ print "\n Configuring DBD::Oracle ...\n
# --- Where is Oracle installed...

my $ORACLE_ENV  = ($os eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
-
my $OH = $ENV{$ORACLE_ENV} || '';
$OH  =  win32_oracle_home($O
H) if ($os eq 'MSWin32') or ($os =~ /cygwin/i);
$OH = unixify $OH if $os eq 'VMS';
@@ -133,12 +152,27 @@ die qq{  The $ORACLE_ENV environment var
ABORTED!
} unless $OH;

+print "os=$os\n";
+
+die qq{  The $ORACLE_ENV environment variable value ($OH) is not valid
.
+  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 README.clients file for more information.
+  ABORTED!
+} unless (($os eq 'VMS') ? -d $OH : (-e "$OH/libclntsh.so.10.1" || -e "$OH/
oci.dll") ? 1 : -d "$OH/lib/.");
+
+
+#the (-e "$OH/libclntsh.so.10.1" ) supports the 10g Instant Client on UNIX 
and Linux
+#The -e "$OH/oci.dll" supports the 10g Instant Client on Windows.
+
die qq{  The $ORACLE_ENV environment variable value ($OH) is not valid.
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 README.clients file for more information.
ABORTED!
-} unless (($os eq 'VMS') ? -d $OH : -d "$OH/lib/.");
+
+} unless ( -d $OH );
+

print "Using Oracle in $OH\n";

@@ -169,6 +203,9 @@ symbol_search() if $::opt_s or $::opt_S;

# --- How shall we link with Oracle? Let me count the ways...

+# default to using XE .mk file if one exists
+$::opt_m ||= "$OH/rdbms/demo/demo_xe.mk" if -s "$OH/rdbms/demo/demo_xe.mk";
+
my @mkfiles;
my $linkwith = "";
my $linkwith_msg = "";
@@ -200,12 +237,16 @@ if ($os eq 'VMS') {
}

elsif (($os eq 'MSWin32') or ($os =~ /cygwin/i)) {
+
my $OCIDIR = "";
find( sub {
print "Found $_ directory\n" if /^OCI\d*$/i;
$OCIDIR = $_ if /^OCI\d*$/i && $OCIDIR lt $_;
$File::Find::prune = 1 if -d $_ && $_ !~ /^\./;
}, $OH );
+
+    $OCIDIR = 'sdk' if !$OCIDIR && -d "$OH/sdk"; # Instant Client SDK
+
die "OCI directory not found, please install OCI in $OH" if ! $OCIDIR;
print "Using OCI directory '$OCIDIR'\n";

@@ -266,7 +307,7 @@ elsif (($os eq 'MSWin32') or ($os =~ /cy
# --- UNIX Variants ---

elsif ($::opt_l and # use -l to enable this direct-link approach
-	@_=grep { m:/lib(cl(ie)?ntsh|oracle).\w+$:o } <$OH/lib/lib*>
+        @_=grep { m:/lib(cl(ie)?ntsh|oracle).\w+$:o } <$OH/lib/lib*>
) {
# --- the simple modern way ---
foreach(@_) { s:\Q$OH/lib/::g }
@@ -278,19 +319,73 @@ elsif ($::opt_l and # use -l to enable t
$opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g" };
my @h_dirs = find_headers();
if  ($client_version_ful
l =~ /^8.0.6/ && $os eq 'hpux') {
-	$linkwith_msg = "-lextp -l$lib.";
-	$opts{LIBS} = [ "-L$OH/$libdir -lextp -l$lib $syslibs" ];
-	push @h_dirs, 'network/public';
+        $linkwith_msg = "-lextp -l$lib.";
+        $opts{LIBS} = [ "-L$OH/$libdir -lextp -l$lib $syslibs" ];
+        push @h_dirs, 'network/public';
}
else {
-	$linkwith_msg = "-l$lib.";
-	$opts{LIBS} = [ "-L$OH/$libdir -l$lib $syslibs" ];
+        $linkwith_msg = "-l$lib.";
+        $opts{LIBS} = [ "-L$OH/$libdir -l$lib $syslibs" ];
}
my $inc = join " ", map { "-I$OH/$_" } @h_dirs;
$opts{INC}  = "$inc -I$dbi_arch_dir";
}
-else {	# --- trawl the guts of Oracle's make files looking the how it 
wants to link

+elsif ($::opt_m =~ /\bdemo_xe.mk$/) {	# Oracle XE
+
+    my $mk = $::opt_m;
+    print "Looks like Oracle XE ($mk)\n";
+
+     fetch_oci_macros($mk
);
+    $MK{CCINCLUDES} = '-I$(ICINCHOME)'; # undo odd refinition in demo_
xe.mk
+
+    # From linux Oracle XE (10.2.0):
+     #	ICINCHOME=$(ORACLE
_HOME)/rdbms/public/
+     #	ICLIBHOME=$(ORACLE
_HOME)/lib/
+    #	ICLIBPATH=-L$(ICLIBHOME)
+    #	THREADLIBS=-lpthread    [initially -lthread then redefined]
+     #	CCLIB=$(ICLIBPATH)
 -lclntsh $(THREADLIBS)
+    #	CCINCLUDES = -I$(ICINCHOME)   [see above]
+    #    CCFLAGS=$(CCINCLUDES
) -DLINUX -D_GNU_SOURCE -D_REENTRANT -g [in
itially without -DLINUX -D_GNU_SOURCE]
+    my $cclib   = expand_mkvars($MK{CCLIB}, 0, 1);
+    my $ccflags = expand_mkvars($MK{CCFLAGS}, 0, 1);
+
+    $linkwith_msg = "$cclib";
+    $opts{LIBS} = [ $cclib ];
+    $opts{INC}  = "-I$dbi_arch_dir $ccflags";
+    $opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g" };
+}
+
+# --- special case for Oracle 10g instant client
+
+elsif (-e "$OH/libclntsh.so.10.1") {   # note lack of ../lib/...
+
+    #support for 10 instantclient
+    # John Scoles
+    # --- the simple modern way ---
+
+    eval { symlink("$OH/libclntsh.so.10.1","$OH/libclntsh.so") };
+    # need to link so.10.1 file to .so
+    # hard coded the link dir here and below
+
+    print "Found direct-link candidate: clntsh\n";
+    my $lib = "clntsh";
+    my $syslibs = read_sysliblist();
+
+    print "Oracle sysliblist: $syslibs\n";
+
+    # no library dir with instantclient
+    my $libdir = "";
+
+    $opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g" };
+
+    $linkwith_msg = "-l$lib.";
+    $opts{LIBS} = [ "-L$OH/$libdir -l$lib $syslibs"];
+    my $inc = "-I$OH\/sdk/include";
+    $opts{INC}  = "$inc -I$dbi_arch_dir";
+
+}
+else {	# --- trawl the guts of Oracle's make files looking the how it 
wants to link
#Lincoln: pick the right library path
my $libdir = ora_libdir();
my @ora_libs = <$OH/$libdir/lib*>;
@@ -713,7 +808,6 @@ if ($opts{LINKTYPE} && $opts{LINKTYPE} e
# create this before WriteMakefile so MakeMaker knows it's here
open(MK_PM, ">mk.pm") or die "Unable to create mk.pm: $!";

-print "\n";
WriteMakefile(  dbd_edit_mm_attribs(
\%opts) );

check_security() unless $os eq 'VMS' or $os eq 'MSWin32' or $os =~ /cygwin/i
;
@@ -922,6 +1016,7 @@ sub ora_libdir {
else {
$libdir = 'lib64' if   perl_is_64bit() and -d "$OH/lib64";
}
+
return $libdir;
}

@@ -943,7 +1038,6 @@ sub del_crtobj {


sub find_mkfile {
-
my @mkfiles;
my @mk_proc = (
'precomp/demo/proc/proc.mk',
@@ -952,6 +1046,7 @@ sub find_mkfile {
'proc16/lib/proc16.mk',
);
my @mk_oci = (
+	'rdbms/demo/demo_xe.mk',
'rdbms/lib/oracle.mk',
'rdbms/demo/oracle.mk',
'rdbms/demo/demo_rdbms.mk',
@@ -992,7 +1087,6 @@ sub find_mkfile {
} unless ($os eq 'MSWin32') || ($os eq 'VMS') || ($mkfile && -f $mkfile) || 
$::opt_F;

print "Using $mkfile\n";
-
warn "Note: Attempting to use makefile from otrace component. This may not w
ork.\n"
if ($mkfile =~ /atmoci.mk/);

@@ -1173,6 +1267,9 @@ sub fetch_oci_macros {
$linkvia = '-locic $(TTLIBS)';	# XXX GUESS HACK
}
}
+    elsif (!$linkvia && $MK{CCLIB}) {	# Oracle XE
+	$linkvia = '$(CCLIB)';
+    }
unless ($linkvia){
die "ERROR parsing $file: Unable to determine what to link with.\n"
."Please send me copies of these files (one per mail  message):\n@mkfiles\
n";
@@ -1288,7 +1385,7 @@ sub find_bin{
my $bin = shift;
my $path_sep = $Config{path_sep};
foreach (split(/\Q$path_sep/, $ENV{PATH})){
-	return "$_/$bin" if -x "$_/$bin";
+      return "$_/$bin" if -x "$_/$bin";
}
return undef;
}
@@ -1296,7 +1393,8 @@ sub find_bin{

sub find_headers {
my (%h_dir, %h_file, @h_dir);
-    find( sub {
+
+   find( sub {
return unless /^o(ci.{3,4}|ratypes)\.h$/i;
my $dir = $File::Find::dir;
$dir =~ s:^\Q$OH/::;
@@ -1305,15 +1403,17 @@ sub find_headers {
print "Found $dir/$_\n" if $::opt_d;
},
# --- Oracle Instant Client locations
-       "$OH/sdk", # Instant Client default location (10g)
"/include/oracle/ $client_version_full
/client", # Instant Client for RedHat F
C3
# --- Traditional full-install locations
"$OH/rdbms/public", # prefer public over others
"$OH/rdbms",
-       "$OH/plsql", # oratypes.h sometimes here (eg HPUX 11.23 Itanium Orac
le 9.2.0)
+       "$OH/plsql", # oratypes.h sometimes here (eg HPUX 11.23 Itanium Orac
le 9.2.0),
);
+
@h_dir = keys %h_dir;
+
print "Found header files in @h_dir.\n" if @h_dir;
+
if (!$h_file{'oratypes.h'} || !$h_file{'ocidfn.h'}) {
print " \n\n****************
 ********************
 ********************
*\n";
print "I can't find the header files I need in your Oracle installation.\n";
@@ -1332,10 +1432,10 @@ sub get_client_version {

my  $client_version_full
 = '';

-    my $sqlplus_exe = ($os eq 'Win32') ? "sqlplus.exe" : "sqlplus";
+    my $sqlplus_exe = ($os eq 'Win32' || $os eq 'MSWin32') ? "sqlplus.exe" 
: "sqlplus";
local $ENV{PATH} = join $Config{path_sep}, $ENV{PATH}, "$OH/b
in", $OH;
local $ENV{SQLPATH} = ""; # avoid $SQLPATH/login.sql causing sqlplus to
 hang
-
+    print "path=$ENV{PATH}\n";
if  (find_bin($sqlplus_e
xe)) {
# Try to use the _SQLPLUS_RELEASE predefined variable from sqlplus
# Documented in the SQL*Plus reference guide:
@@ -1348,8 +1448,8 @@ sub get_client_version {
close FH;
my $sqlplus_release = `$sqlplus_exe -S /nolog \@define.sql 2>&1`;
unlink "define.sql";
-	print $sqlplus_release;
-	if ($sqlplus_release =~ /^DEFINE _SQLPLUS_RELEASE = "(\d?\d)(\d\d)(\d\d)(\
d\d)(\d\d)"/) {
+	print $sqlplus_release; # the _SQLPLUS_RELEASE may not be on first line:
+	if ($sqlplus_release =~ /DEFINE _SQLPLUS_RELEASE = "(\d?\d)(\d\d)(\d\d)(\d
\d)(\d\d)"/) {
 $client_version_full
 = sprintf("%d.%d.%d.%d", $1, $2, $3, $4);
}
}

Modified: dbd-oracle/trunk/Oracle.pm
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/Oracle.pm	(original)
+++ dbd-oracle/trunk/Oracle.pm	Wed Dec 28 14:21:26 2005
@@ -203,6 +203,7 @@ my $ORACLE_ENV  = ($^O eq 'VMS') ? 'ORA_

# create a 'blank' dbh

+	$user = '' if not defined $user;
(my $user_only = $user) =~ s:/.*::;
my ($dbh, $dbh_inner) = DBI::_new_dbh($drh, {
'Name' => $dbname,

Modified: dbd-oracle/trunk/dbdimp.c
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/dbdimp.c	(original)
+++ dbd-oracle/trunk/dbdimp.c	Wed Dec 28 14:21:26 2005
@@ -164,10 +164,14 @@ oratype_bind_ok(int dbtype) /* It's a ty
case  2:	/* NVARCHAR2	*/
case  5:	/* STRING	*/
case  8:	/* LONG		*/
+    case 21:	/* BINARY FLOAT os-endian */
+    case 22:	/* BINARY DOUBLE os-endian */
case 23:	/* RAW		*/
case 24:	/* LONG RAW	*/
case 96:	/* CHAR		*/
case 97:	/* CHARZ	*/
+    case 100:	/* BINARY FLOAT oracle-endian */
+    case 101:	/* BINARY DOUBLE oracle-endian */
case 106:	/* MLSLABEL	*/
case 102:	/* SQLT_CUR	OCI 7 cursor variable	*/
case 112:	/* SQLT_CLOB / long	*/
@@ -421,7 +425,7 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_db
charsetid, ncharsetid, status );
if (status != OCI_SUCCESS) {
oci_error(dbh, NULL, status,
-                    "OCIEnvNlsCreate (check ORACLE_HOME and NLS settings, p
ermissions etc.)");
+                    "OCIEnvNlsCreate. Check ORACLE_HOME env var, NLS settin
gs, permissions, etc.");
return 0;
}

@@ -438,7 +442,7 @@ dbd_db_login6(SV *dbh, imp_dbh_t *imp_db
 OCIInitialize_log_st
at(init_mode, 0, 0,0,0, status);
if (status != OCI_SUCCESS) {
oci_error(dbh, NULL, status,
-		    "OCIInitialize. Check ORACLE_HOME and NLS settings etc.");
+		    "OCIInitialize. Check ORACLE_HOME env var, Oracle NLS settings, permi
ssions etc.");
return 0;
}

@@ -2120,6 +2124,15 @@  ora2sql_type(imp_fbh
_t* fbh) {
sql_fbh.dbtype = SQL_DECIMAL; /* better: SQL_NUMERIC */
}
break;
+#ifdef SQLT_IBDOUBLE
+    case SQLT_BDOUBLE:
+    case SQLT_BFLOAT:
+    case SQLT_IBDOUBLE:
+    case SQLT_IBFLOAT:
+               sql_fbh.dbtype = SQL_DOUBLE;
+               sql_fbh.prec   = 126;
+               break;
+#endif
case SQLT_CHR:  sql_fbh.dbtype = SQL_VARCHAR;       break;
case SQLT_LNG:  sql_fbh.dbtype = SQL_LONGVARCHAR;   break; /* long */
case SQLT_DAT:  sql_fbh.dbtype =  SQL_TYPE_TIMESTAMP;b
reak;

Modified: dbd-oracle/trunk/oci8.c
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/oci8.c	(original)
+++ dbd-oracle/trunk/oci8.c	Wed Dec 28 14:21:26 2005
@@ -1223,9 +1223,9 @@ dbd_describe(SV *h, imp_sth_t *imp_sth)
/* FALLTHRU */
case  96:				/* CHAR		*/
fbh->disize = fbh->dbsize;
-		fbh->prec   = fbh->disize;
if (CS_IS_UTF8(fbh->csid))
fbh->disize = fbh->dbsize * 4;
+		fbh->prec   = fbh->disize;
break;
case  23:				/* RAW		*/
fbh->disize = fbh->dbsize * 2;
@@ -1233,8 +1233,12 @@ dbd_describe(SV *h, imp_sth_t *imp_sth)
break;

case   2:				/* NUMBER	*/
+	case  21:				/* BINARY FLOAT os-endian	*/
+	case  22:				/* BINARY DOUBLE os-endian	*/
+	case 100:				/* BINARY FLOAT oracle-endian	*/
+	case 101:				/* BINARY DOUBLE oracle-endian	*/
fbh->disize = 130+38+3;		/* worst case	*/
-		avg_width = 4;     /* > approx +/- 1_000_000 ?  */
+		avg_width = 4;     /* NUMBER approx +/- 1_000_000 */
break;

case  12:				/* DATE		*/

Modified: dbd-oracle/trunk/t/10general.t
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/t/10general.t	(original)
+++ dbd-oracle/trunk/t/10general.t	Wed Dec 28 14:21:26 2005
@@ -4,9 +4,10 @@ use Test::More;

use DBI;
use Oraperl;
+use Config;
$| = 1;

-plan tests => 31;
+plan tests => 33;

my $dbuser = $ENV{ORACLE_USERID} || 'scott/tiger';
my $dbh = DBI-> connect('dbi:Oracle:
', $dbuser, '');
@@ -18,6 +19,14 @@ unless($dbh) {

my($sth, $p1, $p2, $tmp);

+SKIP: {
+	skip "not unix-like", 2 unless $Config{d_semctl};
+	# basic check that we can fork subprocesses and wait for the status
+	is system("false"), 1<<8, 'system false should return 256';
+	is system("true"),     0, 'system true should return 0';
+}
+
+
$sth = $dbh->prepare(q{
/* also test preparse doesn't get confused by ? :1 */
/* also test placeholder binding is case insensitive */

Modified: dbd-oracle/trunk/t/20select.t
 ====================
 ====================
 ====================
================
==
--- dbd-oracle/trunk/t/20select.t	(original)
+++ dbd-oracle/trunk/t/20select.t	Wed Dec 28 14:21:26 2005
@@ -53,8 +53,8 @@ my @test_sets = (
#	Normal  value 8 (to test 64KB threshold well)
my $sz = 8;

-my $tests = 2;
-my $tests_per_set = 14;
+my $tests = 3;
+my $tests_per_set = 11;
$tests += @test_sets * $tests_per_set;
print "1..$tests\n";

@@ -107,13 +107,6 @@ sub run_select_tests {
ok(0, $tmp->[2][1] =~ m/$data2/,
cdif($tmp->[2][1], $data2, "Len ".length($tmp->[2][1])) );

-  # 10/25/2005 lenio: adding tests around $sth->{PRECISION}:
-  # 1st column, an integer, should have PRECISION of 38
-  ok(0, $sth->{PRECISION}->[0] == 38);
-  # 2nd column, character type, should have PRECISION of 10
-  ok(0, $sth->{PRECISION}->[1] == 10);
-  # 3rd column, date type, should have PRECISION of 75
-  ok(0, $sth->{PRECISION}->[2] == 75);

} # end of run_select_tests


Report this thread to moderator Post Follow-up to this message
Old Post
timbo@cvs.perl.org
12-29-05 01:26 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Oracle PERL DBD archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:01 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006