Re: DBD::Oracle Release Candidate 1
On 16/02/11 11:32, H.Merijn Brand wrote: On Fri, 11 Feb 2011 13:43:34 -0500, John Scoles wrote: Here is the latest and greatest DBD::Oracle for your programming pleasure. You can find the Zip file here A ZIP is a quite unusual way to release CPAN modules, even for RC's http://www.pythian.com/news/wp-content/uploads/DBD-Oracle-1.28_RC_1.zip";>DBD-Oracle-1.28-RC1.zip You need to work on longdouble support I guess Sorry for the long mail. I think it contains a lot of info to digest :) A summary for a few boxes ... Like Merijn I also get 31lob failures on linux 64 bit. I was using database 11.1.0.6.0 and Instant Client11.2.0.2.0. Results below. Also, if line 1735 of oci8.c is changed to: PerlIO_printf(DBILOGFP, " blob_read field %d, ftype %d, offset %ld, len %lu, destoffset %ld, retlen %lu\n", fbh->field_num+1, ftype, offset, (unsigned long)len, destoffset, ul_t(amtp)); it makes a legitimate warning go away. t/31lob1..12 ok 1 - returned valid locator ok 2 - inserted into BLOB successfully ok 3 - got back what we put in ok 4 - returned valid locator ok 5 - returned valid locator ok 6 - returned initialized locator ok 7 - returned length ok 8 - returned written value not ok 9 - returned length via PL/SQL # Failed test 'returned length via PL/SQL' # at t/31lob.t line 152. # got: undef # expected: '4' Errors in file : OCI-21500: internal error code, arguments: [kghufree_06], [0x000A8C6D8], [0], [0], [0], [], [], [] `8<��Z��S+Z��S+Z��S+0:<��0:<��0:<��0:<��0:<��0:<��0:<��0:<��Errors in file : OCI-21500: internal error code, arguments: [kghufree_06], [0x000A8C6D8], [0], [0], [0], [], [], [] P:<��Z��S+Z��S+Z��S+ <<�� <<�� <<�� <<�� <<�� <<�� <<�� <<��dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED tests 9-12 Failed 4/12 tests, 66.67% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- t/31lob.t 1 256127 58.33% 9-12 Failed 1/1 test scripts, 0.00% okay. 4/12 subtests failed, 66.67% okay. Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com
Re: DBD::Oracle Release Candidate 1
On 17/02/2011 7:34 AM, H.Merijn Brand wrote: On Wed, 16 Feb 2011 12:32:12 +0100, "H.Merijn Brand" wrote: http://www.pythian.com/news/wp-content/uploads/DBD-Oracle-1.28_RC_1.zip You need to work on longdouble support I guess Here's a patch to make the test PASS on all systems, but I'm not sure if I'm using a carpet to shuv the problems under ... Yep I think that is exactly what you are doing. I will have to look exactly at this to see what is going in but your test and the code below will help Will get back to you soon I hope Cheers John --- t/58object.t.org2011-02-17 13:33:48.0 +0100 +++ t/58object.t2011-02-17 13:33:25.0 +0100 @@ -82,9 +82,9 @@ $dbh->do(qq{ INSERT INTO $table VALUES ( or die $dbh->errstr; $dbh->do(qq{ INSERT INTO $table VALUES (2, $sub_type(NULL, 'obj2', TO_DATE('2004-11-30 14:27:18', '-MM-DD HH24:MI:SS'), -12345.6789)) } +12345.9375)) } ) or die $dbh->errstr; -$dbh->do(qq{ INSERT INTO $table VALUES (3, $sub_type(5, 'obj3', NULL, 777.666)) } +$dbh->do(qq{ INSERT INTO $table VALUES (3, $sub_type(5, 'obj3', NULL, 777.875)) } ) or die $dbh->errstr; $dbh->do(qq{ CREATE OR REPLACE TYPE $inner_type AS OBJECT ( @@ -159,14 +159,14 @@ ok (scalar @row2, 'new: Fetch second row cmp_ok(ref $row2[1], 'eq', 'DBD::Oracle::Object', 'new: Row 2 column 2 is an DBD::Oracle::Object'); cmp_ok(uc $row2[1]->type_name, "eq", uc "$schema.$sub_type", "new: Row 2 column 2 object type"); is_deeply([$row2[1]->attributes], ['NUM', undef, 'NAME', 'obj2', -'DATETIME', '2004-11-30T14:27:18', 'AMOUNT', '12345.6789'], "new: Row 1 column 2 object attributes"); +'DATETIME', '2004-11-30T14:27:18', 'AMOUNT', '12345.9375'], "new: Row 1 column 2 object attributes"); @row3 = $sth->fetchrow(); ok (scalar @row3, 'new: Fetch third row'); cmp_ok(ref $row3[1], 'eq', 'DBD::Oracle::Object', 'new: Row 3 column 2 is an DBD::Oracle::Object'); cmp_ok(uc $row3[1]->type_name, "eq", uc "$schema.$sub_type", "new: Row 3 column 2 object type"); is_deeply([$row3[1]->attributes], ['NUM', 5, 'NAME', 'obj3', -'DATETIME', undef, 'AMOUNT', '777.666'], "new: Row 1 column 2 object attributes"); +'DATETIME', undef, 'AMOUNT', '777.875'], "new: Row 1 column 2 object attributes"); ok (!$sth->fetchrow(), 'new: No more rows expected'); @@ -178,7 +178,7 @@ my $expected_hash = { NUM => 5, NAME=> 'obj3', DATETIME=> undef, -AMOUNT => 777.666, +AMOUNT => 777.875, }; is_deeply($obj->attr_hash, $expected_hash, 'DBD::Oracle::Object->attr_hash'); is_deeply($obj->attr, $expected_hash, 'DBD::Oracle::Object->attr');
Re: DBD::Oracle Release Candidate 1
On Wed, 16 Feb 2011 12:32:12 +0100, "H.Merijn Brand" wrote: > http://www.pythian.com/news/wp-content/uploads/DBD-Oracle-1.28_RC_1.zip > > You need to work on longdouble support I guess Here's a patch to make the test PASS on all systems, but I'm not sure if I'm using a carpet to shuv the problems under ... --- t/58object.t.org2011-02-17 13:33:48.0 +0100 +++ t/58object.t2011-02-17 13:33:25.0 +0100 @@ -82,9 +82,9 @@ $dbh->do(qq{ INSERT INTO $table VALUES ( or die $dbh->errstr; $dbh->do(qq{ INSERT INTO $table VALUES (2, $sub_type(NULL, 'obj2', TO_DATE('2004-11-30 14:27:18', '-MM-DD HH24:MI:SS'), -12345.6789)) } +12345.9375)) } ) or die $dbh->errstr; -$dbh->do(qq{ INSERT INTO $table VALUES (3, $sub_type(5, 'obj3', NULL, 777.666)) } +$dbh->do(qq{ INSERT INTO $table VALUES (3, $sub_type(5, 'obj3', NULL, 777.875)) } ) or die $dbh->errstr; $dbh->do(qq{ CREATE OR REPLACE TYPE $inner_type AS OBJECT ( @@ -159,14 +159,14 @@ ok (scalar @row2, 'new: Fetch second row cmp_ok(ref $row2[1], 'eq', 'DBD::Oracle::Object', 'new: Row 2 column 2 is an DBD::Oracle::Object'); cmp_ok(uc $row2[1]->type_name, "eq", uc "$schema.$sub_type", "new: Row 2 column 2 object type"); is_deeply([$row2[1]->attributes], ['NUM', undef, 'NAME', 'obj2', -'DATETIME', '2004-11-30T14:27:18', 'AMOUNT', '12345.6789'], "new: Row 1 column 2 object attributes"); +'DATETIME', '2004-11-30T14:27:18', 'AMOUNT', '12345.9375'], "new: Row 1 column 2 object attributes"); @row3 = $sth->fetchrow(); ok (scalar @row3, 'new: Fetch third row'); cmp_ok(ref $row3[1], 'eq', 'DBD::Oracle::Object', 'new: Row 3 column 2 is an DBD::Oracle::Object'); cmp_ok(uc $row3[1]->type_name, "eq", uc "$schema.$sub_type", "new: Row 3 column 2 object type"); is_deeply([$row3[1]->attributes], ['NUM', 5, 'NAME', 'obj3', -'DATETIME', undef, 'AMOUNT', '777.666'], "new: Row 1 column 2 object attributes"); +'DATETIME', undef, 'AMOUNT', '777.875'], "new: Row 1 column 2 object attributes"); ok (!$sth->fetchrow(), 'new: No more rows expected'); @@ -178,7 +178,7 @@ my $expected_hash = { NUM => 5, NAME=> 'obj3', DATETIME=> undef, -AMOUNT => 777.666, +AMOUNT => 777.875, }; is_deeply($obj->attr_hash, $expected_hash, 'DBD::Oracle::Object->attr_hash'); is_deeply($obj->attr, $expected_hash, 'DBD::Oracle::Object->attr'); -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00, 11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.3 and AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Re: DBD::Oracle Release Candidate 1
On 16/02/11 12:00, John Scoles wrote: On Wed, Feb 16, 2011 at 5:45 AM, Martin J. Evans wrote: On 11/02/11 18:43, John Scoles wrote: Here is the latest and greatest DBD::Oracle for your programming pleasure. You can find the Zip file here http://www.pythian.com/news/wp-content/uploads/DBD-Oracle-1.28_RC_1.zip";>DBD-Oracle-1.28-RC1.zip This is a long overdue maintenance release that fixes a large number of bug and issues which are detailed below in the Changes. Don't worry there are some new goodies in this release namely I have added in 4 new server side tracing/debugging attributes ora_driver_name For 11g and later you can now set the name of the driver layer using OCI. PERL, PERL5, ApachePerl so on. Names starting with "ORA" are reserved. You can enter up to 8 characters. If none is enter then this will default to DBDO where is the current version number. This value can be retrieved on the server side using V$SESSION_CONNECT_INFO or GV$SESSION_CONNECT_INFO ora_client_info When passed in on the connection attributes it can specify any info you want onto the session up t0 64 bytes. This value can be retrieved on the server side using V$SESSION view. ora_client_identifier When passed in on the connection attributes it specifies the user identifier in the session handle. Most useful for web app as it can pass in the session user name which might be different than the connection user name. Can be up to 64 bytes long do not to include the password for security reasons and the first character of the identifier should not be ':'. This value can be retrieved on the server side using V$SESSION view. ora_action You can set this value to anything you want up to 32byes.This value can be retrieved on the server side using V$SESSION view. We have also added in the connection attribute ora_connect_with_default_signals Whit this attribute you can localize the $SIG{} so this should solve the problems with $SIG{} events that sometimes occur when using DBD::Oracle Finally I would like to thank Martin Evans for volunteering to be another co-maintainer of DBD::Oracle Cheers John Scoles Changes Added connection attribute 'ora_connect_with_default_signals' that will localize Perl's $SIG{INT} handler from Brian Phillips and T. Bunce Fix in execute_array to stop possible endless loop when using a fetch sub by Martin J. Evans Adapted Martin J. Evans' ODBC 70execute_array.t into t/26exe_array.t by John Scoles Fix for execute_array to bring it up to spec. by Martin J. Evans and John Scoles Marked ProC, Oraperl.pm, ora_explain.pl, ora_context, ora_use_proc_connection and ora_parse_lang as deprecated to be removed in 1.29 Added in 4 new server side debug/trace attributes, ora_driver_name, ora_client_info, ora_session_user and ora_action on the connection handle from John Scoles Cleaned up the pod a little by John Scoles Fix for function name length, Some function names are over 31char long which may cause problems for some OS/Compilers (VMS IA64 box.) from Jakob Snoer Fix for OCIPing in case where a 10 client tries to ping a<10 DB from Tim Oertel Fix for DBD-Oracle stored proc with array bug where second call array size is unchanged from Tim Oertel Fix for rt.cpan.org Ticket #=63332: Spelling error in POD from jonasbn Fix for rt.cpan.org Ticket #=62152: t/28array_bind.t and t/31lob.t may call plan() twice and others do not fail on not connect from John Scoles Fix for rt.cpan.org Ticket #=61511 ORA-00942 when inserting into a table with a LOB column over a synonym on HP-UX from Kris Lemaire Fix for rt.cpan.org Ticket #=42842 Test 31lob fails with 64-bit Instant Client by John Scoles Fix for support for objects on big endian platforms from Charles Jardine, John R Pierce Fix for rt.cpan.org Ticket #=61225 Windows install (Stawberry Perl) fails on long path names from David Tulloh Fix for rt.cpan.org Ticket #=rt64524 Memory Leak when Oracle connection fails by Martin J. Evans Added all the missing ora_drcp values to dbh private_attribute_info by Martin J. Evans Removed a load of attributes from sth private_attribute_info which are not handle attributes but attributes to bind_param/prepare by Martin J. Evans Fix for rt.cpan.org Ticket #=64244 - don't bail out, skip tests when we cannot connect by Martin J. Evans and John Scoles Added DBI to PREREQ_PM in Makefile.PL by Martin J. Evans Added build_requires in Makefile.PL by Martin J. Evans Added workaround for ExtUtils::MakeMaker problems by Martin J. Evans Added LICENSE to Makefile.PL by Martin J. Evans Cheers John Scoles Thanks John. I haven't had a chance to play with this release candidate properly until today - sorry. On the platforms I've tested on so far (a few Linuxes) I am getting 100% test success. I will upgrade our test system to this RC later to see if it finds any problems. The only problems I've found so far: o the META.yml has not been generated properly (e.g., it is missing build_required, configure_requires etc o the version is still