DBIx::Connector::Driver::mysql - MySQL-specific connection interface


DBIx-Connector documentation Contained in the DBIx-Connector distribution.

Index


Code Index:

Name

Top

DBIx::Connector::Driver::mysql - MySQL-specific connection interface

Description

Top

This subclass of DBIx::Connector::Driver provides MySQL-specific implementations of the following methods:

savepoint
release
rollback_to

It also modifies the connection attributes as follows:

mysql_auto_reconnect

Will always be set to false. This is to prevent MySQL's auto-reconnection feature from interfering with DBIx::Connector's auto-reconnection functionality in fixup mode.

Authors

Top

This module was written and is maintained by:

David E. Wheeler <david@kineticode.com>

It is based on code written by:

Matt S. Trout <mst@shadowcatsystems.co.uk>
Peter Rabbitson <rabbit+dbic@rabbit.us>

Copyright and License

Top


DBIx-Connector documentation Contained in the DBIx-Connector distribution.

package DBIx::Connector::Driver::mysql;

use strict;
use warnings;
use base 'DBIx::Connector::Driver';
our $VERSION = '0.45';

sub _connect {
    my ($self, $dbh) = @_;
    $dbh->{mysql_auto_reconnect} = 0;
    $dbh;
}

sub savepoint {
    my ($self, $dbh, $name) = @_;
    $dbh->do("SAVEPOINT $name");
}

sub release {
    my ($self, $dbh, $name) = @_;
    $dbh->do("RELEASE SAVEPOINT $name");
}

sub rollback_to {
    my ($self, $dbh, $name) = @_;
    $dbh->do("ROLLBACK TO SAVEPOINT $name");
}

1;
__END__