From: Rafael Kitover Date: Tue, 13 Apr 2010 06:57:45 +0000 (-0400) Subject: match quotes in MySQL parser in more places (RT#42101) X-Git-Tag: 0.07000~67 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be72dba7c8aa2d4872a66a6d581d353ad29a6deb;p=dbsrgits%2FDBIx-Class-Schema-Loader.git match quotes in MySQL parser in more places (RT#42101) --- diff --git a/Changes b/Changes index f3f02a9..8e4c6ef 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ Revision history for Perl extension DBIx::Class::Schema::Loader + - match quotes in MySQL parser in more places (RT#42101) - fix unique detection in DB2 for multiple schemas (RT#39622) - fix column name collisions with methods (RT#49443) - fix loading MySQL views on older MySQL versions (RT#47399) diff --git a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm index db38ef9..761515e 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm @@ -56,10 +56,10 @@ sub _table_fk_info { my $f_cols = shift @reldata; my @cols = map { s/(?: \Q$self->{_quoter}\E | $qt )//x; lc $_ } - split(/\s*,\s*/, $cols); + split(/$qt?\s*$qt?,$qt?\s*$qt?/, $cols); my @f_cols = map { s/(?: \Q$self->{_quoter}\E | $qt )//x; lc $_ } - split(/\s*,\s*/, $f_cols); + split(/$qt?\s*$qt?,$qt?\s*$qt?/, $f_cols); push(@rels, { local_columns => \@cols,