Author: byterock
Date: Wed Jan 14 07:41:36 2009
New Revision: 12439
Removed:
dbd-oracle/branches/new_obj/
dbd-oracle/branches/utf8_ea/
dbd-oracle/branches/utf8_ea_2/
Modified:
dbd-oracle/branches/xml/MANIFEST
dbd-oracle/branches/xml/Makefile.PL
dbd-oracle/branches/xml/Oracle.h
dbd-oracle/branches/xml/Oracle.pm
dbd-oracle/branches/xml/Oracle.xs
dbd-oracle/branches/xml/dbdimp.h
dbd-oracle/branches/xml/oci.def
dbd-oracle/branches/xml/oci8.c
dbd-oracle/branches/xml/ocitrace.h
dbd-oracle/branches/xml/typemap
Log:
old junk I do not need
Modified: dbd-oracle/branches/xml/MANIFEST
==============================================================================
--- dbd-oracle/branches/xml/MANIFEST (original)
+++ dbd-oracle/branches/xml/MANIFEST Wed Jan 14 07:41:36 2009
@@ -10,7 +10,6 @@
lib/DBD/Oracle/GetInfo.pm
Makefile.PL
MANIFEST
-META.yml Module meta-data (added by MakeMaker)
mk.pm
mkta.pl
oci.def OCI.DLL export declarations
Modified: dbd-oracle/branches/xml/Makefile.PL
==============================================================================
--- dbd-oracle/branches/xml/Makefile.PL (original)
+++ dbd-oracle/branches/xml/Makefile.PL Wed Jan 14 07:41:36 2009
@@ -35,6 +35,7 @@
my $dbi_dir = dbd_dbi_dir();
my $dbi_arch_dir = dbd_dbi_arch_dir();
+my $debug = 1;
my $os = $^O;
my $so = $Config{so}; # typically 'so', 'dylib' on Darwin/OSX
my $osvers = $Config{osvers}; $osvers =~ s/^\s*(\d+\.\d+).*/$1/; # drop sub-sub-version: 2.5.1 -> 2.5
@@ -192,7 +193,11 @@
my $linkwith_msg = "";
my $need_ldlp_env;
+if ($debug) {print "os ='$os'\n";}
+
if ($os eq 'VMS') {
+ if ($debug) {print "VMS\n";}
+
my $OCIINCLUDE = join " ", vmsify("$OH/rdbms/"),
vmsify("$OH/rdbms/public"),
vmsify("$OH/rdbms/demo/"),
@@ -218,7 +223,8 @@
}
elsif (($os eq 'MSWin32') or ($os =~ /cygwin/i)) {
-
+ if ($debug) {print "MSWin32 or cygwin\n";}
+
my $OCIDIR = "";
find( sub {
print "Found $_ directory\n" if /^OCI\d*$/i;
@@ -290,6 +296,8 @@
elsif ($::opt_l and # use -l to enable this direct-link approach
@_=grep { m:/lib(cl(ie)?ntsh|oracle).\w+$:o } <$OH/lib/lib*>
) {
+ if ($debug) {print "Direct link with unix\n";}
+
# --- the simple modern way ---
foreach(@_) { s:\Q$OH/lib/::g }
print "Found direct-link candidates: @_\n";
@@ -370,6 +378,7 @@
}
else { # --- trawl the guts of Oracle's make files looking the how it wants to link
+ if ($debug) {print "Trawl guts of Oracle\n";}
#Lincoln: pick the right library path
check_ldlibpthname();
my $libdir = ora_libdir();
@@ -499,22 +508,31 @@
# (on my system, using gcc, the flags can't be removed entirely;
# instead, they have to be converted to the ld-compatible equivs.
# -- Sweth (<[email protected]>)
+ if ($debug) {print "Sweth's funny mods linkwith=$linkwith\n";}
+
if ( $Config{'cc'} eq 'cc' ) {
+ if ($debug) {print "Have cc?\n";}
$linkwith =~ s/-Wl,\+[sn]//g;
} elsif ( $Config{'gccversion'} ) {
$linkwith =~ s/-Wl,(\+[sn])/$1/g;
};
+ if ($debug) {print "Now linkwith is ".$linkwith."\n";}
+
# Oracle 8.0.5 drags in these which also cause link errors:
# this produces a good link with the 32bit version of oracle
# (64bit version of 8.0.5 fails to link
# someone else will have to hack that one out)
$linkwith =~ s/\+D[AS]2\.0[W]* / /g;
+ if ($debug) {print "Now linkwith is $linkwith\n";}
+
#Lincoln: pick the right library path
my $libdir = ora_libdir();
$linkwith =~ s!/lib\b!/$libdir!g;
+if ($debug) {print "Now linkwith is $linkwith\n";}
+
# A number of folks have had to add this library to resolve
# undefined symbol errors reported at runtime by ld.sl (the
# library loader) libqsmashr defines LhrStringInsert()...
@@ -524,6 +542,8 @@
$linkwith =~ s/$/ -lqsmashr/ if ( $linkwith !~ m/-lqsmshr/ );
}
+ if ($debug) {print "Now linkwith is $linkwith\n";}
+
if ( ($Config{'libswanted'} !~ m/\bcl\b/) or $Config{'libswanted'} !~ m/\bpthread\b/ ) {
print "WARNING: Oracle is built with multi-threading libraries\n"
. " You will most likely need to rebuild perl from sources\n"
@@ -537,6 +557,8 @@
" seems to conflict with -l:libcl.a\n" ;
$linkwith =~ s/\s*-lcl\b//g;
}
+if ($debug) {print "Now linkwith is $linkwith\n";}
+
# Lincoln: Jay Strauss's Oracle 8.1.6 fix... I did this manually
# when I still had 8.1.6 to deal with (its in the README):
#
@@ -556,6 +578,7 @@
#
# Jay: Add Librarys where one gets Unresolved symbols
#
+
if ( ( $osvers >= 11 and $client_version_full =~ /^8\.1\.6/ )
or ( $osvers >= 11 and $OH =~ m,/8\.1\.6, ) ) {
my @extraLib = qw[libqsmashr.sl libclntsh.sl];
@@ -566,11 +589,13 @@
}
}
}
+if ($debug) {print "Now linkwith is $linkwith\n";}
if ($osvers >= 11 and $linkwith =~ m/-l:libcl.a/) {
print "WARNING: stripping -l:libcl.a from liblist (conflict with ld looking for shared libs)\n";
$linkwith =~ s/\s*-l:libcl.a\b//g;
}
+if ($debug) {print "Now linkwith is $linkwith\n";}
#lincoln: this is bringing back everything we thought we removed... (like libcl.a)
# I wonder if this should targetted less specifically than only HPUX 11
@@ -583,6 +608,7 @@
" compiled with +z or +Z (PIC) causing link to fail.\n",
" Furthermore, we should have already grabbed these libraries\n";;
}
+if ($debug) {print "Now linkwith is $linkwith\n";}
my $ccf = join " ", map { $_ || '' } @Config{qw(ccflags ccldflags cccdlflags)};
if ($Config{cc} =~ /gcc/i) {
@@ -601,18 +627,22 @@
if ($::opt_b) { # The simple approach
+ if ($debug) {print "The simple approach\n";}
+
$opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g $linkwith" };
$linkwith_msg = "OTHERLDFLAGS = $linkwith [from '$build_target' rule]";
}
else { # the not-so-simple approach!
# get a cut down $linkwith to pass to MakeMaker liblist
my $linkwith_s = expand_mkvars($linkwith, 1, 1);
+if ($debug) {print "Now linkwith_s is $linkwith_s\n";}
# convert "/full/path/libFOO.a" into "-L/full/path -lFOO"
# to cater for lack of smarts in MakeMaker / Liblist
# which ignores /foo/bar.a entries!
my $lib_ext_re = "(a|$Config{dlext}|$Config{so})";
$linkwith_s =~ s!(\S+)/lib(\w+)\.($lib_ext_re)\b!-L$1 -l$2!g;
+if ($debug) {print "Now linkwith_s is $linkwith_s\n";}
# Platform specific fix-ups:
# delete problematic crt?.o on solaris
@@ -621,6 +651,9 @@
# this kind of stuff should be in a ./hints/* file:
$linkwith_s .= " -lc" if $Config{osname} eq 'dynixptx'
or $Config{archname} =~ /-pc-sco3\.2v5/;
+
+if ($debug) {print "Now linkwith_s is $linkwith_s\n";}
+
if ($os eq 'solaris' and $linkwith_s =~ /-lthread/
and $osvers >= 2.3 and $osvers <= 2.6
) {
@@ -628,6 +661,7 @@
print "Deleting -lthread from link list as a possible workround ($osvers).\n";
$linkwith_s =~ s/\s*-lthread\b/ /g;
}
+if ($debug) {print "Now linkwith_s is $linkwith_s\n";}
# extract object files, keep for use later
my @linkwith_o;
@@ -696,6 +730,8 @@
# Since the # .a libs that Oracle supplies contain non-PIC object
# files, we sadly have to build static on HP-UX 9 :(
if ($os eq 'hpux') {
+if ($debug) {print "HP-UX 9 cannot link test\n";}
+
if ($osvers < 10) {
print "WARNING: Forced to build static not dynamic on $os $osvers.$BELL\n";
$opts{LINKTYPE} = 'static';
@@ -809,6 +845,8 @@
if ($os eq 'VMS') { # sanity check VMS logical names
sub search_in_search_list {
+ if ($debug) {print "subroutine that searches list arg1 for item arg2\n";}
+
# subroutine that searches list arg1 for item arg2
my ($search_list_name , $logical) = @_ ;
$search_list_name =~ s/;// ;
@@ -1126,6 +1164,7 @@
);
my %edit; @edit{@edit} = ('$_ = ""') x @edit;
+
$edit{ORA_NLS} = $edit{ORA_NLS33} = $edit{ORA_NLS32} = q{
print "Deleting $_\n",
" because it is not already set in the environment\n",
Modified: dbd-oracle/branches/xml/Oracle.h
==============================================================================
--- dbd-oracle/branches/xml/Oracle.h (original)
+++ dbd-oracle/branches/xml/Oracle.h Wed Jan 14 07:41:36 2009
@@ -39,6 +39,7 @@
#include <ocidfn.h>
#include <orid.h>
#include <ori.h>
+
/* ------ end of Oracle include files ------ */
@@ -130,4 +131,8 @@
sb4 ind, OCIXMLType **retInstance _*/);
+sword OCIXMLTypeExists(/*_ OCIError *errhp, OCIXMLType *doc,
+ OraText *xpathexpr, ub4 xpathexpr_Len,
+ OraText *nsmap, ub4 nsmap_Len,
+ boolean *retval _*/);
/* end of Oracle.h */
Modified: dbd-oracle/branches/xml/Oracle.pm
==============================================================================
--- dbd-oracle/branches/xml/Oracle.pm (original)
+++ dbd-oracle/branches/xml/Oracle.pm Wed Jan 14 07:41:36 2009
@@ -80,6 +80,7 @@
DBD::Oracle::st->install_method("ora_ping");
DBD::Oracle::st->install_method("ora_stmt_type_name");
DBD::Oracle::st->install_method("ora_stmt_type");
+ DBD::Oracle::db->install_method("ora_xml_node_exists");
$drh;
}
@@ -993,7 +994,7 @@
+---------------------+----+-------------+---------+------+--------+
| 1.20 | N | N | N | Y | Y |
+---------------------+----+-------------+---------+------+--------+
- | 1.21 | N | N | N | Y | Y |
+ | 1.21 | N | N | N | N | Y |
+---------------------+----+-------------+---------+------+--------+
| 1.22 | N | N | N | N | Y |
+---------------------+----+-------------+---------+------+--------+
Modified: dbd-oracle/branches/xml/Oracle.xs
==============================================================================
--- dbd-oracle/branches/xml/Oracle.xs (original)
+++ dbd-oracle/branches/xml/Oracle.xs Wed Jan 14 07:41:36 2009
@@ -95,6 +95,7 @@
INCLUDE: Oracle.xsi
MODULE = DBD::Oracle PACKAGE = DBD::Oracle::st
+MODULE = DBD::Oracle PACKAGE = DBD::Oracle::db
void ora_stmt_type(sth)
SV * sth
@@ -179,6 +180,7 @@
? &sv_yes : &sv_no;
}
+
void
ora_fetch(sth)
SV * sth
@@ -256,7 +258,6 @@
ST(0) = dbd_st_cancel(sth, imp_sth) ? &sv_yes : &sv_no;
-MODULE = DBD::Oracle PACKAGE = DBD::Oracle::db
void
@@ -292,6 +293,18 @@
ST(0) = ora_db_reauthenticate(dbh, imp_dbh, uid, pwd) ? &sv_yes : &sv_no;
void
+ora_xml_node_exists(dbh, xml,node_name,node_value)
+ SV *dbh
+ OCIXMLType *xml
+ SV *node_name
+ SV *node_value
+ PREINIT:
+ D_imp_dbh(dbh);
+ CODE:
+ ST(0) = ora_node_exists(dbh,imp_dbh,xml,node_name,node_value) ? &sv_yes : &sv_no;
+
+
+void
ora_lob_write(dbh, locator, offset, data)
SV *dbh
OCILobLocator *locator
@@ -399,6 +412,9 @@
ST(0) = &sv_yes;
}
+
+
+
void
ora_lob_read(dbh, locator, offset, length)
SV *dbh
Modified: dbd-oracle/branches/xml/dbdimp.h
==============================================================================
--- dbd-oracle/branches/xml/dbdimp.h (original)
+++ dbd-oracle/branches/xml/dbdimp.h Wed Jan 14 07:41:36 2009
@@ -286,6 +286,7 @@
fb_ary_t *fb_ary_cb_alloc _((ub4 piece_size,ub4 max_len, int size));
int ora_db_reauthenticate _((SV *dbh, imp_dbh_t *imp_dbh, char *uid, char *pwd));
+int ora_node_exists _((SV *dbh, imp_dbh_t *imp_dbh,OCIXMLType *xml, char *node_name, char *node_value));
void dbd_phs_sv_complete _((phs_t *phs, SV *sv, I32 debug));
void dbd_phs_avsv_complete _((phs_t *phs, I32 index, I32 debug));
@@ -315,7 +316,6 @@
SV *tuples_status, SV *columns, ub4 exe_count));
-SV * ora_create_xml _((SV *dbh, char *source));
void ora_free_lob_refetch _((SV *sth, imp_sth_t *imp_sth));
void dbd_phs_avsv_complete _((phs_t *phs, I32 index, I32 debug));
Modified: dbd-oracle/branches/xml/oci.def
==============================================================================
--- dbd-oracle/branches/xml/oci.def (original)
+++ dbd-oracle/branches/xml/oci.def Wed Jan 14 07:41:36 2009
@@ -378,6 +378,7 @@
OCILobLocatorAssign
OCILobCreateTemporary
OCIXMLTypeCreateFromSrc
+OCIXMLTypeExists
OCIDateTimeToText
OCIIntervalToText
OCIDateTimeGetTimeZoneOffset
Modified: dbd-oracle/branches/xml/oci8.c
==============================================================================
--- dbd-oracle/branches/xml/oci8.c (original)
+++ dbd-oracle/branches/xml/oci8.c Wed Jan 14 07:41:36 2009
@@ -3240,7 +3240,19 @@
return OCI_CRED_RDBMS;
}
+int
+ora_node_exists(SV *dbh, imp_dbh_t *imp_dbh,OCIXMLType *xml, char *node_name, char *node_value)
+{
+ dTHX;
+ sword status;
+ boolean found;
+ STRLEN node_name_len;
+ STRLEN node_value_len;
+ OCIXMLTypeExists_log_stat(imp_dbh->errhp,xml,(CONST oratext**)&node_name,strlen(node_name),node_value,strlen(node_value),found,status);
+
+return 1;
+}
int
ora_db_reauthenticate(SV *dbh, imp_dbh_t *imp_dbh, char *uid, char *pwd)
{
Modified: dbd-oracle/branches/xml/ocitrace.h
==============================================================================
--- dbd-oracle/branches/xml/ocitrace.h (original)
+++ dbd-oracle/branches/xml/ocitrace.h Wed Jan 14 07:41:36 2009
@@ -36,13 +36,20 @@
If done well the log will read like a compilable program.
*/
+#define OCIXMLTypeExists_log_stat(errhp,xmldoc,nn,nnl,nv,nvl,b,stat)\
+ stat =OCIXMLTypeExists(errhp,xmldoc,nn.nnl,nv,nvl,b);\
+ (DBD_OCI_TRACEON) \
+ ? PerlIO_printf(DBD_OCI_TRACEFP,\
+ "%sOCIXMLTypeExists_log_stat(%s,%s)=%s\n",\
+ OciTp, nn,nv,oci_status_name(stat)),stat \
+ : stat
#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
#define OCIStmtGetPieceInfo_log_stat(stmhp,errhp,hdlptr,hdltyp,in_out,iter,idx,piece,stat)\
Modified: dbd-oracle/branches/xml/typemap
==============================================================================
--- dbd-oracle/branches/xml/typemap (original)
+++ dbd-oracle/branches/xml/typemap Wed Jan 14 07:41:36 2009
@@ -1 +1,2 @@
-OCILobLocator * T_PTROBJ
+OCILobLocator * T_PTROBJ
+OCIXMLType * T_PTROBJ
\ No newline at end of file
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.