Home > Archive > Oracle PERL DBD > June 2005 > [svn:dbd-oracle] rev 960 - dbd-oracle/trunk









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [svn:dbd-oracle] rev 960 - dbd-oracle/trunk
timbo@cvs.perl.org

2005-06-03, 8:27 pm

Author: timbo
Date: Wed Apr 6 16:43:22 2005
New Revision: 960

Modified:
dbd-oracle/trunk/Changes
dbd-oracle/trunk/Makefile.PL
dbd-oracle/trunk/Oracle.pm
dbd-oracle/trunk/dbdimp.c
Log:
Fixed csform setting for some UTF8 cases.
Changed Makefile.PL to improve build rule detection.
Added "Trailing Spaces" section to docs thanks to Michael A Chase.


Modified: dbd-oracle/trunk/Changes
====================
====================
====================
==================
--- dbd-oracle/trunk/Changes (original)
+++ dbd-oracle/trunk/Changes Wed Apr 6 16:43:22 2005
@@ -1,12 +1,15 @@
=head1 Changes in DBD-Oracle 1.17 (svn rev NNN)

Fixed csform setting for Oracle 8.0.
+ Fixed csform setting for some UTF8 cases.

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 files.
+ Changed Makefile.PL to improve build rule detection.
Changed README.vms re logical name tables thanks to Jakob Snoer.

Added VMS logical name checks to Makefile.PL thanks to Jakob Snoer.
+ Added "Trailing Spaces" section to docs thanks to Michael A Chase.

=head1 Changes in DBD-Oracle 1.16 (svn rev 515) 22nd October 2004


Modified: dbd-oracle/trunk/Makefile.PL
====================
====================
====================
==================
--- dbd-oracle/trunk/Makefile.PL (original)
+++ dbd-oracle/trunk/Makefile.PL Wed Apr 6 16:43:22 2005
@@ -362,6 +362,7 @@
# remove any echo's as the following line should be the result of the echo
next if $line =~ /^\s*\S*echo\s+/;
next if $line =~ /^\s*\S*make\s+/; # remove recursive calls to make
+ next if $line =~ /^\s*\S*make:/; # remove message from make
next if $line =~ /^\s*$/; # remove any blank lines
push @filtered_cmds, $line;
}
@@ -560,7 +561,7 @@
}

my $OCIINCLUDE = expand_mkvars($MK{INCLUDE} || '', 0, 0);
- $OCIINCLUDE .= " -I$OH/rdbms/demo";
+ # $OCIINCLUDE .= " -I$OH/rdbms/demo";
my @h_dirs = find_headers();
my $inc = join " ", map { "-I$OH/$_" } @h_dirs;
$opts{INC} = "$inc $OCIINCLUDE -I$dbi_arch_dir";

Modified: dbd-oracle/trunk/Oracle.pm
====================
====================
====================
==================
--- dbd-oracle/trunk/Oracle.pm (original)
+++ dbd-oracle/trunk/Oracle.pm Wed Apr 6 16:43:22 2005
@@ -1353,6 +1353,29 @@

=back

+=head2 Trailing Spaces
+
+The Oracle strips trailing spaces from VARCHAR placeholder
+values and uses Nonpadded Comparison Semantics with the result.
+This causes trouble if the spaces are needed for
+comparison with a CHAR value or to prevent the value from
+becoming '' which Oracle treats as NULL.
+Look for Blank-padded Comparison Semantics and Nonpadded
+Comparison Semantics in Oracle's SQL Reference or Server
+SQL Reference for more details.
+
+Please remember that using spaces as a value or at the end of
+a value makes visually distinguishing values with different
+numbers of spaces difficult and should be avoided.
+
+To preserve trailing spaces in placeholder values, either change
+the default placeholder type with L</ora_ph_type> or the placeholder
+type for a particular call to L<DBI/bind> or L<DBI/bind_param_inout>
+with L</ora_type> or C<TYPE>.
+Using L<ORA_CHAR> with L<ora_type> or C<SQL_CHAR> with C<TYPE>
+allows the placeholder to be used with Padded Comparison Semantics
+if the value it is being compared to is a CHAR, NCHAR, or literal.
+
=head1 Metadata

=head2 C<get_info()>

Modified: dbd-oracle/trunk/dbdimp.c
====================
====================
====================
==================
--- dbd-oracle/trunk/dbdimp.c (original)
+++ dbd-oracle/trunk/dbdimp.c Wed Apr 6 16:43:22 2005
@@ -46,7 +46,6 @@
ub2 al16utf16_csid = 2000;

static int ora_login_nomsg; /* don't fetch real login errmsg if true */
-static int ora_sigchld_restart = 1;

typedef struct sql_fbh_st sql_fbh_t;
struct sql_fbh_st {
@@ -110,8 +109,6 @@

if ((p=getenv(" DBD_ORACLE_LOGIN_NOM
SG")))
ora_login_nomsg = atoi(p);
- if ((p=getenv("DBD_ORACLE_SIGCHLD")))
- ora_sigchld_restart
= atoi(p);
}


@@ -1326,12 +1323,15 @@

csform = phs->csform;

- if (SvUTF8(phs->sv) && !csform) {
- /* try to default the csform to avoid translation through non-unicode */
- /* given Oracle policy that NCHAR==Unicode this should be fine */
- csform = SQLCS_NCHAR;
- /* in some cases this isn't right for LOBs but those are rare and */
- /* the application can use an explicit ora_csform bind attribute. */
+ if (!csform && SvUTF8(phs->sv)) {
+ /* try to default csform to avoid translation through non-unicode */
+ if (CSFORM_IMPLIES_UTF8
(SQLCS_IMPLICIT)) /* prefer implicit */
+ csform = SQLCS_IMPLICIT;
+ else if (CSFORM_IMPLIES_UTF8
(SQLCS_NCHAR))
+ csform = SQLCS_NCHAR;
+ else if (trace_level) /* leave csform == 0 */
+ PerlIO_printf(DBILOG
FP, " rebinding %s with UTF8 value but neither CHAR nor NCHAR are unicode\n",
+ phs->name);
}

if (csform) {
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com