Skip Menu |

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 21965
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: kgeorge [...] tcpsoft.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.0007
Fixed in: (no value)



Subject: Multiple failed tests (segfaults) in 3.0007 on OpenBSD, pass after applying patch
See bug #21962 for my environment (summary: OpenBSD 3.9, perl 5.8.6, mysql 5.0.22). With 3.0007, make test'ing has the following errors: # make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00base.............ok t/10dsnlist..........ok t/20createdrop.......ok t/30insertfetch......ok t/35limit............dubious Test returned status 0 (wstat 139, 0x8b) test program seems to have generated a core t/35prepare..........ok t/40bindparam........ok t/40bindparam2.......ok t/40blobs............ok t/40listfields.......ok t/40nulls............ok t/40numrows..........ok t/41bindparam........ok t/41blobs_prepare....dubious Test returned status 0 (wstat 139, 0x8b) test program seems to have generated a core t/42bindparam........ok t/50chopblanks.......ok t/50commit...........dubious Test returned status 0 (wstat 139, 0x8b) test program seems to have generated a core t/60leaks............skipped all skipped: $ENV{SLOW_TESTS} is not set or Proc::ProcessTable not installed t/dbdadmin...........ok t/insertid...........dubious Test returned status 0 (wstat 139, 0x8b) test program seems to have generated a core t/param_values.......ok t/prepare_noerror....skipped all skipped: test - will only run with MySQL 5.1 and above. t/texecute...........dubious Test returned status 0 (wstat 139, 0x8b) test program seems to have generated a core Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/35limit.t 0 139 ?? ?? % ?? t/41blobs_prepare.t 0 139 ?? ?? % ?? t/50commit.t 0 139 ?? ?? % ?? t/insertid.t 0 139 ?? ?? % ?? t/texecute.t 0 139 ?? ?? % ?? 2 tests skipped. Failed 5/23 test scripts, 78.26% okay. 0/252 subtests failed, 100.00% okay. *** Error code 2 Stop in /root/.cpan/build/DBD-mysql-3.0007 (line 870 of Makefile). When I make the following changes: # diff -u dbdimp.c.orig dbdimp.c.mod --- dbdimp.c.orig Fri Sep 8 16:25:59 2006 +++ dbdimp.c.mod Sun Oct 8 17:08:03 2006 @@ -2277,11 +2277,12 @@ imp_sth->has_been_bound= 0; /* Initialize ph variables with NULL values */ - for (bind= imp_sth->bind, + for (i = 0, + bind= imp_sth->bind, fbind= imp_sth->fbind, bind_end= bind+DBIc_NUM_PARAMS(imp_sth); bind < bind_end ; - bind++, fbind++ ) + bind++, fbind++, i++ ) { /* if this statement has a result set, field types will be @@ -2385,7 +2386,7 @@ &slen, params, num_params, - imp_dbh->bind_type_guessing); + bind_type_guessing); my_ulonglong rows= 0; Make test passes: # make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00base.............ok t/10dsnlist..........ok t/20createdrop.......ok t/30insertfetch......ok t/35limit............ok t/35prepare..........ok t/40bindparam........ok t/40bindparam2.......ok t/40blobs............ok t/40listfields.......ok t/40nulls............ok t/40numrows..........ok t/41bindparam........ok t/41blobs_prepare....ok t/42bindparam........ok t/50chopblanks.......ok t/50commit...........ok t/60leaks............skipped all skipped: $ENV{SLOW_TESTS} is not set or Proc::ProcessTable not installed t/dbdadmin...........ok t/insertid...........ok t/param_values.......ok t/prepare_noerror....skipped all skipped: test - will only run with MySQL 5.1 and above. t/texecute...........ok All tests successful, 2 tests skipped. Files=23, Tests=440, 23 wallclock secs ( 2.08 cusr + 0.28 csys = 2.36 CPU) The change from "imp_dbh->bind_type_guessing" to "bind_type_guessing" has already been made in 3.0007_1 and 3.0007_2. The change to the for loop has not been made and I am not sure that it is entirely correct (what is "i" supposed to be?; see my comments about this in a related bug #21962) but it does stop the segfaults.
Another great patch! Thanks! Do you want svn commit access? What is your CPAN id? I've added these patches to both versions and will do a release SOON. On Sun Oct 08 18:03:29 2006, kgeorge@tcpsoft.com wrote: Show quoted text
> See bug #21962 for my environment (summary: OpenBSD 3.9, perl 5.8.6, > mysql 5.0.22). > > With 3.0007, make test'ing has the following errors: > > # make test > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/00base.............ok > t/10dsnlist..........ok > t/20createdrop.......ok > t/30insertfetch......ok > t/35limit............dubious > Test returned status 0 (wstat 139, 0x8b) > test program seems to have generated a core > t/35prepare..........ok > t/40bindparam........ok > t/40bindparam2.......ok > t/40blobs............ok > t/40listfields.......ok > t/40nulls............ok > t/40numrows..........ok > t/41bindparam........ok > t/41blobs_prepare....dubious > Test returned status 0 (wstat 139, 0x8b) > test program seems to have generated a core > t/42bindparam........ok > t/50chopblanks.......ok > t/50commit...........dubious > Test returned status 0 (wstat 139, 0x8b) > test program seems to have generated a core > t/60leaks............skipped > all skipped: $ENV{SLOW_TESTS} is not set or Proc::ProcessTable > not installed > t/dbdadmin...........ok > t/insertid...........dubious > Test returned status 0 (wstat 139, 0x8b) > test program seems to have generated a core > t/param_values.......ok > t/prepare_noerror....skipped > all skipped: test - will only run with MySQL 5.1 and above. > t/texecute...........dubious > Test returned status 0 (wstat 139, 0x8b) > test program seems to have generated a core > Failed Test Stat Wstat Total Fail Failed List of Failed >
------------------------------------------------------------------------------- Show quoted text
> t/35limit.t 0 139 ?? ?? % ?? > t/41blobs_prepare.t 0 139 ?? ?? % ?? > t/50commit.t 0 139 ?? ?? % ?? > t/insertid.t 0 139 ?? ?? % ?? > t/texecute.t 0 139 ?? ?? % ?? > 2 tests skipped. > Failed 5/23 test scripts, 78.26% okay. 0/252 subtests failed, 100.00% > okay. > *** Error code 2 > > Stop in /root/.cpan/build/DBD-mysql-3.0007 (line 870 of Makefile). > > When I make the following changes: > > # diff -u dbdimp.c.orig dbdimp.c.mod > --- dbdimp.c.orig Fri Sep 8 16:25:59 2006 > +++ dbdimp.c.mod Sun Oct 8 17:08:03 2006 > @@ -2277,11 +2277,12 @@ > imp_sth->has_been_bound= 0; > > /* Initialize ph variables with NULL values */ > - for (bind= imp_sth->bind, > + for (i = 0, > + bind= imp_sth->bind, > fbind= imp_sth->fbind, > bind_end= bind+DBIc_NUM_PARAMS(imp_sth); > bind < bind_end ; > - bind++, fbind++ ) > + bind++, fbind++, i++ ) > { > /* > if this statement has a result set, field types will be > @@ -2385,7 +2386,7 @@ > &slen, > params, > num_params, > - imp_dbh->bind_type_guessing); > + bind_type_guessing); > > my_ulonglong rows= 0; > > Make test passes: > > # make test > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/00base.............ok > t/10dsnlist..........ok > t/20createdrop.......ok > t/30insertfetch......ok > t/35limit............ok > t/35prepare..........ok > t/40bindparam........ok > t/40bindparam2.......ok > t/40blobs............ok > t/40listfields.......ok > t/40nulls............ok > t/40numrows..........ok > t/41bindparam........ok > t/41blobs_prepare....ok > t/42bindparam........ok > t/50chopblanks.......ok > t/50commit...........ok > t/60leaks............skipped > all skipped: $ENV{SLOW_TESTS} is not set or Proc::ProcessTable > not installed > t/dbdadmin...........ok > t/insertid...........ok > t/param_values.......ok > t/prepare_noerror....skipped > all skipped: test - will only run with MySQL 5.1 and above. > t/texecute...........ok > All tests successful, 2 tests skipped. > Files=23, Tests=440, 23 wallclock secs ( 2.08 cusr + 0.28 csys = > 2.36 CPU) > > The change from "imp_dbh->bind_type_guessing" to "bind_type_guessing" > has already been made in 3.0007_1 and 3.0007_2. The change to the for > loop has not been made and I am not sure that it is entirely correct > (what is "i" supposed to be?; see my comments about this in a related > bug #21962) but it does stop the segfaults.
This patch was applied, I'm resolving this ticket. Thanks.