Specifically, if similarly-named tables exist in multiple schemas, we
might get the column info for the wrong one.
Revision history for Perl extension DBIx::Class::Schema::Loader
- Allow coderef maps to call back into the hashref mapping code
+ - Fix MySQL column info detection with multiple schemas (RT#82358)
0.07037 2013-10-30
- Allow overriding individual moniker parts
my ($precision, $scale, $column_type, $default) = eval { $self->dbh->selectrow_array(<<'EOF', {}, $table->name, lc($col)) };
SELECT numeric_precision, numeric_scale, column_type, column_default
FROM information_schema.columns
-WHERE table_name = ? AND lower(column_name) = ?
+WHERE table_schema = schema() AND table_name = ? AND lower(column_name) = ?
EOF
my $has_information_schema = not $@;