Re: error installing DBD-mysql-3.0006

Dave Howorth <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Organization MRC Centre for Protein Engineering
Message-ID <[email protected]>
Martin J. Evans wrote:
> Dave,
> 
> This may have been a mistake of mine that was later fixed
> see http://lists.mysql.com/perl/3851

Ah, OK. See below ...

> I think what follows is the must up to date prepare_noerror.t:
> 
> # Test problem in 3.0002_4 and 3.0005 where if a statement is prepared
> # and multiple executes are performed, if any execute fails all subsequent
> # executes report an error but may have worked.
> 
> use strict;
> use DBI ();
> 
> use vars qw($test_dsn $test_user $test_password $state);
> require "t/lib.pl";
> 
> while (Testing()) {
>   my ($dbh, $sth);
>   #
>   # Connect to the database
>   Test($state or
>        ($dbh = DBI->connect("$test_dsn;mysql_server_prepare=1", $test_user,
> $test_password,
>                            {RaiseError => 0})));
> 
>   #
>   # execute invalid SQL to make sure we get an error
>   #
>   my $q = "select select select";       # invalid SQL
>   $dbh->{PrintError} = 0;
>   $dbh->{PrintWarn} = 0;
>   eval {$sth = $dbh->prepare($q);};
>   if (!$sth) {
>       Test($state or (defined($DBI::errstr) && ($DBI::errstr ne "")));
>   } else {
>       eval {$sth->execute};
>       Test($state or (defined($DBI::errstr) && ($DBI::errstr ne "")));
>   }

This change looks like it would change the behaviour on my machine. I 
eventually force installed it, but I single-stepped it first and I 
remember that $sth had an empty value.

Cheers, Dave

>   $dbh->{PrintError} = 1;
>   $dbh->{PrintWarn} = 1;
>   #print STDERR $DBI::errstr;
>   #
>   # Close the database connection
>   Test($state or ($dbh->disconnect() or 1));
> }
> 
> I had thought I'd passed this on to Patrick but there have not been any
> DBD::mysql releases since the problem was found.
> 
> I've attached an up to date copy too.
> 
> Martin
> --
> Martin J. Evans
> Easysoft Ltd, UK
> http://www.easysoft.com
> 
> 
> On 13-Jul-2006 Dave Howorth wrote:
>>Hello,
>>
>>I'm having a problem trying to install DBD-mysql-3.0006. It fails like this:
>>
>>   t/prepare_noerror....FAILED test 2
>>         Failed 1/3 tests, 66.67% okay
>>
>>All the other tests are OK. Has anybody see this problem?
>>
>>Thanks and regards, Dave
>>
>>My software versions:
>>
>>MySQL server version: 4.0.21-Max
>>
>># perl -MDBI -e 'print $DBI::VERSION,"\n"'
>>1.51
>># perl -V
>>Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
>>   Platform:
>>     osname=linux, osvers=2.6.8.1, archname=x86_64-linux-thread-multi
>>     uname='linux salieri 2.6.8.1 #1 smp fri jan 14 15:41:33 utc 2005 
>>x86_64 x86_64 x86_64 gnulinux '
>>     config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr 
>>-Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm 
>>-Duseshrplib=true -Doptimize=-O2 -fmessage-length=0 -Wall -Wall -pipe'
>>     hint=recommended, useposix=true, d_sigaction=define
>>     usethreads=define use5005threads=undef useithreads=define 
>>usemultiplicity=define
>>     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
>>     use64bitint=define use64bitall=define uselongdouble=undef
>>     usemymalloc=n, bincompat5005=undef
>>   Compiler:
>>     cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
>>-fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
>>     optimize='-O2 -fmessage-length=0 -Wall -Wall -pipe',
>>     cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
>>-fno-strict-aliasing -pipe'
>>     ccversion='', gccversion='3.3.4 (pre 3.3.5 20040809)', gccosandvers=''
>>     intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
>>     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
>>     ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', 
>>lseeksize=8
>>     alignbytes=8, prototype=define
>>   Linker and Libraries:
>>     ld='cc', ldflags =' -L/usr/local/lib64'
>>     libpth=/lib64 /usr/lib64 /usr/local/lib64
>>     libs=-lm -ldl -lcrypt -lpthread
>>     perllibs=-lm -ldl -lcrypt -lpthread
>>     libc=/lib64//lib64/libc.so.6, so=so, useshrplib=true, 
>>libperl=libperl.so
>>     gnulibc_version='2.3.3'
>>   Dynamic Linking:
>>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E 
>>-Wl,-rpath,/usr/lib/perl5/5.8.5/x86_64-linux-thread-multi/CORE'
>>     cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib64'
>>
>>
>>Characteristics of this binary (from libperl):
>>   Compile-time options: MULTIPLICITY USE_ITHREADS USE_64_BIT_INT 
>>USE_64_BIT_ALL USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
>>   Built under linux
>>   Compiled at Feb  7 2005 11:20:08
>>   @INC:
>>     /usr/lib/perl5/5.8.5/x86_64-linux-thread-multi
>>     /usr/lib/perl5/5.8.5
>>     /usr/lib/perl5/site_perl/5.8.5/x86_64-linux-thread-multi
>>     /usr/lib/perl5/site_perl/5.8.5
>>     /usr/lib/perl5/site_perl
>>     /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi
>>     /usr/lib/perl5/vendor_perl/5.8.5
>>     /usr/lib/perl5/vendor_perl
>>     .
>>
>>-- 
>>MySQL Perl Mailing List
>>For list archives: http://lists.mysql.com/perl
>>To unsubscribe:   
>>http://lists.mysql.com/[email protected]
> 
> 
> ------------------------------------------------------------------------
> 
> 


-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
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.