ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [23/33] ignite git commit: IGNITE-5426: JdbcThinConnection.readOnly state propagation. This closes #2200.
Date Wed, 05 Jul 2017 11:24:05 GMT
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 <tledkov@gridgain.com>
Authored: Wed Jul 5 11:18:48 2017 +0300
Committer: devozerov <vozerov@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} */


Mime
View raw message