Author: byterock
Date: Tue Jan 19 11:13:29 2010
New Revision: 13747

Added:
   dbd-oracle/branches/DBDOracle8/Oracle8.h
      - copied, changed from r13746, /dbd-oracle/branches/DBDOracle8/Oracle.h
   dbd-oracle/branches/DBDOracle8/dbdimp8.c
      - copied, changed from r13746, /dbd-oracle/branches/DBDOracle8/dbdimp.c
   dbd-oracle/branches/DBDOracle8/dbdimp8.h
      - copied, changed from r13746, /dbd-oracle/branches/DBDOracle8/dbdimp.h
   dbd-oracle/branches/DBDOracle8/dbivport8.h
      - copied unchanged from r13746, /dbd-oracle/branches/DBDOracle8/dbivport.h
   dbd-oracle/branches/DBDOracle8/oci8.def
      - copied unchanged from r13746, /dbd-oracle/branches/DBDOracle8/oci.def
   dbd-oracle/branches/DBDOracle8/oci88.c
      - copied, changed from r13746, /dbd-oracle/branches/DBDOracle8/oci8.c
   dbd-oracle/branches/DBDOracle8/ocitrace8.h
      - copied unchanged from r13746, /dbd-oracle/branches/DBDOracle8/ocitrace.h
   dbd-oracle/branches/DBDOracle8/ora_explain8
      - copied unchanged from r13746, 
/dbd-oracle/branches/DBDOracle8/ora_explain
   dbd-oracle/branches/DBDOracle8/ora_explain8.PL
      - copied unchanged from r13746, 
/dbd-oracle/branches/DBDOracle8/ora_explain.PL
Removed:
   dbd-oracle/branches/DBDOracle8/Oracle.bs
   dbd-oracle/branches/DBDOracle8/Oracle.c
   dbd-oracle/branches/DBDOracle8/Oracle.def
   dbd-oracle/branches/DBDOracle8/Oracle.h
   dbd-oracle/branches/DBDOracle8/dbdimp.c
   dbd-oracle/branches/DBDOracle8/dbdimp.h
   dbd-oracle/branches/DBDOracle8/dbivport.h
   dbd-oracle/branches/DBDOracle8/oci.def
   dbd-oracle/branches/DBDOracle8/oci8.c
   dbd-oracle/branches/DBDOracle8/ocitrace.h
   dbd-oracle/branches/DBDOracle8/ora_explain
   dbd-oracle/branches/DBDOracle8/ora_explain.PL
Modified:
   dbd-oracle/branches/DBDOracle8/MANIFEST
   dbd-oracle/branches/DBDOracle8/Makefile.PL
   dbd-oracle/branches/DBDOracle8/Oracle8.xs
   dbd-oracle/branches/DBDOracle8/Oracle8.xsi

Log:
lets rename all of the files so they do not crunch each other

Modified: dbd-oracle/branches/DBDOracle8/MANIFEST
==============================================================================
--- dbd-oracle/branches/DBDOracle8/MANIFEST     (original)
+++ dbd-oracle/branches/DBDOracle8/MANIFEST     Tue Jan 19 11:13:29 2010
@@ -33,19 +33,19 @@
 README.win32.txt

 README.wingcc.txt                      Notes about building with mingw32 and 
cygwin32

 Todo

-dbdimp.c

-dbdimp.h

-dbivport.h

+dbdimp8.c

+dbdimp8.h

+dbivport8.h

 hints/dgux.pl

 hints/macos_bundle.syms

 hints/macos_lib.syms

 hints/macos_syms.pl

 hints/svr4.pl

 lib/DBD/Oracle8/GetInfo.pm

-oci.def                                OCI.DLL export declarations

-oci8.c

-ocitrace.h

-ora_explain.PL

+oci8.def                               OCI.DLL export declarations

+oci88.c

+ocitrace8.h

+ora_explain8.PL

 oraperl8.ph                    Old oraperl file included for completeness of 
emulation

 t/01base.t

 t/10general.t


