Обсуждение: Announce: DBD::Pg 1.30_2 (beta)

Поиск
Список
Период
Сортировка

Announce: DBD::Pg 1.30_2 (beta)

От
Rudy Lippan
Дата:
DBD::Pg 1.30 is nearing release, and you can grab a copy of the latest
beta at:  http://www.remotelinux.com/rlippan/DBD-Pg-1.30_2.tar.gz  There 
are many changes in this release and large chunks of code have been 
re-written, so I would appreciate if some of you could pound on this and 
let me know if you find any problems.

If I don't hear anything in say, 48 hours, I'll re-tag this as 1.30 and 
send it up to CPAN.

Rudy


========
Changes:

1.30_2   - notice messages generated by the database new use the perl     warning mechanism instead of going to stderr.
   [Dominic Mitchell <dom@semantico.com>]   - $dbh->prepare() rewrites the SQL statement into an internal for
stripingout comments and whitespace, and if PostgreSQL > 7.3 takes 
 
the     stripped statement and passes that to postgress' PREPARE statement,     then rewrites the statement as 'EXECUTE
"DBD::PG::cached_queryn"     ($1, $2, ... $n, $n+1)' for DBD::Pg's execute.  -- Currently 
 
disabled     until PREPARE works a little better   - Allows the use of :n and :foo bind params. So: (SELECT * FROM foo

where     1 = :this and 2 = :that) will now work.   - Complains on execute when unbound bind params are submitted
(instead
 
of     defaulting to NULL)   - Switched over to use driver.xst.   - pg_error() only removes \n's don't truncate message
onfirst \n   - fixed statement scan problem where the preparse of     "SELECT foo[3:33] from bar"  was scanning :33 as
aplaceholder   - moved the quoting of bind values out of execute() and into     bind -- as there is no need to requote
thevalue every time execute     is called.   - :veryverylongplaceholdername ==  Long walk. Sort pier -- fixed.   -
quote()is now in C and uses same code as bind_param.   - quoting and dequoting now use libpq quoting functions where 
 
available     (I still need to take the libpq functions swiped out of quote.c and 
move     it into libpqswip.c with license info &c., and switch ifndefs to 
ifdefs)   - bind_param() will convert from 1,0 to TRUE/FALSE when pg_type is     PGBOOLOID.   - fixed many heap buffer
overruns.




Re: Announce: DBD::Pg 1.30_2 (beta)

От
David Wheeler
Дата:
Found another one. Not sure what the issue is here. Let me know if you 
need me to try to create a test case.

Can't locate class method 'DBD::Pg::dr::disconnect_all' via package 
'DBD::Pg::dr' at /usr/local/lib/perl5/site_perl/5.8.0/darwin/DBI.pm 
line 649        Bric::__ANON__('Can\'t locate class method 
\'DBD::Pg::dr::disconnect_all\' vi...') called at 
/usr/local/lib/perl5/5.8.0/Carp.pm line 191        Carp::croak('Can\'t locate class method 
\'DBD::Pg::dr::disconnect_all\' vi...') called at 
/usr/local/lib/perl5/5.8.0/Attribute/Handlers.pm line 104
Attribute::Handlers::AUTOLOAD('DBI::dr=HASH(0xc72330)')called 
 
at /usr/local/lib/perl5/site_perl/5.8.0/darwin/DBI.pm line 649        DBI::disconnect_all('DBI') called at 
/usr/local/lib/perl5/site_perl/5.8.0/darwin/DBI.pm line 474        DBI::END() called at t/Bric/Test/Runner.pm line 0
   eval {...} called at t/Bric/Test/Runner.pm line 0
 
END failed--call queue aborted.        Bric::__ANON__('Can\'t locate class method 
\'DBD::Pg::dr::disconnect_all\' vi...') called at t/Bric/Test/Runner.pm 
line 0

Regards,

David

-- 
David Wheeler                                     AIM: dwTheory
david@kineticode.com                              ICQ: 15726394
http://kineticode.com/                         Yahoo!: dew7e                                               Jabber:
Theory@jabber.org
Kineticode. Setting knowledge in motion.[sm]



Re: Announce: DBD::Pg 1.30_2 (beta)

От
David Wheeler
Дата:
On Tuesday, June 10, 2003, at 08:12  AM, Rudy Lippan wrote:

> DBD::Pg 1.30 is nearing release, and you can grab a copy of the latest
> beta at:  http://www.remotelinux.com/rlippan/DBD-Pg-1.30_2.tar.gz  
> There
> are many changes in this release and large chunks of code have been
> re-written, so I would appreciate if some of you could pound on this 
> and
> let me know if you find any problems.
>
> If I don't hear anything in say, 48 hours, I'll re-tag this as 1.30 and
> send it up to CPAN.

