trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arvi...@apache.org
Subject [2/5] incubator-trafodion git commit: Remove useless code
Date Thu, 07 Jan 2016 16:34:29 GMT
Remove useless code


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/a9af5024
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/a9af5024
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/a9af5024

Branch: refs/heads/master
Commit: a9af50240bea7fe91a37b4c058802030a7b63b0d
Parents: b017243
Author: Kevin Xu <kaihua.xu@esgyn.cn>
Authored: Tue Jan 5 09:52:49 2016 +0800
Committer: Kevin Xu <kaihua.xu@esgyn.cn>
Committed: Tue Jan 5 09:52:49 2016 +0800

----------------------------------------------------------------------
 core/conn/jdbc_type2/native/SrvrCommon.cpp | 73 ++++++-------------------
 1 file changed, 16 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a9af5024/core/conn/jdbc_type2/native/SrvrCommon.cpp
----------------------------------------------------------------------
diff --git a/core/conn/jdbc_type2/native/SrvrCommon.cpp b/core/conn/jdbc_type2/native/SrvrCommon.cpp
index b1da3c8..d9bd6a9 100644
--- a/core/conn/jdbc_type2/native/SrvrCommon.cpp
+++ b/core/conn/jdbc_type2/native/SrvrCommon.cpp
@@ -1119,33 +1119,14 @@ short do_ExecSMD(
 
     // Setup module filenames for MX metadata
     //Module version is changed from 0 to "SQLCLI_ODBC_MODULE_VERSION" R3.0
-    if (strncmp(stmtLabel, "SQL_GETTYPEINFO",15) == 0)
-        pSrvrStmt = createSrvrStmt(dialogueId,
-        stmtLabel,
-        &sqlcode,
-        "NONSTOP_SQLMX_NSK.MXCS_SCHEMA.CATANSIMXGTI",
-        SQLCLI_ODBC_MODULE_VERSION,
-        1234567890,
-        sqlStmtType,
-        false,true);
-    else if (strncmp(stmtLabel, "SQL_JAVA_",9) == 0)
-        pSrvrStmt = createSrvrStmt(dialogueId,
-        stmtLabel,
-        &sqlcode,
-        "NONSTOP_SQLMX_NSK.MXCS_SCHEMA.CATANSIMXJAVA",
-        SQLCLI_ODBC_MODULE_VERSION,
-        1234567890,
-        sqlStmtType,
-        false,true);
-    else
-        pSrvrStmt = createSrvrStmt(dialogueId,
-        stmtLabel,
-        &sqlcode,
-        NULL,
-        0,
-        0,
-        sqlStmtType,
-        false,true);
+    pSrvrStmt = createSrvrStmt(dialogueId,
+    stmtLabel,
+    &sqlcode,
+    NULL,
+    0,
+    0,
+    sqlStmtType,
+    false,true);
 
     *stmtId = (long)pSrvrStmt;
     SQLValue_def *sqlString = NULL;
@@ -1991,36 +1972,14 @@ short do_ExecFetchAppend(
     long                totalLength=0;
 
     // Setup module filenames for MX metadata
-    if (strncmp(stmtLabel, "SQL_GETTYPEINFO",15) == 0) {
-        pSrvrStmt = createSrvrStmt(dialogueId,
-            stmtLabel,
-            &sqlcode,
-            "NONSTOP_SQLMX_NSK.MXCS_SCHEMA.CATANSIMXGTI",
-            SQLCLI_ODBC_MODULE_VERSION,
-            1234567890,
-            sqlStmtType,
-            false,true);
-    }
-    else if (strncmp(stmtLabel, "SQL_JAVA_",9) == 0) {
-        pSrvrStmt = createSrvrStmt(dialogueId,
-            stmtLabel,
-            &sqlcode,
-            "NONSTOP_SQLMX_NSK.MXCS_SCHEMA.CATANSIMXJAVA",
-            SQLCLI_ODBC_MODULE_VERSION,
-            1234567890,
-            sqlStmtType,
-            false,true);
-    }
-    else {
-        pSrvrStmt = createSrvrStmt(dialogueId,
-            stmtLabel,
-            &sqlcode,
-            "NONSTOP_SQLMX_NSK.MXCS_SCHEMA.CATANSIMX",
-            SQLCLI_ODBC_MODULE_VERSION,
-            1234567890,
-            sqlStmtType,
-            false,true);
-    }
+    pSrvrStmt = createSrvrStmt(dialogueId,
+        stmtLabel,
+        &sqlcode,
+        "NONSTOP_SQLMX_NSK.MXCS_SCHEMA.CATANSIMX",
+        SQLCLI_ODBC_MODULE_VERSION,
+        1234567890,
+        sqlStmtType,
+        false,true);
 
     if (pSrvrStmt == NULL){
         executeException->exception_nr = odbc_SQLSvc_PrepareFromModule_SQLError_exn_;


Mime
View raw message