mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix sql bug
This commit is contained in:
@@ -6,7 +6,11 @@
|
||||
## 5.1.0
|
||||
|
||||
### 新特性
|
||||
* 【core 】 新增WatchServer(issue#440@Github)
|
||||
|
||||
|
||||
### Bug修复
|
||||
* 【db 】 修复SqlExecutor.callQuery关闭Statement导致的问题(issue#I16981@Gitee)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user