Only thing I've noticed so far is this:

t/15funct...........v-string in use/require non-portable at 
/Users/david/Desktop/DBD-Pg-1.30_2/blib/lib/DBD/Pg.pm line 12.

Regards,

David

-- 
David Wheeler                                     AIM: dwTheory
david@kineticode.com                              ICQ: 15726394
http://kineticode.com/                         Yahoo!: dew7e                                               Jabber:
Theory@jabber.org
Kineticode. Setting knowledge in motion.[sm]



Re: Announce: DBD::Pg 1.30_2 (beta)

От
Rudy Lippan
Дата:
On Thu, 12 Jun 2003, Cosimo Streppone wrote:

> Date: Thu, 12 Jun 2003 14:59:30 +0000
> Hi Rudy,
> 
Hi Cosimo,

First off,  Thank you!

> here is the result of my tests, with either DBI 1.35 and 1.37
> and Postgresql version 7.3.3.
> I'm having several problems with the test scripts.

That is good! In a good-that-we-caught-it sort of way :)

> I cannot understand if these are caused by my setup...

Yes and no.  How about we say that your setup exposes a bug in DBD::Pg.

> 
> OS    : Linux RedHat 7.3
> Pg    : 7.3.3
> Perl  : 5.6.1

Is this the perl that came with 5.6.1?  If so, I'll set up a RH 7.3 
system  to see if I can duplicated the problem. If you are not using the 
default perl, can you send me the output of 'perl -V'

> Please tell if I can test and/or report something more to help.
> 
See above.

> 
> Output of `make test'
> -----------------------------------------------------------------------
> 
> [1020].cosimo@satcli03://~/files/DBD-Pg-1.30_2
> 14:36:03$DBI_DSN=dbi:Pg:dbname=pg130test DBI_USER=postgres make test
> /bin/sh -c true
> /bin/sh -c true
> PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/opt/perl/lib/5.6.1/linux -I/opt/perl/lib/5.6.1 -e 'use
Test::Harnessqw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
 
> t/00basic...........ok
> t/01connect.........ok
> t/01constants.......ok
> t/01setup...........ok
> t/02prepare.........ok
> t/03bind............dubious
>         Test returned status 0 (wstat 11, 0xb)
> DIED. FAILED tests 5-11

Hum, Looks like there is a problem in bind().  David reported something,
and I am noticing some weirdness there but only when perl is compiled with
-O6.  

The rest of the test are binding values to placeholders which would
explain why they are failing.


Rudy



Re: Announce: DBD::Pg 1.30_2 (beta)

От
Cosimo Streppone
Дата:
Rudy Lippan wrote:

> DBD::Pg 1.30 is nearing release, and you can grab a copy of the latest
> beta at:  http://www.remotelinux.com/rlippan/DBD-Pg-1.30_2.tar.gz

Hi Rudy,

here is the result of my tests, with either DBI 1.35 and 1.37
and Postgresql version 7.3.3.
I'm having several problems with the test scripts.
I cannot understand if these are caused by my setup...

OS    : Linux RedHat 7.3
Pg    : 7.3.3
Perl  : 5.6.1
DBI   : 1.35 and 1.37
DBD-PG: 1.30_2

First I was using DBD::Pg 1.22 with DBI 1.30 through 1.37 with
no problems. I upgraded from Postgresql 7.1.3 to 7.3.3 because >7.2
was a prerequisite.

Here I include output of `make test' with DBI 1.37. Hope that this
can be of any help. Output of testing with DBI 1.35 is very similar but
the number of failed subtests is 80 instead of 92.

Please tell if I can test and/or report something more to help.


