[Bast-commits] r7486 -
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Sep 2 11:00:08 GMT 2009
Author: ribasushi
Date: 2009-09-02 11:00:07 +0000 (Wed, 02 Sep 2009)
New Revision: 7486
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/mysql.pm
Log:
Mysql v3 support (ick)
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/mysql.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/mysql.pm 2009-09-02 10:42:39 UTC (rev 7485)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/mysql.pm 2009-09-02 11:00:07 UTC (rev 7486)
@@ -33,6 +33,21 @@
$dbh->{mysql_insertid};
}
+# we need to figure out what mysql version we're running
+sub sql_maker {
+ my $self = shift;
+
+ unless ($self->_sql_maker) {
+ my $maker = $self->next::method (@_);
+
+ # mysql 3 does not understand a bare JOIN
+ my $mysql_ver = $self->_get_dbh->get_info(18);
+ $maker->{_default_jointype} = 'INNER' if $mysql_ver =~ /^3/;
+ }
+
+ return $self->_sql_maker;
+}
+
sub sqlt_type {
return 'MySQL';
}
More information about the Bast-commits
mailing list