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.

The information contained in this message is confidential and is intended for the addressee only. If you are not the addressee, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. Any views or opinions presented are those of the sender and do not necessarily represent the Wellbeing Software Group. Wellbeing Software Ltd is a company registered in England and Wales with company number 07925070.
Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15126: bug report for pgAdmin 4 v2.1
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15127: epoch lies 1 hour ahead