Subject: | Oracle 9.2.0.0 fails a test in ph_types.t |
Assuming that ORA_OCI() gets set correctly when compiling against 9.2, the attached patch will work. I also tried this in SQL*Plus and was able to insert a trailing space into a VARCHAR2. (I replicated the test in ph_types.t).
I did not test my patch as I installed DBD::Oracle 1.14 by setting the chops_spaces value in %test_info to 0. When I did that, everything installed fine. However, I didn't think that my solution was the best for the module, so I figured ORA_OCI should do the trick.
I'm running Perl5.8.0 for Solaris2.9 going against the full Oracle build for 9.2. (I did not run into this issue, surprisingly, on Redhat9 running Perl 5.8.2, but I built against Oracle 9.1 there ...)
112,114c112,120
< if (!$ok && ORA_OCI==7 && $name eq 'VARCHAR2') {
< warn " OCI7 ora_type=1 placeholder doesn't strip trailing spaces, OCI8 currently does\n";
< $ok = 1;
---
> if (!$ok && $name eq 'VARCHAR2') {
> if (ORA_OCI==7) {
> warn " OCI7 ora_type=1 placeholder doesn't strip trailing spaces, OCI8 currently does\n";
> $ok = 1;
> }
> elsif (ORA_OCI==9) {
> warn " OCI9 ora_type=1 placeholder doesn't strip trailing spaces\n";
> $ok = 1;
> }