JDBC issue - 2 ResultSets getting data via a single Connection - thedate functions interact.
От | David Irving |
---|---|
Тема | JDBC issue - 2 ResultSets getting data via a single Connection - thedate functions interact. |
Дата | |
Msg-id | DB5PR06MB146484924634EBE97B823E3AFFA90@DB5PR06MB1464.eurprd06.prod.outlook.com обсуждение исходный текст |
Ответы |
Re: JDBC issue - 2 ResultSets getting data via a single Connection -the date functions interact.
|
Список | pgsql-bugs |
Hi,
I am not sure if this is a real bug, as one should not access 2 ResultSets from the same connection at the same time from different threads.
But that is the legacy code I am looking at.
I have 2 ResultSet getDate(…) calls taking place in different threads.
The ResultSet calls getConnection().getTimestampUtils()…
And then gets the TimestampUtils convertDate or getDateBin() type functions.
These are not synchronized, so I am getting data from 1 result set turning up in the getDate() function on the other ResultSet running in the other thread.
Not sure if this is something you would like to fix, due to the non-standard way of working, but here is the TimestampUtils.java I modified to test the code.
I added a method…
public static boolean isCrisVersion() {
return true;
}
To check I was loading a separate version of the TimestampUtils.
Dave Irving
Healthcare Software Services.
P.S The JDBC driver I was using was 42.2.2 released a few days ago.
Вложения
В списке pgsql-bugs по дате отправления: