File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
src/main/java/org/apache/ibatis/executor/statement Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,8 @@ private StatementUtil() {
41
41
* @throws SQLException if a database access error occurs, this method is called on a closed <code>Statement</code>
42
42
*/
43
43
public static void applyTransactionTimeout (Statement statement , Integer queryTimeout , Integer transactionTimeout ) throws SQLException {
44
- if (transactionTimeout == null ){
45
- return ;
46
- }
47
- Integer timeToLiveOfQuery = null ;
48
- if (queryTimeout == null || queryTimeout == 0 || transactionTimeout < queryTimeout ) {
49
- timeToLiveOfQuery = transactionTimeout ;
50
- }
51
- if (timeToLiveOfQuery != null ) {
52
- statement .setQueryTimeout (timeToLiveOfQuery );
44
+ if (transactionTimeout != null && queryTimeout == null || queryTimeout == 0 || transactionTimeout < queryTimeout ) {
45
+ statement .setQueryTimeout (transactionTimeout );
53
46
}
54
47
}
55
48
You can’t perform that action at this time.
0 commit comments