X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2Fmysql.pm;h=7d8018798f5a4afef6b8c97fbc5a572c50abf25a;hb=96736321fa6fb1efc9e471b037e508778188dbbe;hp=20e4f7fd834579fa65f1667f6edd6e460925bbf9;hpb=3c01add80ad3aa8bab29f0b994ce7a83a4328a4d;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/mysql.pm b/lib/DBIx/Class/Storage/DBI/mysql.pm index 20e4f7f..7d80187 100644 --- a/lib/DBIx/Class/Storage/DBI/mysql.pm +++ b/lib/DBIx/Class/Storage/DBI/mysql.pm @@ -5,7 +5,6 @@ use warnings; use base qw/ DBIx::Class::Storage::DBI::MultiColumnIn - DBIx::Class::Storage::DBI::AmbiguousGlob DBIx::Class::Storage::DBI /; use mro 'c3'; @@ -52,6 +51,23 @@ sub sqlt_type { return 'MySQL'; } +sub deployment_statements { + my $self = shift; + my ($schema, $type, $version, $dir, $sqltargs, @rest) = @_; + + $sqltargs ||= {}; + + if ( + ! exists $sqltargs->{producer_args}{mysql_version} + and + my $dver = $self->_server_info->{normalized_dbms_version} + ) { + $sqltargs->{producer_args}{mysql_version} = $dver; + } + + $self->next::method($schema, $type, $version, $dir, $sqltargs, @rest); +} + sub _svp_begin { my ($self, $name) = @_; @@ -100,7 +116,12 @@ C<$storage> object into this class. =head1 DESCRIPTION -This class implements MySQL specific bits of L. +This class implements MySQL specific bits of L, +like AutoIncrement column support and savepoints. Also it augments the +SQL maker to support the MySQL-specific C join type, which +you can use by specifying C<< join_type => 'straight' >> in the +L + It also provides a one-stop on-connect macro C which sets session variables such that MySQL behaves more predictably as far as the