Re: DBD::Oracle Release Candidate 1

John Scoles <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
  On 17/02/2011 7:34 AM, H.Merijn Brand wrote:
> On Wed, 16 Feb 2011 12:32:12 +0100, "H.Merijn Brand"
> <[email protected]>  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.org    2011-02-17 13:33:48.000000000 +0100
> +++ t/58object.t        2011-02-17 13:33:25.000000000 +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', 'YYYY-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');
>
>
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.