You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/07/05 11:24:05 UTC

[23/33] ignite git commit: IGNITE-5426: JdbcThinConnection.readOnly state propagation. This closes #2200.

IGNITE-5426: JdbcThinConnection.readOnly state propagation. This closes #2200.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/44fad244
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/44fad244
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/44fad244

Branch: refs/heads/ignite-2.1.2-exchange
Commit: 44fad244aa40f552159af153fefdf25d47c7375e
Parents: 54572c3
Author: tledkov-gridgain <tl...@gridgain.com>
Authored: Wed Jul 5 11:18:48 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Wed Jul 5 11:18:48 2017 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/jdbc/thin/JdbcThinConnection.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/44fad244/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
index 14c34ee..89ef2fc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
@@ -76,6 +76,9 @@ public class JdbcThinConnection implements Connection {
     /** Auto commit flag. */
     private boolean autoCommit;
 
+    /** Read-only flag. */
+    private boolean readOnly;
+
     /** Current transaction holdability. */
     private int holdability;
 
@@ -277,13 +280,15 @@ public class JdbcThinConnection implements Connection {
     /** {@inheritDoc} */
     @Override public void setReadOnly(boolean readOnly) throws SQLException {
         ensureNotClosed();
+
+        this.readOnly = readOnly;
     }
 
     /** {@inheritDoc} */
     @Override public boolean isReadOnly() throws SQLException {
         ensureNotClosed();
 
-        return true;
+        return readOnly;
     }
 
     /** {@inheritDoc} */