提交 4d39695f authored 作者: noelgrandin's avatar noelgrandin

simplify, don't need this catch block here

上级 98108322
...@@ -408,12 +408,11 @@ public class LobStorageBackend implements LobStorageInterface { ...@@ -408,12 +408,11 @@ public class LobStorageBackend implements LobStorageInterface {
} }
} }
private ValueLobDb registerLob(int type, long lobId, int tableId, long byteCount, long precision) { private ValueLobDb registerLob(int type, long lobId, int tableId, long byteCount, long precision) throws SQLException {
assertNotHolds(conn.getSession()); assertNotHolds(conn.getSession());
// see locking discussion at the top // see locking discussion at the top
synchronized (database) { synchronized (database) {
synchronized (conn.getSession()) { synchronized (conn.getSession()) {
try {
String sql = "INSERT INTO " + LOBS + "(ID, BYTE_COUNT, TABLE) VALUES(?, ?, ?)"; String sql = "INSERT INTO " + LOBS + "(ID, BYTE_COUNT, TABLE) VALUES(?, ?, ?)";
PreparedStatement prep = prepare(sql); PreparedStatement prep = prepare(sql);
prep.setLong(1, lobId); prep.setLong(1, lobId);
...@@ -423,9 +422,6 @@ public class LobStorageBackend implements LobStorageInterface { ...@@ -423,9 +422,6 @@ public class LobStorageBackend implements LobStorageInterface {
reuse(sql, prep); reuse(sql, prep);
ValueLobDb v = ValueLobDb.create(type, database, tableId, lobId, null, precision); ValueLobDb v = ValueLobDb.create(type, database, tableId, lobId, null, precision);
return v; return v;
} catch (SQLException e) {
throw DbException.convert(e);
}
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论