Commit d772c769 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Fix errors found by unit-tests.

parent f6587407
......@@ -245,7 +245,7 @@ sub delete_key {
. 'WHERE meta_key = ?'
. 'AND species_id IS NULL' );
$sth->bin_param( 1, $key, SQL_VARCHAR );
$sth->bind_param( 1, $key, SQL_VARCHAR );
$sth->execute();
} else {
my $sth =
......@@ -253,8 +253,8 @@ sub delete_key {
. 'WHERE meta_key = ? '
. 'AND species_id = ?' );
$sth->bin_param( 1, $key, SQL_VARCHAR );
$sth->bin_param( 2, $self->species_id(), SQL_INTEGER );
$sth->bind_param( 1, $key, SQL_VARCHAR );
$sth->bind_param( 2, $self->species_id(), SQL_INTEGER );
$sth->execute();
}
......@@ -287,8 +287,8 @@ sub delete_key_value {
. 'AND meta_value = ?'
. 'AND species_id IS NULL' );
$sth->bin_param( 1, $key, SQL_VARCHAR );
$sth->bin_param( 2, $value, SQL_VARCHAR );
$sth->bind_param( 1, $key, SQL_VARCHAR );
$sth->bind_param( 2, $value, SQL_VARCHAR );
$sth->execute();
} else {
my $sth =
......@@ -297,9 +297,9 @@ sub delete_key_value {
. 'AND meta_value = ? '
. 'AND species_id = ?' );
$sth->bin_param( 1, $key, SQL_VARCHAR );
$sth->bin_param( 2, $value, SQL_VARCHAR );
$sth->bin_param( 3, $self->species_id(), SQL_INTEGER );
$sth->bind_param( 1, $key, SQL_VARCHAR );
$sth->bind_param( 2, $value, SQL_VARCHAR );
$sth->bind_param( 3, $self->species_id(), SQL_INTEGER );
$sth->execute();
}
......@@ -334,8 +334,8 @@ sub key_value_exists {
. 'AND meta_value = ?'
. 'AND species_id IS NULL' );
$sth->bin_param( 1, $key, SQL_VARCHAR );
$sth->bin_param( 2, $value, SQL_VARCHAR );
$sth->bind_param( 1, $key, SQL_VARCHAR );
$sth->bind_param( 2, $value, SQL_VARCHAR );
$sth->execute();
} else {
$sth =
......@@ -345,9 +345,9 @@ sub key_value_exists {
. 'AND meta_value = ? '
. 'AND species_id = ?' );
$sth->bin_param( 1, $key, SQL_VARCHAR );
$sth->bin_param( 2, $value, SQL_VARCHAR );
$sth->bin_param( 3, $self->species_id(), SQL_INTEGER );
$sth->bind_param( 1, $key, SQL_VARCHAR );
$sth->bind_param( 2, $value, SQL_VARCHAR );
$sth->bind_param( 3, $self->species_id(), SQL_INTEGER );
$sth->execute();
}
......
......@@ -484,7 +484,7 @@ sub fetch_by_seq_region_id {
} else {
my $sth =
$self->prepare( "SELECT sr.name, sr.coord_system_id, sr.length "
. "FROM seq_region sr"
. "FROM seq_region sr "
. "WHERE sr.seq_region_id = ? " );
$sth->bind_param( 1, $seq_region_id, SQL_INTEGER );
......@@ -665,7 +665,7 @@ sub fetch_all {
. 'AND sr.coord_system_id = cs.coord_system_id '
. 'AND cs.species_id = ?' );
$sth->bind_param( 1, $self->species_id(), SQL_INTEGER );
$sth2->bind_param( 1, $self->species_id(), SQL_INTEGER );
$sth2->execute();
my ($seq_region_id);
......@@ -1556,10 +1556,10 @@ sub _build_exception_cache {
my $sth =
$self->prepare( 'SELECT ae.seq_region_id, ae.seq_region_start, '
. 'ae.seq_region_end, ae.exc_type, ae.exc_seq_region_id, '
. 'ae.exc_seq_region_start, ae.exc_seq_region_end'
. 'ae.exc_seq_region_start, ae.exc_seq_region_end '
. 'FROM assembly_exception ae, '
. 'seq_region sr, coord_system cs '
. 'WHERE sr.seq_region_id = ar.seq_region_id '
. 'WHERE sr.seq_region_id = ae.seq_region_id '
. 'AND sr.coord_system_id = cs.coord_system_id '
. 'AND cs.species_id = ?' );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment