[Bioperl-l] GFF mysql adapter schema problem

Dmitri Bichko dbichko at genpathpharma.com
Fri May 28 16:32:11 EDT 2004


Hello all,

What is the reason for the (fref,fbin,fstart,fstop,ftypeid,gid) index on
fdata being unique?

I need to display groups with many features with identical locations
(but different labels).  To get this to work I took off the unique
constraint and fixed the resulting problem with getting the last fid for
the attribute inserts.  The changes are below.

Am I likely to run into other problems because of this change?  Does
anyone know the original reason for this constraint?

Thanks,
Dmitri

Changes to Bio::DB::GFF::Adaptor::dbi::mysql

473c473
<     unique index(fref,fbin,fstart,fstop,ftypeid,gid),
---
>     index(fref,fbin,fstart,fstop,ftypeid,gid),
623a624
>   my $last_insert_id = $dbh->prepare_delayed('SELECT
LAST_INSERT_ID()');
641a643
>   $self->{load_stuff}{sth}{last_insert_id} = $last_insert_id;
695,698c697,700
<
<   my $fid = $dbh->{mysql_insertid}
<     ||
$self->get_feature_id($gff->{ref},$gff->{start},$gff->{stop},$typeid,$gr
oupid);
<
---
>
>   $s->{sth}{last_insert_id}->execute
>     or warn $s->{sth}{last_insert_id}->errstr;
>   my ($fid) = $s->{sth}{last_insert_id}->fetchrow_array;




More information about the Bioperl-l mailing list