mirror of
https://github.com/actiontech/dble.git
synced 2026-01-02 19:00:28 -06:00
fix: The priority table of sqlMaxLimit is greater than the schema
inner 720
This commit is contained in:
@@ -528,11 +528,11 @@ public class DruidSelectParser extends DefaultDruidParser {
|
||||
int needAddLimitSize = needAddLimitSize(sqlSchema, rrs, mysqlSelectQuery, allConditions);
|
||||
if (needAddLimitSize >= 0) {
|
||||
SQLLimit limit = new SQLLimit();
|
||||
limit.setRowCount(new SQLIntegerExpr(limitSize));
|
||||
limit.setRowCount(new SQLIntegerExpr(needAddLimitSize));
|
||||
mysqlSelectQuery.setLimit(limit);
|
||||
rrs.setLimitSize(limitSize);
|
||||
rrs.setLimitSize(needAddLimitSize);
|
||||
String sql = RouterUtil.removeSchema(statementToString(stmt), sqlSchema.getName());
|
||||
rrs.changeNodeSqlAfterAddLimit(sql, 0, limitSize);
|
||||
rrs.changeNodeSqlAfterAddLimit(sql, 0, needAddLimitSize);
|
||||
}
|
||||
SQLLimit limit = mysqlSelectQuery.getLimit();
|
||||
if (limit != null && needAddLimitSize < 0) {
|
||||
|
||||
Reference in New Issue
Block a user