Skip to content

Commit

Permalink
Add missing offset for mysql pagination
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <[email protected]>
  • Loading branch information
lukasj committed May 30, 2024
1 parent e60e793 commit 75029ea
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public class MySQLPlatform extends DatabasePlatform {


private static final String LIMIT = " LIMIT ";
private static final String OFFSET = " OFFSET ";

/** Support fractional seconds in time values since MySQL v. 5.6.4. */
private boolean isFractionalTimeSupported;
Expand Down Expand Up @@ -908,9 +909,9 @@ public void printSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter prin
statement.setUseUniqueFieldAliases(true);
call.setFields(statement.printSQL(printer));
printer.printString(LIMIT);
printer.printParameter(DatabaseCall.FIRSTRESULT_FIELD);
printer.printString(", ");
printer.printParameter(DatabaseCall.MAXROW_FIELD);
printer.printString(OFFSET);
printer.printParameter(DatabaseCall.FIRSTRESULT_FIELD);
statement.appendForUpdateClause(printer);
call.setIgnoreFirstRowSetting(true);
call.setIgnoreMaxResultsSetting(true);
Expand Down

0 comments on commit 75029ea

Please sign in to comment.