}
}
+# the "oh noes offset/top without limit" constant
+sub __max_int { 0xFFFFFFFF };
+
# Tries to determine limit dialect.
#
}
elsif (defined $attrs->{offset}) {
# MySQL actually recommends this approach. I cringe.
- $attrs->{rows} = 2**32;
+ $attrs->{rows} = $sql_maker->__max_int;
}
my @limit;
$self->throw_exception(
'An ordered subselect encountered - this is not safe! Please see "Ordered Subselects" in DBIx::Class::Storage::DBI::MSSQL
') unless $attrs->{unsafe_subselect_ok};
- my $max = 2 ** 32;
+ my $max = $self->sql_maker->__max_int;
$sql =~ s/^ \s* SELECT \s/SELECT TOP $max /xi;
}