Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support setClob without length restrictions #3470

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Support setClob without length restrictions #3470

monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2014-04-11 10:32:07 +0200
From: @hannesmuehleisen
To: clients devs <>
Version: -- development
CC: martin.van.dinther

Last updated: 2018-05-31 18:39:28 +0200

Comment 19740

Date: 2014-04-11 10:32:07 +0200
From: @hannesmuehleisen

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36
Build Identifier:

setClob() currently requires a length if a stream reader is passed. Since the stream reader returns -1 if the end of stream is reached, we can simply read until that happens.

Reproducible: Always

Steps to Reproduce:

PreparedStatement stmt = con.prepareStatement("insert into clobtest values(?);");
stmt.setClob(1, new StringReader("ABCDEDFG"));
stmt .execute();

Actual Results:

SQLFeatureNotSupportedException

Expected Results:

Parameter is set

Comment 19741

Date: 2014-04-11 11:45:48 +0200
From: MonetDB Mercurial Repository <>

Changeset 155ec42a591b made by Hannes Muehleisen hannes@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=155ec42a591b

Changeset description:

JDBC Connector: setClob() fixes for Bug #3470

Comment 19742

Date: 2014-04-11 11:46:19 +0200
From: @hannesmuehleisen

Found an issue in the other setClob() method while I was at it, it did not work at all.

Comment 26056

Date: 2018-01-04 16:37:49 +0100
From: MonetDB Mercurial Repository <>

Changeset 361fc7902a94, made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the monetdb-java repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=361fc7902a94

Changeset description:

Extend PreparedStatement test with calling setClob(int, Clob) and setClob(int, Reader) methods.
This completes the fix for bug #3470

Comment 26471

Date: 2018-05-31 18:39:28 +0200
From: Martin van Dinther <<martin.van.dinther>>

A new version (2.28) of the MonetDB JDBC driver is released, see
https://www.monetdb.org/downloads/Java/
which includes the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant