Skip to content

Commit

Permalink
Test commpresed blob import
Browse files Browse the repository at this point in the history
  • Loading branch information
mira13 committed Sep 14, 2020
1 parent e2e286b commit a4e9ace
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions modules/Bio/EnsEMBL/Test/MultiTestDB/mysql.pm
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,16 @@ use base 'Bio::EnsEMBL::Test::MultiTestDB';

sub load_txt_dump {
my ($self, $txt_file, $tablename, $db) = @_;
my $load = sprintf(q{LOAD DATA LOCAL INFILE '%s' INTO TABLE `%s` FIELDS ESCAPED BY '\\\\'}, $txt_file, $tablename);
$db->do($load);
return $db;
if($txt_file eq 'compressed_genotype_var') {
my $load = sprintf(q{LOAD DATA LOCAL INFILE '%s' INTO TABLE `%s` (variation_id, subsnp_id, @var1) FIELDS ESCAPED BY '\\\\' SET genotypes = UNHEX(@var1)}, $txt_file, $tablename);
$db->do($load);
return $db;
} else {
my $load = sprintf(q{LOAD DATA LOCAL INFILE '%s' INTO TABLE `%s` FIELDS ESCAPED BY '\\\\'}, $txt_file, $tablename);
$db->do($load);
return $db;
}

}

sub create_and_use_db {
Expand Down

0 comments on commit a4e9ace

Please sign in to comment.