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

PreparedStatements may throw NullPointerException when setting parameter #3288

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

Comments

@monetdb-team
Copy link

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

Date: 2013-05-23 19:49:04 +0200
From: Ben Reilly <>
To: clients devs <>
Version: 11.15.7 (Feb2013-SP2)
CC: ben

Last updated: 2013-07-03 08:48:03 +0200

Comment 18745

Date: 2013-05-23 19:49:04 +0200
From: Ben Reilly <>

Some of the setXYZ(...) methods in MonetPreparedStatement.java do not allow for the parameter to be null, resulting in an exception. For instance, setTimestamp(...) and setDate(...) do not check if the parameter 'x' is null before trying to call `x.toString()'.

Not all methods are affected, however: setBytes(...), for example, checks if 'x' is null and calls setNull(...) as necessary, which is the expected behaviour (the JDBC drivers for MySQL and PostgreSQL both do this in all cases).

Comment 18746

Date: 2013-05-23 20:10:02 +0200
From: MonetDB Mercurial Repository <>

Changeset 0d3537514b4e made by Fabian Groffen fabian@monetdb.org in the MonetDB repo, refers to this bug.

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

Changeset description:

PreparedStatement: properly handle null for setXXX() methods, bug #3288

Comment 18747

Date: 2013-05-23 20:10:46 +0200
From: @grobian

Thanks, fixed for the next release

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