1 package # hide from PAUSE
11 # offset the warning from DBIx::Class::Schema on 5.8
12 # keep the ::Schema default as-is otherwise
13 DBIx::Class::_ENV_::OLD_MRO
15 ( eval <<'EOS' or die $@ );
17 sub setup_schema_instance {
18 my $s = shift->next::method(@_);
19 $s->schema_sanity_checker('');
27 use base qw(DBIx::Class::CDBICompat);
29 my @connect = (@ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/}, { PrintError => 0});
30 # this is only so we grab a lock on mysql
32 my $x = DBICTest::Schema->connect(@connect);
35 our $dbh = DBI->connect(@connect) or die DBI->errstr;
39 $dbh->do("DROP TABLE $_") for @table;
43 __PACKAGE__->connection(@connect);
47 $class->table($class->create_test_table);
50 sub create_test_table {
52 my $table = $self->next_available_table;
53 my $create = sprintf "CREATE TABLE $table ( %s )", $self->create_sql;
59 sub next_available_table {
62 $dbh->selectcol_arrayref(
68 my $table = $tables[-1] || "aaa";