3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
22 Please email comments or questions to the
public Ensembl
23 developers list at <http:
25 Questions may also be sent to the Ensembl help desk at
30 package Bio::EnsEMBL::DBSQL::Driver::mysql;
35 use base
'Bio::EnsEMBL::DBSQL::Driver';
38 # override parent's method to enable MySQL local load data in case DBD::mysql
39 # has been compiled against a C client library which has been built with
40 # no support for this feature
43 my ($self, $conn) = @_;
45 my $params = $self->SUPER::connect_params($conn);
46 $params->{attributes}{mysql_local_infile} = 1;
51 sub from_date_to_seconds {
52 my ($self, $column) = @_;
53 return "UNIX_TIMESTAMP($column)";
56 sub from_seconds_to_date {
57 my ($self, $seconds) = @_;
58 return "from_unixtime($seconds)";
61 sub last_insert_id_args {
62 return (undef, undef, undef, undef);
65 sub insert_ignore_clause {
66 return 'INSERT IGNORE';
69 sub can_straight_join {
73 sub set_wait_timeout {
74 my ($self, $dbh, $timeout) = @_;
75 $dbh->do(
"SET SESSION wait_timeout=${timeout}" );