MT#59727 mysql: support LIMIT in sub SELECT

Change-Id: Ic3a3f7e113ed9a90dd2af16393207ede4b5e4585
mr13.0
Rene Krenn 8 months ago
parent 2f56063aff
commit cba4695e57

@ -188,12 +188,17 @@ sub vacuum {
}
sub paginate_sort_query {
my $self = shift;
my $statement = shift;
my $offset = shift;
my $limit = shift;
my $sortingconfigurations = shift;
if ($statement =~ /limit\s+\d+(,\s*\d+)?\s*$/i) {
$statement = "SELECT * FROM ($statement) AS _ps";
}
my $orderby = $self->_orderby_columns($sortingconfigurations);
if (length($orderby) > 0) {
$statement .= ' ORDER BY ' . $orderby;
@ -937,7 +942,7 @@ sub rowblock_transactional {
sub db_get_rowblock {
my $self = shift;
my $max_rows = shift;
my $max_rows = shift; #https://www.perlmonks.org/?node_id=273952
if ($enablemultithreading) {

Loading…
Cancel
Save