On Mon Jul 26 08:09:31 2010, amashanov wrote:
Show quoted text> Птн Июл 23 10:12:35 2010, RIBASUSHI писал:
> > I am almost positive we had this fixed a long time ago. What version
> of
> > DBIC is this? Also please provide the full invocation that causes
> this
> SQL?
>
> At time I posted this bug, I tried last available version of
> DBIx::Class, but result was the same. Here is some additional tracing
> information which can be useful (using DBIx::Class version 0.08118 and
> with carp replaced into Carp::cluck in DBIx::Class::Storage::DBI):
>
> $ PERL5LIB=$PERL5LIB:~/debuglib DBIC_TRACE=1 perl -MMCM::Schema -we
> 'my
> $d = MCM::Schema->resultset("Domain")->new({ occup_id => 1, user_id =>
> 7768, name => "domain-name.tld", status => 2, status_f => 1,
> unique_key
> => undef, cdate => "now", mdate => "now" }); my $s = $d->new_related(
> "services", { shortname => "http", entity_id => 2195, status => 2,
> status_f => 1, stype => 2, tarif_id => 1, lbill_id => 106221, cdate =>
> "now", mdate => "now" } ); $d->insert(); $s->insert()'
> SELECT "me"."id", "me"."fullname", "me"."simplename", "me"."stype",
> "me"."shortname", "me"."control_module", "me"."callback_module",
> "me"."solo", "me"."editable", "me"."closed", "me"."dealer",
> "me"."cp_show", "me"."cp_edit", "me"."cp_add", "me"."backlink_module",
> "me"."allow_give", "me"."always_calc_balance",
> "me"."allow_status_change", "me"."cp_status_change",
> "me"."params_class", "me"."service_class" FROM "service_types" "me"
> WHERE ( "me"."shortname" = ? ): 'http'
> INSERT INTO "domains" ( "cdate", "mdate", "name", "occup_id",
> "status",
> "status_f", "unique_key", "user_id") VALUES ( ?, ?, ?, ?, ?, ?, ?, ?
> ):
> 'now', 'now', 'domain-name.tld', '1', '2', '1', 'NULL', '7768'
> SELECT "me"."id", "me"."name", "me"."user_id", "me"."status",
> "me"."cdate", "me"."status_f", "me"."flag", "me"."parent_id",
> "me"."comment", "me"."deact_by_user", "me"."occup_id",
> "me"."unique_key", "me"."mdate", "me"."del_reason",
> "me"."auto_prolongation", "me"."delayed_delete", "me"."rdate",
> "me"."token_date", "me"."name_ml", "me"."user_comment" FROM "domains"
> "me" WHERE ( ( "me"."id" = ? OR "me"."unique_key" IS NULL ) ):
> '798894'
> Query returned more than one row. SQL that returns multiple rows is
> DEPRECATED for ->find and ->single at
> /home/amashanov/debuglib/DBIx/Class/Storage/DBI.pm line 1947
>
>
DBIx::Class::Storage::DBI::select_single('DBIx::Class::Storage::DBI::Pg=HASH(0x868ac30)',
Show quoted text> 'ARRAY(0xa128478)', 'ARRAY(0x9ed4f28)', 'ARRAY(0x9edc9fc)',
> 'HASH(0xa039424)') called at
> /home/amashanov/debuglib/DBIx/Class/Storage/DBI.pm line 72
>
>
DBIx::Class::Storage::DBI::select_single('DBIx::Class::Storage::DBI::Pg=HASH(0x868ac30)',
Show quoted text> 'ARRAY(0xa128478)', 'ARRAY(0x9ed4f28)', 'ARRAY(0x9edc9fc)',
> 'HASH(0xa039424)') called at
> /usr/local/lib/perl5/site_perl/5.8.8/DBIx/Class/ResultSet.pm line 745
>
>
DBIx::Class::ResultSet::single('MCM::Schema::ResultSet::Domain=HASH(0xa03994c)')
Show quoted text> called at /usr/local/lib/perl5/site_perl/5.8.8/DBIx/Class/ResultSet.pm
> line 540
>
>
DBIx::Class::ResultSet::find('MCM::Schema::ResultSet::Domain=HASH(0x9ed4fb8)',
Show quoted text> 'HASH(0xa044ff0)') called at
> /usr/local/lib/perl5/site_perl/5.8.8/DBIx/Class/ResultSet.pm line 2248
>
>
DBIx::Class::ResultSet::find_or_create('MCM::Schema::ResultSet::Domain=HASH(0x9ed4fb8)',
Show quoted text> 'HASH(0xa044ff0)') called at
> /usr/local/lib/perl5/site_perl/5.8.8/DBIx/Class/Row.pm line 304
>
>
DBIx::Class::Row::insert('MCM::Schema::Result::Service::http=HASH(0x9ed4e8c)')
Show quoted text> called at -e line 1
> INSERT INTO "services" ( "cdate", "domain", "entity_id", "lbill_id",
> "mdate", "shortname", "status", "status_f", "stype", "tarif_id")
> VALUES
> ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ): 'now', '791646', '2195', '106221',
> 'now', 'http', '2', '1', '2', '1'
Indeed I now see the problem, a fix will be devised in the next couple
of weeks.