X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;fp=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=d6c637010922c64a15c64b153f836753e2bf3c8e;hb=aed5b8a46a2e48adeeb790c06906c4d48f190043;hp=3b9c10cfed5c4ff0a5a6844e18e10f745a4ce360;hpb=e91e756c9730a33b881db5ab73f5bb3352d53d06;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 3b9c10c..d6c6370 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1122,6 +1122,9 @@ sub _select { } else { $self->throw_exception("rows attribute must be positive if present") if (defined($attrs->{rows}) && !($attrs->{rows} > 0)); + + # MySQL actually recommends this approach. I cringe. + $attrs->{rows} = 2**48 if not defined $attrs->{rows} and defined $attrs->{offset}; push @args, $attrs->{rows}, $attrs->{offset}; }