You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Date: 2011-06-05 22:35:41 +0200
From: Martin Weindel <>
To: clients devs <>
Version: 11.3.3 (Apr2011-SP1) [obsolete]
Last updated: 2011-07-29 10:52:45 +0200
Comment 15833
Date: 2011-06-05 22:35:41 +0200
From: Martin Weindel <>
User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.71 Safari/534.24
Build Identifier:
If you call MonetConnection.setReadOnly(boolean) and autocommit is turned off, a SQLException is thrown.
As this call of setReadOnly is done be a framework I'm using, I cannot avoid it easily.
Reproducible: Always
Steps to Reproduce:
getConnection()
call MonetConnection.setAutoCommit(false)
call MonetConnection.setReadOnly(false)
The understanding of setReadOnly/isReadOnly in MonetConnection seems to be a little odd to me, if I read its JavaDoc: "MonetDB doesn't support writable ResultSets, hence an SQLWarning is generated if attempted to set to false here."
But setReadOnly has nothing to do with resultsets directly.
The JDBC specification does not specify this method explicitly, but the JavaDoc of java.lang.Connection says "Puts this connection in read-only mode as a hint to the driver to enable database optimizations.", and more importantly: "Throws:
SQLException - SQLException if a database access error occurs or this method is called on a closed connection"
This means:
Calling setReadOnly is only a hint and should not throw an exception on normal circumstances
MonetConnection should behave like may others JDBC drivers and just ignore the call of setReadOnly (you can check if the connection is closed if you want to be perfect specification conform)
isReadOnly should return false and not true as in MonetConnection, as the connection to the MonetDB can still execute write statements.
JDBC: don't throw an exception from setReadOnly
Bug #2818, don't throw an exception from Connection.setReadOnly when
autocommit is disabled. Since setReadOnly is not implemented at all
anyway, don't make it throw exceptions that may upset frameworks that
call these methods just to be sure.
JDBC: properly advertise Connection read-only mode
JDBC's Connection read-only mode appears to be just a hint to the driver
to enable certain optimisations, if possible. It has nothing to do with
being able to write to the database (or make modifications). Hence, a
Connection with MonetDB is never read-only, and setReadOnly should only
emit a warning when called with true.
Thanks to Martin Weindel for pointing this out in bug #2818.
Date: 2011-06-05 22:35:41 +0200
From: Martin Weindel <>
To: clients devs <>
Version: 11.3.3 (Apr2011-SP1) [obsolete]
Last updated: 2011-07-29 10:52:45 +0200
Comment 15833
Date: 2011-06-05 22:35:41 +0200
From: Martin Weindel <>
User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.71 Safari/534.24
Build Identifier:
If you call MonetConnection.setReadOnly(boolean) and autocommit is turned off, a SQLException is thrown.
As this call of setReadOnly is done be a framework I'm using, I cannot avoid it easily.
Reproducible: Always
Steps to Reproduce:
The understanding of setReadOnly/isReadOnly in MonetConnection seems to be a little odd to me, if I read its JavaDoc: "MonetDB doesn't support writable ResultSets, hence an SQLWarning is generated if attempted to set to false here."
But setReadOnly has nothing to do with resultsets directly.
The JDBC specification does not specify this method explicitly, but the JavaDoc of java.lang.Connection says "Puts this connection in read-only mode as a hint to the driver to enable database optimizations.", and more importantly: "Throws:
SQLException - SQLException if a database access error occurs or this method is called on a closed connection"
This means:
Comment 15834
Date: 2011-06-06 10:57:40 +0200
From: @grobian
Thank you for your concise report.
You get an exception, because of this phrase in the Javadoc:
Note: This method cannot be called during a transaction.
I understand that the framework you use does not expect this, so I'm lenient towards changing this behaviour, essentially ignoring the note.
Comment 15835
Date: 2011-06-06 11:20:41 +0200
From: @grobian
Changeset 318b2593135b made by Fabian Groffen fabian@cwi.nl in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=318b2593135b
Changeset description:
Comment 15836
Date: 2011-06-06 11:20:42 +0200
From: @grobian
Changeset ccf366781fc3 made by Fabian Groffen fabian@cwi.nl in the MonetDB repo, refers to this bug.
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ccf366781fc3
Changeset description:
Comment 15837
Date: 2011-06-06 11:21:43 +0200
From: @grobian
The next release should include the fixes you need. Thanks.
Comment 16009
Date: 2011-07-29 10:52:45 +0200
From: @sjoerdmullender
The Apr2011-SP2 bugfix release is out.
The text was updated successfully, but these errors were encountered: