setBinaryStream can abandon connection

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема setBinaryStream can abandon connection
Дата
Msg-id Pine.BSO.4.56.0410170735120.16087@leary.csoft.net
обсуждение исходный текст
Ответы Re: setBinaryStream can abandon connection  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Currently using setBinaryStream over a v3 protocol connection can
completely break your connection if you happen to get the length wrong or
your InputStream throws an Exception the driver will simply close your
connection giving you no chance to rollback.  This patch fixes that by
continuing to pump fake data into the Bind message and simply not issuing
the Execute message.

This isn't ideal because it doesn't actually force a backend error so it
is possible to issue a commit later that will succeed instead of failing,
but I still think it's better than the current behavior.  I suppose we
could deliberately introduce a syntax error or something if in not in
autocommit mode.

Finally do we need a special -1 length argument to tell the driver we
don't know the length.  This will force a copy of the stream instead of
the current direct streaming to the backend, but a memory hog is better
than not working at all.

Kris Jurka

Вложения

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: A solution to the SSL customizing problem
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: A solution to the SSL customizing problem