btm icon indicating copy to clipboard operation
btm copied to clipboard

LruStatementCache is broken.

Open rankinc opened this issue 10 years ago • 8 comments

The following test fails:

PreparedStatement stmt = c.prepareStatement(DB_SELECT_SYSDATE_SQL);
assertFalse(stmt.isClosed());
stmt.close();
assertTrue(stmt.isClosed());

stmt = c.prepareStatement(DB_SELECT_SYSDATE_SQL);
assertFalse(stmt.isClosed());

The problem is that the proxies inside the LruStatementCache are never replaced, which means that once "pretendClosed = true", it remains true until the statement is evicted from the cache.

rankinc avatar May 25 '14 11:05 rankinc