Output of `make test'
-----------------------------------------------------------------------

[1020].cosimo@satcli03://~/files/DBD-Pg-1.30_2
14:36:03$DBI_DSN=dbi:Pg:dbname=pg130test DBI_USER=postgres make test
/bin/sh -c true
/bin/sh -c true
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/opt/perl/lib/5.6.1/linux -I/opt/perl/lib/5.6.1 -e 'use
Test::Harnessqw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
 
t/00basic...........ok
t/01connect.........ok
t/01constants.......ok
t/01setup...........ok
t/02prepare.........ok
t/03bind............dubious       Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 5-11       Failed 7/11 tests, 36.36% okay
t/04execute.........dubious       Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 5-13       Failed 9/13 tests, 30.77% okay
t/05fetch...........dubious       Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 9-10       Failed 2/10 tests, 80.00% okay (less 3 skipped tests: 5 okay, 50.00%)
t/06disconnect......ok
t/07reuse...........ok
t/08txn.............ok
t/09autocommit......ok
t/11quoting.........dubious       Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 2-9       Failed 8/9 tests, 11.11% okay
t/12placeholders....dubious       Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 5-9       Failed 5/9 tests, 44.44% okay
t/13pgtype..........ok
t/15funct...........dubious       Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 11-71       Failed 61/71 tests, 14.08% okay
t/99cleanup.........ok
Failed Test        Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/03bind.t            0    11    11    7  63.64%  5-11
t/04execute.t         0    11    13    9  69.23%  5-13
t/05fetch.t           0    11    10    2  20.00%  9-10
t/11quoting.t         0    11     9    8  88.89%  2-9
t/12placeholders.t    0    11     9    5  55.56%  5-9
t/15funct.t           0    11    71   61  85.92%  11-71
3 subtests skipped.
Failed 6/17 test scripts, 64.71% okay. 92/201 subtests failed, 54.23% okay.
make: *** [test_dynamic] Error 11
[1021].cosimo@satcli03://~/files/DBD-Pg-1.30_2
14:36:30$


-- 
Cosimo




Re: Announce: DBD::Pg 1.30_2 (beta)

От
David Wheeler
Дата:
I'm seeing some errors appearing in my Apache log under Bricolage. Not 
sure what the deal is, but this didn't happen under DBD::Pg 1.22 or 
earlier:

WARNING:  BEGIN: already a transaction in progress
WARNING:  COMMIT: no transaction in progress
WARNING:  BEGIN: already a transaction in progress
WARNING:  COMMIT: no transaction in progress
Issuing rollback() for database handle being DESTROY'd without explicit 
disconnect() at /usr/local/bricolage/lib/Bric/Util/DBI.pm line 1661.
rollback ineffective with AutoCommit enabled at 
/usr/local/bricolage/lib/Bric/Util/DBI.pm line 960.
[Thu Jun 12 11:42:09 2003] [error] [client 127.0.0.1] Unable to commit 
transactions: DBD::Pg::db commit failed: begin failed at 
/usr/local/bricolage/lib/Bric/Util/DBI.pm line 571.

It seems rather confused about transaction states...In Bricolage, each 
Apache request is a single transaction.

Rudy, do you know offhand what might be causing this?

Regards,

David



Re: Announce: DBD::Pg 1.30_2 (beta)

От
Cosimo Streppone
Дата:
Rudy Lippan wrote:

>>here is the result of my tests, with either DBI 1.35 and 1.37
>>and Postgresql version 7.3.3.
>>I'm having several problems with the test scripts.
>
> That is good! In a good-that-we-caught-it sort of way :)
>

Sure!

>>OS Linux RedHat 7.3, Pg 7.3.3, Perl 5.6.1
> 
> Is this the perl that came with 5.6.1?  If so, I'll set up a RH 7.3 
> system  to see if I can duplicated the problem.

I'm not using the default RH perl. I'm including here the full `perl -V`.

============================================================================

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform:   osname=linux, osvers=2.4.18-3,
archname=linux  uname='linux satcli03 2.4.18-3 #1 thu apr 18 07:37:53 edt 2002 i686 unknown '   config_args=''
hint=recommended,useposix=true, d_sigaction=define   usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef  useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef   use64bitint=undef
use64bitall=undefuselongdouble=undef Compiler:   cc='cc', ccflags ='-ffast-math -fno-strict-aliasing
-I/usr/local/include-mpentiumpro -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',   optimize='-O2',   cppflags='-ffast-math
-fno-strict-aliasing-I/usr/local/include -mpentiumpro'   ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.3
2.96-110)',gccosandvers=''   intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234   d_longlong=define,
longlongsize=8,d_longdbl=define, longdblsize=12   ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8  alignbytes=4, usemymalloc=define, prototype=define Linker and Libraries:   ld='cc', ldflags ='
-L/usr/local/lib'  libpth=/usr/local/lib /lib /usr/lib   libs=-lnsl -lndbm -lgdbm -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl-ldl -lm -lc -lcrypt -lutil   libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a Dynamic
Linking:  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'   cccdlflags='-fpic', lddlflags='-shared
-L/usr/local/lib'

Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under linux Compiled at Jun
282002 18:35:40 @INC:   /opt/perl/lib/5.6.1/linux   /opt/perl/lib/5.6.1   /opt/perl/lib/site_perl/5.6.1/linux
/opt/perl/lib/site_perl/5.6.1  /opt/perl/lib/site_perl   .
 


-- 
Cosimo

Choose two:
(A) Fast
(B) Efficient
(C) Stable
(D) Windows 98 (counts as two)