Modified: dbd-oracle/branches/DBDOracle8/Makefile.PL
==============================================================================
--- dbd-oracle/branches/DBDOracle8/Makefile.PL  (original)
+++ dbd-oracle/branches/DBDOracle8/Makefile.PL  Tue Jan 19 11:13:29 2010
@@ -45,11 +45,11 @@
     NAME => 'DBD::Oracle8',

     VERSION_FROM => 'Oracle8.pm',

     PREREQ_PM => { "Test::Simple" => 0.40 }, # actually Test::More pkg in T::S 
dist

-    EXE_FILES => [ "ora_explain$exe_ext" ],

+    EXE_FILES => [ "ora_explain8$exe_ext" ],

     OBJECT => '$(O_FILES)',

     DEFINE => '',

     DIR  => [],

-    clean => { FILES   => 'xstmp.c Oracle8.xsi dll.base dll.exp sqlnet.log 
libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*' },

+    clean => { FILES   => 'xstmp.c Oracle8.xsi dll.base dll.exp sqlnet.log 
libOracle.def ora_explain8 mk.pm DBD_ORA_OBJ.*' },

     dist  => {

        DIST_DEFAULT    => 'clean distcheck disttest tardist',

        PREOP           => '$(MAKE) -f Makefile.old distdir',

@@ -1619,7 +1619,7 @@
        }

        close main::MK_PM or die "Error closing mk.pm: $!\n";

 

-       foreach (qw(mk.pm Oracle.h dbdimp.h ocitrace.h)) {

+       foreach (qw(mk.pm Oracle8.h dbdimp8.h ocitrace8.h)) {

            $self->{PM}->{$_} = '$(INST_ARCHAUTODIR)/'.$_;

        }

 


Copied: dbd-oracle/branches/DBDOracle8/Oracle8.h (from r13746, 
/dbd-oracle/branches/DBDOracle8/Oracle.h)
==============================================================================
--- /dbd-oracle/branches/DBDOracle8/Oracle.h    (original)
+++ dbd-oracle/branches/DBDOracle8/Oracle8.h    Tue Jan 19 11:13:29 2010
@@ -12,14 +12,14 @@
 

 #include <DBIXS.h>             /* installed by the DBI module  */

 

-#include "dbdimp.h"

+#include "dbdimp8.h"

 

 #include "dbivport.h"

 

 #include <dbd_xsh.h>           /* installed by the DBI module  */

 

-/* These prototypes are for dbdimp.c funcs used in the XS file          */ 

-/* These names are #defined to driver specific names in dbdimp.h        */ 

+/* These prototypes are for dbdimp.c funcs used in the XS file          */

+/* These names are #defined to driver specific names in dbdimp8.h        */

 

 void   dbd_init _((dbistate_t *dbistate));

 void   dbd_init_oci_drh _((imp_drh_t * imp_drh));

@@ -56,4 +56,4 @@
 ub4    ora_blob_read_mb_piece _((SV *sth, imp_sth_t *imp_sth, imp_fbh_t *fbh, 
SV *dest_sv,

                   long offset, UV len, long destoffset));

 

-/* end of Oracle.h */

+/* end of Oracle8.h */


Modified: dbd-oracle/branches/DBDOracle8/Oracle8.xs
==============================================================================
--- dbd-oracle/branches/DBDOracle8/Oracle8.xs   (original)
+++ dbd-oracle/branches/DBDOracle8/Oracle8.xs   Tue Jan 19 11:13:29 2010
@@ -1,4 +1,4 @@
-#include "Oracle.h"

+#include "Oracle8.h"

 

 DBISTATE_DECLARE;

 


Modified: dbd-oracle/branches/DBDOracle8/Oracle8.xsi
==============================================================================
--- dbd-oracle/branches/DBDOracle8/Oracle8.xsi  (original)
+++ dbd-oracle/branches/DBDOracle8/Oracle8.xsi  Tue Jan 19 11:13:29 2010
@@ -1,4 +1,4 @@
-#  $Id: Driver.xst,v 11.14 2003/08/22 21:23:39 timbo Exp $

+#  $Id: Driver.xst 2488 2006-02-07 22:24:43Z timbo $

 #  Copyright (c) 1997-2002  Tim Bunce  Ireland

 #  Copyright (c) 2002       Jonathan Leffler

 #

@@ -146,6 +146,7 @@
     ALIAS:

        selectrow_array = 1

     PREINIT:

+    int is_selectrow_array = (ix == 1);

     imp_sth_t *imp_sth;

     SV *sth;

     AV *row_av;

@@ -156,20 +157,21 @@
     else {

        /* --- prepare --- */

        sth = dbixst_bounce_method("prepare", 3);

-       if (!SvROK(sth))

-           XSRETURN_UNDEF;

+       if (!SvROK(sth)) {

+           if (is_selectrow_array) { XSRETURN_EMPTY; } else { XSRETURN_UNDEF; }

+       }

     }

     imp_sth = (imp_sth_t*)(DBIh_COM(sth));

     /* --- bind_param --- */

     if (items > 3) {   /* need to bind params before execute */

        if (!dbdxst_bind_params(sth, imp_sth, items-2, ax+2) ) {

-           XSRETURN_UNDEF;

+           if (is_selectrow_array) { XSRETURN_EMPTY; } else { XSRETURN_UNDEF; }

        }

     }

     /* --- execute --- */

     DBIc_ROW_COUNT(imp_sth) = 0;

     if ( dbd_st_execute(sth, imp_sth) <= -2 ) {        /* -2 == error */

-        XSRETURN_UNDEF;

+       if (is_selectrow_array) { XSRETURN_EMPTY; } else { XSRETURN_UNDEF; }

     }

     /* --- fetchrow_arrayref --- */

     row_av = dbd_st_fetch(sth, imp_sth);

@@ -177,7 +179,7 @@
        if (GIMME == G_SCALAR)

            PUSHs(&PL_sv_undef);

     }

-    else if (ix == 1) { /* selectrow_array */

+    else if (is_selectrow_array) {

        int i;

        int num_fields = AvFILL(row_av)+1;

        if (GIMME == G_SCALAR)

@@ -335,18 +337,27 @@
        }

         if (DBIc_IADESTROY(imp_dbh)) {           /* want's ineffective destroy 
*/

             DBIc_ACTIVE_off(imp_dbh);

+           if (DBIc_DBISTATE(imp_dbh)->debug)

+                PerlIO_printf(DBIc_LOGPIO(imp_dbh), "         DESTROY %s 
skipped due to InactiveDestroy\n", SvPV_nolen(dbh));

         }

        if (DBIc_ACTIVE(imp_dbh)) {

-           /* The application has not explicitly disconnected. That's bad.     
*/

-           /* To ensure integrity we *must* issue a rollback. This will be     
*/

-           /* harmless if the application has issued a commit. If it hasn't    
*/

-           /* then it'll ensure integrity. Consider a Ctrl-C killing perl      
*/

-           /* between two statements that must be executed as a transaction.   
*/

-           /* Perl will call DESTROY on the dbh and, if we don't rollback,     
*/

-           /* the server may automatically commit! Bham! Corrupt database!     
*/

            if (!DBIc_has(imp_dbh,DBIcf_AutoCommit)) {

+               /* Application is using transactions and hasn't explicitly 
disconnected.

+                   Some databases will automatically commit on graceful 
disconnect.

+                   Since we're about to gracefully disconnect as part of the 
DESTROY

+                   we want to be sure we're not about to implicitly commit 
changes

+                   that are incomplete and should be rolled back. (The DESTROY 
may

+                   be due to a RaiseError, for example.) So we rollback here.

+                   This will be harmless if the application has issued a 
commit,

+                   XXX Could add an attribute flag to indicate that the driver

+                   doesn't have this problem. Patches welcome.

+                   XXX or could just move the DBIc_is(imp_dbh, DBIcf_Executed) 
test

+                   to cover the rollback as well. That just needs sanity 
checking

+                   that DBIcf_Executed is set by any/all possible way to 
execute a

+                   statement that might start a transaction.

+               */

                if (DBIc_WARN(imp_dbh)

-               &&  DBIc_is(imp_dbh, DBIcf_Executed)

+               &&  DBIc_is(imp_dbh, DBIcf_Executed) /* has not just called 
commit/rollback */

                && (!dirty || DBIc_DBISTATE(imp_dbh)->debug >= 3)

                )

                     warn("Issuing rollback() for database handle being 
DESTROY'd without explicit disconnect()");

@@ -366,9 +377,15 @@
     SV * h

     CODE:

     D_imp_xxh(h);

-    ST(0) = (dbd_take_imp_data(h, imp_xxh, NULL))

+    /* dbd_take_imp_data() returns &sv_no (or other defined but false value)

+     * to indicate "preparations complete, now call SUPER::take_imp_data" for 
me.

+     * Anything else is returned to the caller via sv_2mortal(sv), typically 
that

+     * would be &sv_undef for error or an SV holding the imp_data.

+     */

+    SV *sv = dbd_take_imp_data(h, imp_xxh, NULL);

+    ST(0) = (SvOK(sv) && !SvTRUE(sv))

        ? dbixst_bounce_method("DBD::Oracle8::db::SUPER::take_imp_data", items)

-       : &sv_undef;

+       : sv_2mortal(sv);

 

 #endif

 

@@ -405,13 +422,17 @@
 void

 _prepare(sth, statement, attribs=Nullsv)

     SV *       sth

-    char *     statement

+    SV *       statement

     SV *       attribs

     CODE:

     {

     D_imp_sth(sth);

     DBD_ATTRIBS_CHECK("_prepare", sth, attribs);

-    ST(0) = dbd_st_prepare(sth, imp_sth, statement, attribs) ? &sv_yes : 
&sv_no;

+#ifdef dbd_st_prepare_sv

+    ST(0) = dbd_st_prepare_sv(sth, imp_sth, statement, attribs) ? &sv_yes : 
&sv_no;

+#else

+    ST(0) = dbd_st_prepare(sth, imp_sth, SvPV_nolen(statement), attribs) ? 
&sv_yes : &sv_no;

+#endif

     }

 

 

@@ -709,6 +730,8 @@
     else {

         if (DBIc_IADESTROY(imp_sth)) { /* want's ineffective destroy    */

             DBIc_ACTIVE_off(imp_sth);

+           if (DBIc_DBISTATE(imp_sth)->debug)

+                PerlIO_printf(DBIc_LOGPIO(imp_sth), "         DESTROY %s 
skipped due to InactiveDestroy\n", SvPV_nolen(sth));

         }

        if (DBIc_ACTIVE(imp_sth)) {

            D_imp_dbh_from_sth;

@@ -726,4 +749,4 @@
        dbd_st_destroy(sth, imp_sth);

     }

 

-# end of Oracle.xst

+# end of Oracle8.xst


Copied: dbd-oracle/branches/DBDOracle8/dbdimp8.c (from r13746, 
/dbd-oracle/branches/DBDOracle8/dbdimp.c)
==============================================================================
--- /dbd-oracle/branches/DBDOracle8/dbdimp.c    (original)
+++ dbd-oracle/branches/DBDOracle8/dbdimp8.c    Tue Jan 19 11:13:29 2010
@@ -17,7 +17,7 @@
 #include "w32api/winbase.h"

 #endif /* __CYGWIN32__ */

 

-#include "Oracle.h"

+#include "Oracle8.h"

 

 #if defined(CAN_USE_PRO_C)

 /* #include <sql2oci.h>     for SQL_SINGLE_RCTX but causes clashes */


Copied: dbd-oracle/branches/DBDOracle8/dbdimp8.h (from r13746, 
/dbd-oracle/branches/DBDOracle8/dbdimp.h)
==============================================================================
--- /dbd-oracle/branches/DBDOracle8/dbdimp.h    (original)
+++ dbd-oracle/branches/DBDOracle8/dbdimp8.h    Tue Jan 19 11:13:29 2010
@@ -278,7 +278,7 @@
 void * oci_st_handle(imp_sth_t *imp_sth, int handle_type, int flags);

 void fb_ary_free(fb_ary_t *fb_ary);

 

-#include "ocitrace.h"

+#include "ocitrace8.h"

 

 

 


Copied: dbd-oracle/branches/DBDOracle8/oci88.c (from r13746, 
/dbd-oracle/branches/DBDOracle8/oci8.c)
==============================================================================
--- /dbd-oracle/branches/DBDOracle8/oci8.c      (original)
+++ dbd-oracle/branches/DBDOracle8/oci88.c      Tue Jan 19 11:13:29 2010
@@ -8,7 +8,7 @@
 

 */

 

-#include "Oracle.h"

+#include "Oracle8.h"

 

 #ifdef UTF8_SUPPORT

 #include <utf8.h>

Reply via email to