Closes #2299 - remove lock from the query when unnecessary
This commit is contained in:
parent
e0ae4b9907
commit
1a965a0619
|
@ -72,7 +72,9 @@ public class TaskQuerySqlProvider {
|
|||
+ "<if test='selectAndClaim == true'> "
|
||||
+ "FETCH FIRST ROW ONLY FOR UPDATE "
|
||||
+ "</if>"
|
||||
+ "<if test=\"_databaseId == 'db2'\">WITH RS USE AND KEEP UPDATE LOCKS </if>"
|
||||
+ "<if test=\"_databaseId == 'db2' and selectAndClaim \">WITH RS USE "
|
||||
+ "AND KEEP UPDATE LOCKS </if>"
|
||||
+ "<if test=\"_databaseId == 'db2' and !selectAndClaim \">WITH UR </if>"
|
||||
+ CLOSING_SCRIPT_TAG;
|
||||
}
|
||||
|
||||
|
@ -429,9 +431,7 @@ public class TaskQuerySqlProvider {
|
|||
}
|
||||
|
||||
private static String openOuterClauseForGroupByPorOrSor() {
|
||||
return "<if test=\"groupByPor or groupBySor != null\"> "
|
||||
+ "SELECT * FROM ("
|
||||
+ "</if> ";
|
||||
return "<if test=\"groupByPor or groupBySor != null\"> " + "SELECT * FROM (" + "</if> ";
|
||||
}
|
||||
|
||||
private static String closeOuterClauseForGroupByPor() {
|
||||
|
|
Loading…
Reference in New Issue