fix sql bug

This commit is contained in:
Looly 2019-12-06 20:13:11 +08:00
parent 9029b10a52
commit b0ade3f1d6
2 changed files with 5 additions and 7 deletions

View File

@ -6,7 +6,11 @@
## 5.1.0
### 新特性
* 【core 】 新增WatchServerissue#440@Github
### Bug修复
* 【db 】 修复SqlExecutor.callQuery关闭Statement导致的问题issue#I16981@Gitee
-------------------------------------------------------------------------------------------------------------

View File

@ -92,13 +92,7 @@ public class SqlExecutor {
* @since 4.1.4
*/
public static ResultSet callQuery(Connection conn, String sql, Object... params) throws SQLException {
CallableStatement proc = null;
try {
proc = StatementUtil.prepareCall(conn, sql, params);
return proc.executeQuery();
} finally {
DbUtil.close(proc);
}
return StatementUtil.prepareCall(conn, sql, params).executeQuery();
}
/**