Changeset: 318b2593135b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=318b2593135b
Modified Files:
        java/ChangeLog.Apr2011
        java/src/nl/cwi/monetdb/jdbc/MonetConnection.java
Branch: Apr2011
Log Message:

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.


diffs (22 lines):

diff --git a/java/ChangeLog.Apr2011 b/java/ChangeLog.Apr2011
--- a/java/ChangeLog.Apr2011
+++ b/java/ChangeLog.Apr2011
@@ -1,3 +1,6 @@
 # ChangeLog file for java
 # This file is updated with Maddlog
 
+* Mon Jun  6 2011 Fabian Groffen <[email protected]>
+- Allow readonly to be set when autocommit is disabled as well.  Bug #2818
+
diff --git a/java/src/nl/cwi/monetdb/jdbc/MonetConnection.java 
b/java/src/nl/cwi/monetdb/jdbc/MonetConnection.java
--- a/java/src/nl/cwi/monetdb/jdbc/MonetConnection.java
+++ b/java/src/nl/cwi/monetdb/jdbc/MonetConnection.java
@@ -918,8 +918,6 @@
         *         method is called during a transaction.
         */
        public void setReadOnly(boolean readOnly) throws SQLException {
-               if (autoCommit == false) throw
-                       new SQLException("changing read-only setting not 
allowed during transactions");
                if (readOnly == false)
                        addWarning("cannot setReadOnly(false): writable mode 
not supported");
        }
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to