Switch to C3 mro throughout the ::Storage hierarchy (DBIx::Class brings in MRO::Compa...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / mysql.pm
index 9432d0c..0eb53d2 100644 (file)
@@ -8,6 +8,7 @@ use base qw/
   DBIx::Class::Storage::DBI::AmbiguousGlob
   DBIx::Class::Storage::DBI
 /;
+use mro 'c3';
 
 __PACKAGE__->sql_maker_class('DBIx::Class::SQLAHacks::MySQL');
 
@@ -19,6 +20,12 @@ sub with_deferred_fk_checks {
   $self->dbh->do('SET foreign_key_checks=1');
 }
 
+sub connect_call_set_ansi_mode {
+  my $self = shift;
+  $self->dbh->do(q|SET sql_mode = 'ANSI,TRADITIONAL'|);
+  $self->dbh->do(q|SET sql_mode = 'ANSI,TRADITIONAL'|);
+}
+
 sub _dbh_last_insert_id {
   my ($self, $dbh, $source, $col) = @_;
   $dbh->{mysql_insertid};