hang in _insert_row
[prev]
[thread]
[next]
[Date index for 2004/07/19]
I am using perl 5.8.1, Class::DBI 0.96, and DBD::Pg 1.33 (CVS version of
14-July, to get 'magic scalar' fix).
My program hangs in _insert_row at DBI.pm line 636 which is
$sth->execute(values %$data);
This behavior does NOT occur if I do a simple create() on a table which is
two columns (index, label) ; it is happening on a larger table with has_a
(and has_many but they've been filtered out before this point)
relationships. This behavior is 100% repeatable with this table.
I am going to refactor this to have a 1-column primary key but
I wonder if the problem relates to the has_a on a field included in the
primary key.
Here is the relevant table class:
package Webcontent::Tables::Models;
use base qw(Webcontent::Tables);
use strict;
__PACKAGE__->table('models');
__PACKAGE__->columns(Primary => qw/firstname lastname model_id/);
__PACKAGE__->columns(Essential => qw/age height weight gender ethnicity
haircolor eye_color chest cup waist hips shoe_size dress_size birthdate
managed about/);
__PACKAGE__->has_a(gender => 'Webcontent::Tables::Gender');
__PACKAGE__->has_a(haircolor => 'Webcontent::Tables::Haircolor');
__PACKAGE__->has_a(eye_color => 'Webcontent::Tables::Eyecolor');
__PACKAGE__->has_a(model_id => 'Webcontent::Tables::Subjects');
package Webcontent::Tables;
use strict;
BEGIN {
use Exporter ();
use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use version;
my $version = new version qw$Revision: 1.7 $;
@ISA = qw (Exporter);
#Give a hoot don't pollute, do not export more than needed by default
@EXPORT = qw ();
@EXPORT_OK = qw ();
%EXPORT_TAGS = ();
}
use base qw(Class::DBI::Pg);
Webcontent::Tables->set_db('Main',
'dbi:Pg:dbname=webcontent','','',{AutoCommit => 1});
__END__
1;
|
hang in _insert_row
Dana Hudes 00:14 on 19 Jul 2004
|