From d772c769d3a6fd5b1fe75eb4f3080ae786ba1d59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?=
 <ak4@sanger.ac.uk>
Date: Thu, 24 Jul 2008 16:57:20 +0000
Subject: [PATCH] Fix errors found by unit-tests.

---
 .../Bio/EnsEMBL/DBSQL/BaseMetaContainer.pm    | 26 +++++++++----------
 modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm     |  8 +++---
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/modules/Bio/EnsEMBL/DBSQL/BaseMetaContainer.pm b/modules/Bio/EnsEMBL/DBSQL/BaseMetaContainer.pm
index 80e3ceb020..e4bd412e70 100644
--- a/modules/Bio/EnsEMBL/DBSQL/BaseMetaContainer.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/BaseMetaContainer.pm
@@ -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();
   }
 
diff --git a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
index dac3fc5ea6..8681256f88 100644
--- a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
@@ -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 = ?' );
 
-- 
GitLab