Skip to content
Snippets Groups Projects
Commit 4293e357 authored by Alessandro Vullo's avatar Alessandro Vullo
Browse files

[ENSCORESW-1997]. Enable local load data feature at the specific driver level.

Unfortunately, creating an appropriate test turns out to be extremely incovenient
as one must make sure the underlying DBD::mysql has been compiled against a C library
where this feature is turned off.

This approach has been tested at the base class level and it seems to be working, so this
is more for:
- the team to quickly have a look and make appropriate suggestions;
- Andy Y to set up a proper test environment, run a test and confirm, as we've discussed.
parent 20c92622
No related branches found
No related tags found
2 merge requests!161[ENSCORESW-1997]. Enable local load data feature at the specific driv…,!161[ENSCORESW-1997]. Enable local load data feature at the specific driv…
......@@ -34,6 +34,20 @@ use strict;
use base 'Bio::EnsEMBL::DBSQL::Driver';
#
# override parent's method to enable MySQL local load data in case DBD::mysql
# has been compiled against a C client library which has been built with
# no support for this feature
#
sub connect_params {
my ($self, $conn) = @_;
my $params = $self->SUPER::connect_params($conn);
$params->{attributes}{mysql_local_infile} = 1;
return $params;
}
sub from_date_to_seconds {
my ($self, $column) = @_;
return "UNIX_TIMESTAMP($column)";
......
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