This is an automated email from the ASF dual-hosted git repository.

nizhikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new a24c4ed6e50 IGNITE-21927 Removal of MVCC-related code from JDBC 
classes (#11507)
a24c4ed6e50 is described below

commit a24c4ed6e5082441156b4fa125ced7f7455689c9
Author: Maksim Davydov <[email protected]>
AuthorDate: Tue Sep 17 12:42:21 2024 +0300

    IGNITE-21927 Removal of MVCC-related code from JDBC classes (#11507)
---
 .../jdbc/thin/JdbcThinConnectionSelfTest.java      | 44 ------------
 .../internal/jdbc/thin/ConnectionProperties.java   | 10 ---
 .../jdbc/thin/ConnectionPropertiesImpl.java        | 37 +---------
 .../ignite/internal/jdbc/thin/JdbcThinTcpIo.java   |  3 +-
 .../processors/cache/query/SqlFieldsQueryEx.java   | 21 ------
 .../odbc/jdbc/JdbcConnectionContext.java           | 19 ++---
 .../processors/odbc/jdbc/JdbcRequestHandler.java   |  7 --
 .../odbc/odbc/OdbcConnectionContext.java           | 15 ++--
 .../processors/odbc/odbc/OdbcRequestHandler.java   |  8 ---
 .../internal/processors/query/NestedTxMode.java    | 60 ----------------
 .../main/resources/META-INF/classnames.properties  |  1 -
 .../processors/query/h2/QueryParameters.java       | 15 ----
 .../internal/processors/query/h2/QueryParser.java  |  6 --
 modules/platforms/cpp/odbc-test/CMakeLists.txt     |  1 -
 modules/platforms/cpp/odbc/CMakeLists.txt          |  1 -
 .../include/ignite/odbc/config/configuration.h     | 32 ---------
 .../ignite/odbc/config/connection_string_parser.h  |  3 -
 .../cpp/odbc/include/ignite/odbc/message.h         | 11 +++
 .../cpp/odbc/include/ignite/odbc/nested_tx_mode.h  | 81 ----------------------
 .../odbc/system/ui/dsn_configuration_window.h      | 12 +---
 .../win/src/system/ui/dsn_configuration_window.cpp | 36 ----------
 .../cpp/odbc/src/config/configuration.cpp          | 27 --------
 .../odbc/src/config/connection_string_parser.cpp   | 19 -----
 modules/platforms/cpp/odbc/src/dsn_config.cpp      |  5 --
 modules/platforms/cpp/odbc/src/message.cpp         |  2 +-
 modules/platforms/cpp/odbc/src/nested_tx_mode.cpp  | 80 ---------------------
 26 files changed, 30 insertions(+), 526 deletions(-)

diff --git 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java
 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java
index c8abd5ea63d..ce06c333928 100644
--- 
a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java
+++ 
b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.jdbc.thin;
 
-import java.net.InetSocketAddress;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
 import java.sql.DriverManager;
@@ -46,11 +45,8 @@ import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.binary.BinaryContext;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.binary.BinaryNoopMetadataHandler;
-import org.apache.ignite.internal.jdbc.thin.ConnectionProperties;
-import org.apache.ignite.internal.jdbc.thin.ConnectionPropertiesImpl;
 import org.apache.ignite.internal.jdbc.thin.JdbcThinConnection;
 import org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo;
-import org.apache.ignite.internal.util.HostAndPortRange;
 import org.apache.ignite.internal.util.lang.RunnableX;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgnitePredicate;
@@ -73,7 +69,6 @@ import static java.sql.ResultSet.TYPE_FORWARD_ONLY;
 import static java.sql.Statement.NO_GENERATED_KEYS;
 import static java.sql.Statement.RETURN_GENERATED_KEYS;
 import static org.apache.ignite.cache.query.SqlFieldsQuery.DFLT_LAZY;
-import static 
org.apache.ignite.configuration.ClientConnectorConfiguration.DFLT_PORT;
 import static org.apache.ignite.testframework.GridTestUtils.assertThrows;
 import static 
org.apache.ignite.testframework.GridTestUtils.assertThrowsAnyCause;
 import static org.apache.ignite.testframework.GridTestUtils.getFieldValue;
@@ -2104,45 +2099,6 @@ public class JdbcThinConnectionSelfTest extends 
JdbcThinAbstractSelfTest {
         }
     }
 
-    /**
-     * Test that attempting to supply invalid nested TX mode to driver fails 
on the client.
-     */
-    @Test
-    public void testInvalidNestedTxMode() {
-        assertThrows(null, new Callable<Object>() {
-            @Override public Object call() throws Exception {
-                DriverManager.getConnection(urlWithPartitionAwarenessProp + 
"&nestedTransactionsMode=invalid");
-
-                return null;
-            }
-        }, SQLException.class, "Invalid nested transactions handling mode");
-    }
-
-    /**
-     * Test that attempting to send unexpected name of nested TX mode to 
server on handshake yields an error.
-     * We have to do this without explicit {@link Connection} as long as 
there's no other way to bypass validation and
-     * supply a malformed {@link ConnectionProperties} to {@link 
JdbcThinTcpIo}.
-     */
-    @Test
-    public void testInvalidNestedTxModeOnServerSide() {
-        ConnectionPropertiesImpl connProps = new ConnectionPropertiesImpl();
-
-        connProps.setAddresses(new HostAndPortRange[] {new 
HostAndPortRange(LOCALHOST, DFLT_PORT, DFLT_PORT)});
-
-        connProps.nestedTxMode("invalid");
-
-        connProps.setPartitionAwareness(partitionAwareness);
-
-        assertThrows(null, new Callable<Object>() {
-            @SuppressWarnings("ResultOfObjectAllocationIgnored")
-            @Override public Object call() throws Exception {
-                new JdbcThinTcpIo(connProps, new InetSocketAddress(LOCALHOST, 
DFLT_PORT), getBinaryContext(), 0);
-
-                return null;
-            }
-        }, SQLException.class, "err=Invalid nested transactions handling mode: 
invalid");
-    }
-
     /**
      */
     @Test
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionProperties.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionProperties.java
index ffb271a7c65..c49f2868216 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionProperties.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionProperties.java
@@ -165,16 +165,6 @@ public interface ConnectionProperties {
      */
     public void setSkipReducerOnUpdate(boolean skipReducerOnUpdate);
 
-    /**
-     * @return Nested transactions handling strategy.
-     */
-    public String nestedTxMode();
-
-    /**
-     * @param nestedTxMode Nested transactions handling strategy.
-     */
-    public void nestedTxMode(String nestedTxMode);
-
     /**
      * Gets SSL connection mode.
      *
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionPropertiesImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionPropertiesImpl.java
index 6b311d31ed0..f69d907973f 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionPropertiesImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/ConnectionPropertiesImpl.java
@@ -27,10 +27,10 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.configuration.ClientConnectorConfiguration;
 import org.apache.ignite.internal.processors.odbc.SqlStateCode;
 import org.apache.ignite.internal.processors.odbc.jdbc.JdbcThinFeature;
-import org.apache.ignite.internal.processors.query.NestedTxMode;
 import org.apache.ignite.internal.util.HostAndPortRange;
 import org.apache.ignite.internal.util.typedef.F;
 import org.jetbrains.annotations.Nullable;
+
 import static org.apache.ignite.cache.query.SqlFieldsQuery.DFLT_LAZY;
 
 /**
@@ -103,29 +103,6 @@ public class ConnectionPropertiesImpl implements 
ConnectionProperties, Serializa
     private BooleanProperty skipReducerOnUpdate = new BooleanProperty(
         "skipReducerOnUpdate", "Enable execution update queries on ignite 
server nodes", false, false);
 
-    /** Nested transactions handling strategy. */
-    private StringProperty nestedTxMode = new StringProperty(
-        "nestedTransactionsMode",
-        "Way to handle nested transactions",
-        NestedTxMode.ERROR.name(),
-        new String[] {NestedTxMode.COMMIT.name(), NestedTxMode.ERROR.name(), 
NestedTxMode.IGNORE.name()},
-        false,
-        new PropertyValidator() {
-            private static final long serialVersionUID = 0L;
-
-            @Override public void validate(String mode) throws SQLException {
-                if (!F.isEmpty(mode)) {
-                    try {
-                        NestedTxMode.valueOf(mode.toUpperCase());
-                    }
-                    catch (IllegalArgumentException e) {
-                        throw new SQLException("Invalid nested transactions 
handling mode, allowed values: " +
-                            Arrays.toString(nestedTxMode.choices), 
SqlStateCode.CLIENT_CONNECTION_FAILED);
-                    }
-                }
-            }
-        });
-
     /** SSL: Use SSL connection to Ignite node. */
     private StringProperty sslMode = new StringProperty("sslMode",
         "The SSL mode of the connection", SSL_MODE_DISABLE,
@@ -273,7 +250,7 @@ public class ConnectionPropertiesImpl implements 
ConnectionProperties, Serializa
     /** Properties array. */
     private final ConnectionProperty[] propsArr = {
         distributedJoins, enforceJoinOrder, collocated, replicatedOnly, 
autoCloseServerCursor,
-        tcpNoDelay, lazy, socketSendBuffer, socketReceiveBuffer, 
skipReducerOnUpdate, nestedTxMode,
+        tcpNoDelay, lazy, socketSendBuffer, socketReceiveBuffer, 
skipReducerOnUpdate,
         sslMode, sslCipherSuites, sslProtocol, sslKeyAlgorithm,
         sslClientCertificateKeyStoreUrl, sslClientCertificateKeyStorePassword, 
sslClientCertificateKeyStoreType,
         sslTrustCertificateKeyStoreUrl, sslTrustCertificateKeyStorePassword, 
sslTrustCertificateKeyStoreType,
@@ -565,16 +542,6 @@ public class ConnectionPropertiesImpl implements 
ConnectionProperties, Serializa
         this.sslFactory.setValue(sslFactory);
     }
 
-    /** {@inheritDoc} */
-    @Override public String nestedTxMode() {
-        return nestedTxMode.value();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void nestedTxMode(String val) {
-        nestedTxMode.setValue(val);
-    }
-
     /** {@inheritDoc} */
     @Override public void setUsername(String name) {
         user.setValue(name);
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java
index c7762fa63b2..7ffc1cadbd6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java
@@ -70,6 +70,7 @@ import org.apache.ignite.lang.IgniteProductVersion;
 
 import static java.lang.Math.abs;
 import static 
org.apache.ignite.internal.jdbc.thin.JdbcThinUtils.nullableBooleanToByte;
+import static 
org.apache.ignite.internal.processors.odbc.jdbc.JdbcConnectionContext.DEFAULT_NESTED_TX_MODE;
 
 /**
  * JDBC IO layer implementation based on blocking IPC streams.
@@ -284,7 +285,7 @@ public class JdbcThinTcpIo {
         writer.writeBoolean(connProps.isSkipReducerOnUpdate());
 
         if (ver.compareTo(VER_2_7_0) >= 0)
-            writer.writeString(connProps.nestedTxMode());
+            writer.writeString(DEFAULT_NESTED_TX_MODE);
 
         if (ver.compareTo(VER_2_8_0) >= 0) {
             
writer.writeByte(nullableBooleanToByte(connProps.isDataPageScanEnabled()));
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/SqlFieldsQueryEx.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/SqlFieldsQueryEx.java
index 676e61cbb07..4f760b1d62d 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/SqlFieldsQueryEx.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/SqlFieldsQueryEx.java
@@ -21,7 +21,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
-import org.apache.ignite.internal.processors.query.NestedTxMode;
 import org.apache.ignite.internal.util.typedef.F;
 
 /**
@@ -40,9 +39,6 @@ public final class SqlFieldsQueryEx extends SqlFieldsQuery {
     /** Auto commit flag. */
     private boolean autoCommit = true;
 
-    /** Nested transactions handling mode. */
-    private NestedTxMode nestedTxMode = NestedTxMode.DEFAULT;
-
     /** Batched arguments list. */
     private List<Object[]> batchedArgs;
 
@@ -65,7 +61,6 @@ public final class SqlFieldsQueryEx extends SqlFieldsQuery {
         this.isQry = qry.isQry;
         this.skipReducerOnUpdate = qry.skipReducerOnUpdate;
         this.autoCommit = qry.autoCommit;
-        this.nestedTxMode = qry.nestedTxMode;
         this.batchedArgs = qry.batchedArgs;
     }
 
@@ -168,22 +163,6 @@ public final class SqlFieldsQueryEx extends SqlFieldsQuery 
{
         return skipReducerOnUpdate;
     }
 
-    /**
-     * @return Nested transactions handling mode - behavior when the user 
attempts to open a transaction in scope of
-     * another transaction.
-     */
-    public NestedTxMode getNestedTxMode() {
-        return nestedTxMode;
-    }
-
-    /**
-     * @param nestedTxMode Nested transactions handling mode - behavior when 
the user attempts to open a transaction
-     * in scope of another transaction.
-     */
-    public void setNestedTxMode(NestedTxMode nestedTxMode) {
-        this.nestedTxMode = nestedTxMode;
-    }
-
     /**
      * @return Auto commit flag.
      */
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcConnectionContext.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcConnectionContext.java
index f00b2de7441..66721e2865a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcConnectionContext.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcConnectionContext.java
@@ -21,7 +21,6 @@ import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicReference;
-
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.configuration.QueryEngineConfiguration;
@@ -34,7 +33,6 @@ import 
org.apache.ignite.internal.processors.odbc.ClientListenerProtocolVersion;
 import org.apache.ignite.internal.processors.odbc.ClientListenerRequestHandler;
 import org.apache.ignite.internal.processors.odbc.ClientListenerResponse;
 import org.apache.ignite.internal.processors.odbc.ClientListenerResponseSender;
-import org.apache.ignite.internal.processors.query.NestedTxMode;
 import org.apache.ignite.internal.processors.query.QueryEngineConfigurationEx;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
 import org.apache.ignite.internal.util.nio.GridNioSession;
@@ -80,6 +78,9 @@ public class JdbcConnectionContext extends 
ClientListenerAbstractConnectionConte
     /** Supported versions. */
     private static final Set<ClientListenerProtocolVersion> SUPPORTED_VERS = 
new HashSet<>();
 
+    /** Default nested tx mode for compatibility. */
+    public static final String DEFAULT_NESTED_TX_MODE = "ERROR";
+
     /** Shutdown busy lock. */
     private final GridSpinBusyLock busyLock;
 
@@ -162,8 +163,6 @@ public class JdbcConnectionContext extends 
ClientListenerAbstractConnectionConte
         boolean skipReducerOnUpdate = false;
         String qryEngine = null;
 
-        NestedTxMode nestedTxMode = NestedTxMode.DEFAULT;
-
         if (ver.compareTo(VER_2_1_5) >= 0)
             lazyExec = reader.readBoolean();
 
@@ -173,14 +172,8 @@ public class JdbcConnectionContext extends 
ClientListenerAbstractConnectionConte
         if (ver.compareTo(VER_2_7_0) >= 0) {
             String nestedTxModeName = reader.readString();
 
-            if (!F.isEmpty(nestedTxModeName)) {
-                try {
-                    nestedTxMode = NestedTxMode.valueOf(nestedTxModeName);
-                }
-                catch (IllegalArgumentException e) {
-                    throw new IgniteCheckedException("Invalid nested 
transactions handling mode: " + nestedTxModeName);
-                }
-            }
+            if (!F.isEmpty(nestedTxModeName) && 
!nestedTxModeName.equals(DEFAULT_NESTED_TX_MODE))
+                throw new IgniteCheckedException("Nested transactions are not 
supported!");
         }
 
         Boolean dataPageScanEnabled = null;
@@ -258,7 +251,7 @@ public class JdbcConnectionContext extends 
ClientListenerAbstractConnectionConte
         };
 
         handler = new JdbcRequestHandler(busyLock, snd, maxCursors, 
distributedJoins, enforceJoinOrder,
-            collocated, replicatedOnly, autoCloseCursors, lazyExec, 
skipReducerOnUpdate, qryEngine, nestedTxMode,
+            collocated, replicatedOnly, autoCloseCursors, lazyExec, 
skipReducerOnUpdate, qryEngine,
             dataPageScanEnabled, updateBatchSize, ver, this);
 
         handler.start();
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequestHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequestHandler.java
index c4008110866..e3f6347fe34 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequestHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequestHandler.java
@@ -64,7 +64,6 @@ import 
org.apache.ignite.internal.processors.odbc.SqlListenerUtils;
 import org.apache.ignite.internal.processors.odbc.SqlStateCode;
 import org.apache.ignite.internal.processors.query.GridQueryCancel;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
-import org.apache.ignite.internal.processors.query.NestedTxMode;
 import org.apache.ignite.internal.processors.query.QueryUtils;
 import org.apache.ignite.internal.processors.query.SqlClientContext;
 import org.apache.ignite.internal.sql.optimizer.affinity.PartitionResult;
@@ -150,9 +149,6 @@ public class JdbcRequestHandler implements 
ClientListenerRequestHandler {
     /** Automatic close of cursors. */
     private final boolean autoCloseCursors;
 
-    /** Nested transactions handling mode. */
-    private final NestedTxMode nestedTxMode;
-
     /** Protocol version. */
     private final ClientListenerProtocolVersion protocolVer;
 
@@ -192,7 +188,6 @@ public class JdbcRequestHandler implements 
ClientListenerRequestHandler {
         boolean lazy,
         boolean skipReducerOnUpdate,
         @Nullable String qryEngine,
-        NestedTxMode nestedTxMode,
         @Nullable Boolean dataPageScanEnabled,
         @Nullable Integer updateBatchSize,
         ClientListenerProtocolVersion protocolVer,
@@ -226,7 +221,6 @@ public class JdbcRequestHandler implements 
ClientListenerRequestHandler {
         this.busyLock = busyLock;
         this.maxCursors = maxCursors;
         this.autoCloseCursors = autoCloseCursors;
-        this.nestedTxMode = nestedTxMode;
         this.protocolVer = protocolVer;
 
         log = connCtx.kernalContext().log(getClass());
@@ -1004,7 +998,6 @@ public class JdbcRequestHandler implements 
ClientListenerRequestHandler {
         qry.setCollocated(cliCtx.isCollocated());
         qry.setReplicatedOnly(cliCtx.isReplicatedOnly());
         qry.setLazy(cliCtx.isLazy());
-        qry.setNestedTxMode(nestedTxMode);
         qry.setSchema(schemaName);
         qry.setQueryInitiatorId(connCtx.clientDescriptor());
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcConnectionContext.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcConnectionContext.java
index e919e710c13..8d64ca06fbc 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcConnectionContext.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcConnectionContext.java
@@ -30,7 +30,6 @@ import 
org.apache.ignite.internal.processors.odbc.ClientListenerProtocolVersion;
 import org.apache.ignite.internal.processors.odbc.ClientListenerRequestHandler;
 import org.apache.ignite.internal.processors.odbc.ClientListenerResponse;
 import org.apache.ignite.internal.processors.odbc.ClientListenerResponseSender;
-import org.apache.ignite.internal.processors.query.NestedTxMode;
 import org.apache.ignite.internal.processors.query.QueryEngineConfigurationEx;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
 import org.apache.ignite.internal.util.nio.GridNioSession;
@@ -71,6 +70,9 @@ public class OdbcConnectionContext extends 
ClientListenerAbstractConnectionConte
     /** Supported versions. */
     private static final Set<ClientListenerProtocolVersion> SUPPORTED_VERS = 
new HashSet<>();
 
+    /** Default nested tx mode for compatibility. */
+    private static final byte DEFAULT_NESTED_TX_MODE = 3;
+
     /** Shutdown busy lock. */
     private final GridSpinBusyLock busyLock;
 
@@ -153,18 +155,13 @@ public class OdbcConnectionContext extends 
ClientListenerAbstractConnectionConte
         String user = null;
         String passwd = null;
 
-        NestedTxMode nestedTxMode = NestedTxMode.DEFAULT;
-
         if (ver.compareTo(VER_2_5_0) >= 0) {
             user = reader.readString();
             passwd = reader.readString();
         }
 
-        if (ver.compareTo(VER_2_7_0) >= 0) {
-            byte nestedTxModeVal = reader.readByte();
-
-            nestedTxMode = NestedTxMode.fromByte(nestedTxModeVal);
-        }
+        if (ver.compareTo(VER_2_7_0) >= 0 && reader.readByte() != 
DEFAULT_NESTED_TX_MODE)
+            throw new IgniteCheckedException("Nested transactions are not 
supported!");
 
         String qryEngine = null;
         if (ver.compareTo(VER_2_13_0) >= 0) {
@@ -205,7 +202,7 @@ public class OdbcConnectionContext extends 
ClientListenerAbstractConnectionConte
         initClientDescriptor("odbc");
 
         handler = new OdbcRequestHandler(ctx, busyLock, snd, maxCursors, 
distributedJoins, enforceJoinOrder,
-            replicatedOnly, collocated, lazy, skipReducerOnUpdate, qryEngine, 
nestedTxMode, ver, this);
+            replicatedOnly, collocated, lazy, skipReducerOnUpdate, qryEngine, 
ver, this);
 
         parser = new OdbcMessageParser(ctx, ver);
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
index 5ea085dcf79..3e71564137a 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
@@ -50,7 +50,6 @@ import 
org.apache.ignite.internal.processors.query.GridQueryFieldMetadata;
 import org.apache.ignite.internal.processors.query.GridQueryProperty;
 import org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
-import org.apache.ignite.internal.processors.query.NestedTxMode;
 import org.apache.ignite.internal.processors.query.QueryUtils;
 import org.apache.ignite.internal.processors.query.SqlClientContext;
 import org.apache.ignite.internal.util.GridSpinBusyLock;
@@ -102,9 +101,6 @@ public class OdbcRequestHandler implements 
ClientListenerRequestHandler {
     /** Current queries cursors. */
     private final ConcurrentHashMap<Long, OdbcQueryResults> qryResults = new 
ConcurrentHashMap<>();
 
-    /** Nested transaction behaviour. */
-    private final NestedTxMode nestedTxMode;
-
     /** Client version. */
     private ClientListenerProtocolVersion ver;
 
@@ -133,7 +129,6 @@ public class OdbcRequestHandler implements 
ClientListenerRequestHandler {
      * @param lazy Lazy flag.
      * @param skipReducerOnUpdate Skip reducer on update flag.
      * @param qryEngine Name of SQL query engine to use.
-     * @param nestedTxMode Nested transaction mode.
      * @param ver Client protocol version.
      */
     public OdbcRequestHandler(
@@ -148,7 +143,6 @@ public class OdbcRequestHandler implements 
ClientListenerRequestHandler {
         boolean lazy,
         boolean skipReducerOnUpdate,
         @Nullable String qryEngine,
-        NestedTxMode nestedTxMode,
         ClientListenerProtocolVersion ver,
         OdbcConnectionContext connCtx) {
         this.ctx = ctx;
@@ -177,7 +171,6 @@ public class OdbcRequestHandler implements 
ClientListenerRequestHandler {
         this.busyLock = busyLock;
         this.sender = sender;
         this.maxCursors = maxCursors;
-        this.nestedTxMode = nestedTxMode;
         this.ver = ver;
 
         log = ctx.log(getClass());
@@ -353,7 +346,6 @@ public class OdbcRequestHandler implements 
ClientListenerRequestHandler {
         qry.setLazy(cliCtx.isLazy());
         qry.setSchema(OdbcUtils.prepareSchema(schema));
         qry.setSkipReducerOnUpdate(cliCtx.isSkipReducerOnUpdate());
-        qry.setNestedTxMode(nestedTxMode);
         qry.setQueryInitiatorId(connCtx.clientDescriptor());
 
         return qry;
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/NestedTxMode.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/NestedTxMode.java
deleted file mode 100644
index 74423069e42..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/NestedTxMode.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.query;
-
-import org.apache.ignite.IgniteException;
-
-/**
- * Behavior options when an attempt to start a nested transaction is made.
- */
-public enum NestedTxMode {
-    /** Previously started transaction will be committed, new transaction will 
be started. */
-    COMMIT,
-
-    /** Warning will be printed to log, no new transaction will be started. */
-    IGNORE,
-
-    /** Exception will be thrown, previously started transaction will be 
rolled back. */
-    ERROR;
-
-    /** Default handling mode. */
-    public static final NestedTxMode DEFAULT = ERROR;
-
-    /**
-     * Get enum value from int
-     *
-     * @param val Int value.
-     * @return Enum value.
-     * @throws IgniteException if the is no enum value associated with the int 
value.
-     */
-    public static NestedTxMode fromByte(byte val) {
-        switch (val) {
-            case 1:
-                return COMMIT;
-
-            case 2:
-                return IGNORE;
-
-            case 3:
-                return ERROR;
-
-            default:
-                throw new IgniteException("Invalid nested transactions 
handling mode: " + val);
-        }
-    }
-}
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties 
b/modules/core/src/main/resources/META-INF/classnames.properties
index 70e1e4eab8c..63d8fd49495 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -1630,7 +1630,6 @@ 
org.apache.ignite.internal.processors.query.GridQueryProcessor$6
 org.apache.ignite.internal.processors.query.GridQueryProcessor$7
 
org.apache.ignite.internal.processors.query.GridQueryProcessor$SchemaOperation$1
 org.apache.ignite.internal.processors.query.IgniteSQLException
-org.apache.ignite.internal.processors.query.NestedTxMode
 org.apache.ignite.internal.processors.query.QueryEntityEx
 org.apache.ignite.internal.processors.query.QueryField
 org.apache.ignite.internal.processors.query.QueryIndexKey
diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParameters.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParameters.java
index 69d46618de1..c48cc19c4fb 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParameters.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParameters.java
@@ -19,7 +19,6 @@
 package org.apache.ignite.internal.processors.query.h2;
 
 import java.util.List;
-import org.apache.ignite.internal.processors.query.NestedTxMode;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 
@@ -49,9 +48,6 @@ public class QueryParameters {
     /** Data page scan enabled flag. */
     private final Boolean dataPageScanEnabled;
 
-    /** Nexted transactional mode. */
-    private final NestedTxMode nestedTxMode;
-
     /** Auto-commit flag. */
     private final boolean autoCommit;
 
@@ -74,7 +70,6 @@ public class QueryParameters {
      * @param lazy Lazy flag.
      * @param pageSize Page size.
      * @param dataPageScanEnabled Data page scan enabled flag.
-     * @param nestedTxMode Nested TX mode.
      * @param autoCommit Auto-commit flag.
      * @param batchedArgs Batched arguments.
      * @param updateBatchSize Update internal batch size.
@@ -87,7 +82,6 @@ public class QueryParameters {
         boolean lazy,
         int pageSize,
         Boolean dataPageScanEnabled,
-        NestedTxMode nestedTxMode,
         boolean autoCommit,
         List<Object[]> batchedArgs,
         int updateBatchSize
@@ -98,7 +92,6 @@ public class QueryParameters {
         this.lazy = lazy;
         this.pageSize = pageSize;
         this.dataPageScanEnabled = dataPageScanEnabled;
-        this.nestedTxMode = nestedTxMode;
         this.autoCommit = autoCommit;
         this.batchedArgs = batchedArgs;
         this.updateBatchSize = updateBatchSize;
@@ -148,13 +141,6 @@ public class QueryParameters {
         return dataPageScanEnabled;
     }
 
-    /**
-     * @return Nested TX mode.
-     */
-    public NestedTxMode nestedTxMode() {
-        return nestedTxMode;
-    }
-
     /**
      * @return Auto-commit flag.
      */
@@ -194,7 +180,6 @@ public class QueryParameters {
             this.lazy,
             this.pageSize,
             this.dataPageScanEnabled,
-            this.nestedTxMode,
             this.autoCommit,
             null,
             this.updateBatchSize
diff --git 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParser.java
 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParser.java
index 38ca9ea0171..3452ca2fcf7 100644
--- 
a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParser.java
+++ 
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/QueryParser.java
@@ -35,7 +35,6 @@ import 
org.apache.ignite.internal.processors.cache.query.SqlFieldsQueryEx;
 import org.apache.ignite.internal.processors.odbc.jdbc.JdbcParameterMeta;
 import org.apache.ignite.internal.processors.query.GridQueryFieldMetadata;
 import org.apache.ignite.internal.processors.query.IgniteSQLException;
-import org.apache.ignite.internal.processors.query.NestedTxMode;
 import org.apache.ignite.internal.processors.query.QueryParserMetricsHolder;
 import org.apache.ignite.internal.processors.query.QueryUtils;
 import org.apache.ignite.internal.processors.query.h2.dml.DmlAstUtils;
@@ -147,16 +146,12 @@ public class QueryParser {
      * @return Parameters.
      */
     public QueryParameters queryParameters(SqlFieldsQuery qry) {
-        NestedTxMode nestedTxMode = NestedTxMode.DEFAULT;
         boolean autoCommit = true;
         List<Object[]> batchedArgs = null;
 
         if (qry instanceof SqlFieldsQueryEx) {
             SqlFieldsQueryEx qry0 = (SqlFieldsQueryEx)qry;
 
-            if (qry0.getNestedTxMode() != null)
-                nestedTxMode = qry0.getNestedTxMode();
-
             autoCommit = qry0.isAutoCommit();
 
             batchedArgs = qry0.batchedArguments();
@@ -174,7 +169,6 @@ public class QueryParser {
             qry.isLazy(),
             qry.getPageSize(),
             null,
-            nestedTxMode,
             autoCommit,
             batchedArgs,
             qry.getUpdateBatchSize()
diff --git a/modules/platforms/cpp/odbc-test/CMakeLists.txt 
b/modules/platforms/cpp/odbc-test/CMakeLists.txt
index d7ce2596357..42574c3fdf5 100644
--- a/modules/platforms/cpp/odbc-test/CMakeLists.txt
+++ b/modules/platforms/cpp/odbc-test/CMakeLists.txt
@@ -90,7 +90,6 @@ set(SOURCES
         ../odbc/src/common_types.cpp
         ../odbc/src/utility.cpp
         ../odbc/src/result_page.cpp
-        ../odbc/src/nested_tx_mode.cpp
         ../odbc/src/engine_mode.cpp)
 
 add_executable(${TARGET} ${SOURCES})
diff --git a/modules/platforms/cpp/odbc/CMakeLists.txt 
b/modules/platforms/cpp/odbc/CMakeLists.txt
index 2c1a1a9a01e..dd8d4899289 100644
--- a/modules/platforms/cpp/odbc/CMakeLists.txt
+++ b/modules/platforms/cpp/odbc/CMakeLists.txt
@@ -62,7 +62,6 @@ set(SOURCES src/app/application_data_buffer.cpp
         src/protocol_version.cpp
         src/result_page.cpp
         src/row.cpp
-        src/nested_tx_mode.cpp
         src/engine_mode.cpp
         src/message.cpp
         src/column.cpp
diff --git 
a/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h 
b/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
index 2224353f1c3..ed2fa9b76db 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
@@ -27,7 +27,6 @@
 #include "ignite/odbc/ssl_mode.h"
 #include "ignite/odbc/end_point.h"
 #include "ignite/odbc/engine_mode.h"
-#include "ignite/odbc/nested_tx_mode.h"
 
 namespace ignite
 {
@@ -107,9 +106,6 @@ namespace ignite
                     /** Default value for password attribute. */
                     static const std::string password;
 
-                    /** Default value for nestedTxMode attribute. */
-                    static const NestedTxMode::Type nestedTxMode;
-
                     /** Default value for SQL engine attribute. */
                     static const EngineMode::Type engineMode;
                 };
@@ -544,27 +540,6 @@ namespace ignite
                  */
                 bool IsPasswordSet() const;
 
-                /**
-                 * Get nested transaction mode.
-                 *
-                 * @return Nested transaction mode.
-                 */
-                NestedTxMode::Type GetNestedTxMode() const;
-
-                /**
-                 * Set nested transaction mode.
-                 *
-                 * @param mode Nested transaction mode.
-                 */
-                void SetNestedTxMode(NestedTxMode::Type mode);
-
-                /**
-                 * Check if the value set.
-                 *
-                 * @return @true if the value set.
-                 */
-                bool IsNestedTxModeSet() const;
-
                 /**
                  * Get SQL engine mode.
                  *
@@ -664,9 +639,6 @@ namespace ignite
                 /** Password. */
                 SettableValue<std::string> password;
 
-                /** Nested transaction mode. */
-                SettableValue<NestedTxMode::Type> nestedTxMode;
-
                 /** SQL engine mode. */
                 SettableValue<EngineMode::Type> engineMode;
             };
@@ -699,10 +671,6 @@ namespace ignite
             void Configuration::AddToMap<ssl::SslMode::Type>(ArgumentMap& map, 
const std::string& key,
                 const SettableValue<ssl::SslMode::Type>& value);
 
-            template<>
-            void Configuration::AddToMap<NestedTxMode::Type>(ArgumentMap& map, 
const std::string& key,
-                const SettableValue<NestedTxMode::Type>& value);
-
             template<>
             void Configuration::AddToMap(ArgumentMap& map, const std::string& 
key,
                                          const 
SettableValue<EngineMode::Type>& value);
diff --git 
a/modules/platforms/cpp/odbc/include/ignite/odbc/config/connection_string_parser.h
 
b/modules/platforms/cpp/odbc/include/ignite/odbc/config/connection_string_parser.h
index 2645d5bee0d..bd5352d5318 100644
--- 
a/modules/platforms/cpp/odbc/include/ignite/odbc/config/connection_string_parser.h
+++ 
b/modules/platforms/cpp/odbc/include/ignite/odbc/config/connection_string_parser.h
@@ -104,9 +104,6 @@ namespace ignite
                     /** Connection attribute keyword for password attribute. */
                     static const std::string pwd;
 
-                    /** Connection attribute keyword for nestedTxMode 
attribute. */
-                    static const std::string nestedTxMode;
-
                     /** SQL engine mode. */
                     static const std::string engineMode;
                 };
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/message.h 
b/modules/platforms/cpp/odbc/include/ignite/odbc/message.h
index aa5a2c0d01e..1d64f2cc2ae 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/message.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/message.h
@@ -49,6 +49,17 @@ namespace ignite
             };
         };
 
+        /**
+         * Default nested tx mode for compatibility.
+         */
+        struct NestedTxType
+        {
+            enum Type
+            {
+                DEFAULT_NESTED_TX_MODE = 3
+            };
+        };
+
         struct RequestType
         {
             enum Type
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/nested_tx_mode.h 
b/modules/platforms/cpp/odbc/include/ignite/odbc/nested_tx_mode.h
deleted file mode 100644
index eb2598d04fc..00000000000
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/nested_tx_mode.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _IGNITE_ODBC_NESTED_TX_MODE
-#define _IGNITE_ODBC_NESTED_TX_MODE
-
-#include <set>
-#include <string>
-
-namespace ignite
-{
-    namespace odbc
-    {
-        /**
-         * Nested transaction mode.
-         */
-        struct NestedTxMode
-        {
-            /**
-             * Values.
-             */
-            enum Type
-            {
-                /** Commit current transaction if a new one started. */
-                AI_COMMIT = 1,
-
-                /** Ignore start of a new transaction. */
-                AI_IGNORE = 2,
-
-                /** Throw an error. */
-                AI_ERROR = 3,
-
-                /** Returned when value is unknown. */
-                AI_UNKNOWN = 100
-            };
-
-            /** Mode set type. */
-            typedef std::set<Type> ModeSet;
-
-            /**
-             * Get value from a string value.
-             *
-             * @param str String.
-             * @param dflt Value to return on error.
-             * @return Corresponding value on success and @c dflt on failure.
-             */
-            static Type FromString(const std::string& str, Type dflt = 
AI_UNKNOWN);
-
-            /**
-             * Convert value to a string.
-             *
-             * @param value Value.
-             * @return String value.
-             */
-            static std::string ToString(Type value);
-
-            /**
-             * Get set of all valid values.
-             *
-             * @return Set of all valid values.
-             */
-            static const ModeSet& GetValidValues();
-        };
-    }
-}
-
-#endif //_IGNITE_ODBC_NESTED_TX_MODE
\ No newline at end of file
diff --git 
a/modules/platforms/cpp/odbc/include/ignite/odbc/system/ui/dsn_configuration_window.h
 
b/modules/platforms/cpp/odbc/include/ignite/odbc/system/ui/dsn_configuration_window.h
index 1e1c436a597..7dd21f8cfa0 100644
--- 
a/modules/platforms/cpp/odbc/include/ignite/odbc/system/ui/dsn_configuration_window.h
+++ 
b/modules/platforms/cpp/odbc/include/ignite/odbc/system/ui/dsn_configuration_window.h
@@ -61,8 +61,6 @@ namespace ignite
                             SKIP_REDUCER_ON_UPDATE_CHECK_BOX,
                             PROTOCOL_VERSION_LABEL,
                             PROTOCOL_VERSION_COMBO_BOX,
-                            NESTED_TX_MODE_LABEL,
-                            NESTED_TX_MODE_COMBO_BOX,
                             ENGINE_MODE_LABEL,
                             ENGINE_MODE_COMBO_BOX,
                             SSL_MODE_LABEL,
@@ -316,18 +314,12 @@ namespace ignite
                     /** Password edit. */
                     std::auto_ptr<Window> passwordEdit;
 
-                    /** Nested transaction mode label. */
+                    /** Engine mode label. */
                     std::auto_ptr<Window> engineModeLabel;
 
-                    /** Nested transaction mode combo box. */
+                    /** Engine mode combo box. */
                     std::auto_ptr<Window> engineModeComboBox;
 
-                    /** Nested transaction mode label. */
-                    std::auto_ptr<Window> nestedTxModeLabel;
-
-                    /** Nested transaction mode combo box. */
-                    std::auto_ptr<Window> nestedTxModeComboBox;
-
                     /** Configuration. */
                     config::Configuration& config;
 
diff --git 
a/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp 
b/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
index 877b44ca2dc..b020b7b3939 100644
--- 
a/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
+++ 
b/modules/platforms/cpp/odbc/os/win/src/system/ui/dsn_configuration_window.cpp
@@ -60,7 +60,6 @@ namespace ignite
                     passwordLabel(),
                     passwordEdit(),
                     engineModeComboBox(),
-                    nestedTxModeComboBox(),
                     okButton(),
                     cancelButton(),
                     config(config),
@@ -337,31 +336,6 @@ namespace ignite
 
                     rowPos += INTERVAL + ROW_HEIGHT;
 
-                    nestedTxModeLabel = CreateLabel(labelPosX, rowPos, 
LABEL_WIDTH, ROW_HEIGHT,
-                        "Nested Transaction Mode:", 
ChildId::NESTED_TX_MODE_LABEL);
-                    nestedTxModeComboBox = CreateComboBox(editPosX, rowPos, 
editSizeX, ROW_HEIGHT,
-                        "", ChildId::NESTED_TX_MODE_COMBO_BOX);
-
-                    {
-                        int id = 0;
-
-                        const NestedTxMode::ModeSet &supported = 
NestedTxMode::GetValidValues();
-
-                        for (NestedTxMode::ModeSet::const_iterator it = 
supported.begin();
-                             it != supported.end(); ++it) {
-                            
nestedTxModeComboBox->AddString(NestedTxMode::ToString(*it));
-
-                            if (*it == config.GetNestedTxMode())
-                                nestedTxModeComboBox->SetSelection(id);
-
-                            ++id;
-                        }
-                    }
-
-                    nestedTxModeComboBox->SetEnabled(version >= 
ProtocolVersion::VERSION_2_5_0);
-
-                    rowPos += INTERVAL + ROW_HEIGHT;
-
                     distributedJoinsCheckBox = CreateCheckBox(labelPosX, 
rowPos, checkBoxSize, ROW_HEIGHT,
                         "Distributed Joins", 
ChildId::DISTRIBUTED_JOINS_CHECK_BOX, config.IsDistributedJoins());
 
@@ -482,7 +456,6 @@ namespace ignite
                                     ProtocolVersion version = 
ProtocolVersion::FromString(versionStr);
                                     lazyCheckBox->SetEnabled(version >= 
ProtocolVersion::VERSION_2_1_5);
                                     
skipReducerOnUpdateCheckBox->SetEnabled(version >= 
ProtocolVersion::VERSION_2_3_0);
-                                    nestedTxModeComboBox->SetEnabled(version 
>= ProtocolVersion::VERSION_2_5_0);
                                     engineModeComboBox->SetEnabled(version >= 
ProtocolVersion::VERSION_2_13_0);
 
                                     break;
@@ -630,13 +603,6 @@ namespace ignite
                     if (pageSize <= 0)
                         pageSize = config.GetPageSize();
 
-                    std::string nestedTxModeStr;
-
-                    nestedTxModeComboBox->GetText(nestedTxModeStr);
-
-                    NestedTxMode::Type nestedTxMode = 
NestedTxMode::FromString(nestedTxModeStr,
-                                                                               
config.GetNestedTxMode());
-
                     std::string engineModeStr;
 
                     engineModeComboBox->GetText(engineModeStr);
@@ -653,7 +619,6 @@ namespace ignite
                     LOG_MSG("Retrieving arguments:");
                     LOG_MSG("Page size:              " << pageSize);
                     LOG_MSG("SQL Engine Mode:        " << 
EngineMode::ToString(engineMode));
-                    LOG_MSG("Nested TX Mode:         " << 
NestedTxMode::ToString(nestedTxMode));
                     LOG_MSG("Distributed Joins:      " << (distributedJoins ? 
"true" : "false"));
                     LOG_MSG("Enforce Join Order:     " << (enforceJoinOrder ? 
"true" : "false"));
                     LOG_MSG("Replicated only:        " << (replicatedOnly ? 
"true" : "false"));
@@ -663,7 +628,6 @@ namespace ignite
 
                     cfg.SetPageSize(pageSize);
                     cfg.SetEngineMode(engineMode);
-                    cfg.SetNestedTxMode(nestedTxMode);
                     cfg.SetDistributedJoins(distributedJoins);
                     cfg.SetEnforceJoinOrder(enforceJoinOrder);
                     cfg.SetReplicatedOnly(replicatedOnly);
diff --git a/modules/platforms/cpp/odbc/src/config/configuration.cpp 
b/modules/platforms/cpp/odbc/src/config/configuration.cpp
index a2dd2d9125b..92b39904cc6 100644
--- a/modules/platforms/cpp/odbc/src/config/configuration.cpp
+++ b/modules/platforms/cpp/odbc/src/config/configuration.cpp
@@ -56,8 +56,6 @@ namespace ignite
             const std::string Configuration::DefaultValue::user = "";
             const std::string Configuration::DefaultValue::password = "";
 
-            const NestedTxMode::Type Configuration::DefaultValue::nestedTxMode 
= NestedTxMode::AI_ERROR;
-
             const EngineMode::Type Configuration::DefaultValue::engineMode = 
EngineMode::DEFAULT;
 
             Configuration::Configuration() :
@@ -81,7 +79,6 @@ namespace ignite
                 sslCaFile(DefaultValue::sslCaFile),
                 user(DefaultValue::user),
                 password(DefaultValue::password),
-                nestedTxMode(DefaultValue::nestedTxMode),
                 engineMode(DefaultValue::engineMode)
             {
                 // No-op.
@@ -410,21 +407,6 @@ namespace ignite
                 return password.IsSet();
             }
 
-            NestedTxMode::Type Configuration::GetNestedTxMode() const
-            {
-                return nestedTxMode.GetValue();
-            }
-
-            void Configuration::SetNestedTxMode(NestedTxMode::Type mode)
-            {
-                this->nestedTxMode.SetValue(mode);
-            }
-
-            bool Configuration::IsNestedTxModeSet() const
-            {
-                return nestedTxMode.IsSet();
-            }
-
             EngineMode::Type Configuration::GetEngineMode() const {
                 return engineMode.GetValue();
             }
@@ -464,7 +446,6 @@ namespace ignite
                 AddToMap(res, ConnectionStringParser::Key::sslCaFile, 
sslCaFile);
                 AddToMap(res, ConnectionStringParser::Key::user, user);
                 AddToMap(res, ConnectionStringParser::Key::password, password);
-                AddToMap(res, ConnectionStringParser::Key::nestedTxMode, 
nestedTxMode);
                 AddToMap(res, ConnectionStringParser::Key::engineMode, 
engineMode);
             }
 
@@ -522,14 +503,6 @@ namespace ignite
                     map[key] = ssl::SslMode::ToString(value.GetValue());
             }
 
-            template<>
-            void Configuration::AddToMap(ArgumentMap& map, const std::string& 
key,
-                const SettableValue<NestedTxMode::Type>& value)
-            {
-                if (value.IsSet())
-                    map[key] = NestedTxMode::ToString(value.GetValue());
-            }
-
             template<>
             void Configuration::AddToMap(ArgumentMap& map, const std::string& 
key,
                 const SettableValue<EngineMode::Type>& value)
diff --git a/modules/platforms/cpp/odbc/src/config/connection_string_parser.cpp 
b/modules/platforms/cpp/odbc/src/config/connection_string_parser.cpp
index c432ce41369..25bad8eea06 100644
--- a/modules/platforms/cpp/odbc/src/config/connection_string_parser.cpp
+++ b/modules/platforms/cpp/odbc/src/config/connection_string_parser.cpp
@@ -23,7 +23,6 @@
 #include "ignite/odbc/ssl_mode.h"
 #include "ignite/odbc/config/connection_string_parser.h"
 #include "ignite/odbc/config/config_tools.h"
-#include "ignite/odbc/nested_tx_mode.h"
 
 namespace ignite
 {
@@ -53,7 +52,6 @@ namespace ignite
             const std::string ConnectionStringParser::Key::password            
   = "password";
             const std::string ConnectionStringParser::Key::uid                 
   = "uid";
             const std::string ConnectionStringParser::Key::pwd                 
   = "pwd";
-            const std::string ConnectionStringParser::Key::nestedTxMode        
   = "nested_tx_mode";
             const std::string ConnectionStringParser::Key::engineMode          
   = "query_engine";
 
             ConnectionStringParser::ConnectionStringParser(Configuration& cfg):
@@ -440,23 +438,6 @@ namespace ignite
 
                     cfg.SetPassword(value);
                 }
-                else if (lKey == Key::nestedTxMode)
-                {
-                    NestedTxMode::Type mode = NestedTxMode::FromString(value);
-
-                    if (mode == NestedTxMode::AI_UNKNOWN)
-                    {
-                        if (diag)
-                        {
-                            
diag->AddStatusRecord(SqlState::S01S02_OPTION_VALUE_CHANGED,
-                                "Specified nested transaction mode is not 
supported. Default value used ('error').");
-                        }
-
-                        return;
-                    }
-
-                    cfg.SetNestedTxMode(mode);
-                }
                 else if (lKey == Key::engineMode)
                 {
                     EngineMode::Type mode = EngineMode::FromString(value);
diff --git a/modules/platforms/cpp/odbc/src/dsn_config.cpp 
b/modules/platforms/cpp/odbc/src/dsn_config.cpp
index 9ddf6e692d9..1d8c0f69c13 100644
--- a/modules/platforms/cpp/odbc/src/dsn_config.cpp
+++ b/modules/platforms/cpp/odbc/src/dsn_config.cpp
@@ -211,11 +211,6 @@ namespace ignite
             if (password.IsSet() && !config.IsPasswordSet())
                 config.SetPassword(password.GetValue());
 
-            SettableValue<std::string> nestedTxModeStr = ReadDsnString(dsn, 
ConnectionStringParser::Key::nestedTxMode);
-
-            if (nestedTxModeStr.IsSet() && !config.IsNestedTxModeSet())
-                
config.SetNestedTxMode(NestedTxMode::FromString(nestedTxModeStr.GetValue(), 
config.GetNestedTxMode()));
-
             SettableValue<std::string> engineModeStr = ReadDsnString(dsn, 
ConnectionStringParser::Key::engineMode);
 
             if (engineModeStr.IsSet() && !config.IsEngineModeSet())
diff --git a/modules/platforms/cpp/odbc/src/message.cpp 
b/modules/platforms/cpp/odbc/src/message.cpp
index 079088948fb..bdc262d14d9 100644
--- a/modules/platforms/cpp/odbc/src/message.cpp
+++ b/modules/platforms/cpp/odbc/src/message.cpp
@@ -87,7 +87,7 @@ namespace ignite
             }
 
             if (version >= ProtocolVersion::VERSION_2_7_0)
-                writer.WriteInt8(config.GetNestedTxMode());
+                writer.WriteInt8(NestedTxType::DEFAULT_NESTED_TX_MODE);
 
             if (version >= ProtocolVersion::VERSION_2_13_0)
             {
diff --git a/modules/platforms/cpp/odbc/src/nested_tx_mode.cpp 
b/modules/platforms/cpp/odbc/src/nested_tx_mode.cpp
deleted file mode 100644
index e4e6118addc..00000000000
--- a/modules/platforms/cpp/odbc/src/nested_tx_mode.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ignite/odbc/nested_tx_mode.h"
-#include "ignite/common/utils.h"
-
-namespace
-{
-    using ignite::odbc::NestedTxMode;
-    NestedTxMode::Type validValues0[] = {
-        NestedTxMode::AI_COMMIT,
-        NestedTxMode::AI_IGNORE,
-        NestedTxMode::AI_ERROR
-    };
-
-    NestedTxMode::ModeSet validValues(validValues0, validValues0 + 
(sizeof(validValues0) / sizeof(validValues0[0])));
-}
-
-
-namespace ignite
-{
-    namespace odbc
-    {
-        NestedTxMode::Type NestedTxMode::FromString(const std::string& str, 
Type dflt)
-        {
-            std::string lower = common::ToLower(str);
-
-            if (lower == "commit")
-                return AI_COMMIT;
-
-            if (lower == "ignore")
-                return AI_IGNORE;
-
-            if (lower == "error")
-                return AI_ERROR;
-
-            return dflt;
-        }
-
-        std::string NestedTxMode::ToString(Type value)
-        {
-            switch (value)
-            {
-                case AI_COMMIT:
-                    return "commit";
-
-                case AI_IGNORE:
-                    return "ignore";
-
-                case AI_ERROR:
-                    return "error";
-
-                default:
-                    break;
-            }
-
-            return "default";
-        }
-
-        const NestedTxMode::ModeSet& NestedTxMode::GetValidValues()
-        {
-            return validValues;
-        }
-    }
-}
-

Reply via email to