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=486594e6a5a49c39c2ac29790ec4b799240682bf;hpb=4ceaa6b5f05de445c7ffd4c47da2c81006050e62;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/mysql.pm b/lib/DBIx/Class/Storage/DBI/mysql.pm index 486594e..7d80187 100644 --- a/lib/DBIx/Class/Storage/DBI/mysql.pm +++ b/lib/DBIx/Class/Storage/DBI/mysql.pm @@ -51,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) = @_; @@ -99,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