trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [1/3] incubator-trafodion git commit: Fix catalog api for getCatalog and getSchema
Date Wed, 23 Dec 2015 17:10:37 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 531d2703c -> b9a4f68ce


Fix catalog api for getCatalog and getSchema


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

Branch: refs/heads/master
Commit: d5cd3383ac1e5d242adaf30c075f131583cadc45
Parents: e54c732
Author: Kevin Xu <kaihua.xu@esgyn.cn>
Authored: Mon Dec 21 14:08:01 2015 +0800
Committer: Kevin Xu <kaihua.xu@esgyn.cn>
Committed: Mon Dec 21 14:08:01 2015 +0800

----------------------------------------------------------------------
 core/conn/jdbc_type2/native/SQLMXDatabaseMetaData.cpp | 6 ++++--
 core/conn/jdbc_type2/native/SrvrCommon.cpp            | 4 ++--
 core/conn/jdbc_type2/native/SrvrSmd.cpp               | 2 ++
 3 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d5cd3383/core/conn/jdbc_type2/native/SQLMXDatabaseMetaData.cpp
----------------------------------------------------------------------
diff --git a/core/conn/jdbc_type2/native/SQLMXDatabaseMetaData.cpp b/core/conn/jdbc_type2/native/SQLMXDatabaseMetaData.cpp
index dfb837d..a3638ff 100644
--- a/core/conn/jdbc_type2/native/SQLMXDatabaseMetaData.cpp
+++ b/core/conn/jdbc_type2/native/SQLMXDatabaseMetaData.cpp
@@ -41,6 +41,8 @@
 #include "SQLMXCommonFunctions.h"
 #include "org_trafodion_jdbc_t2_SQLMXDatabaseMetaData.h"
 #include "Debug.h"
+#define SQL_API_JDBC                    9999
+#define SQL_API_SQLTABLES_JDBC          SQL_API_SQLTABLES + SQL_API_JDBC
 
 JNIEXPORT jobject JNICALL Java_org_trafodion_jdbc_t2_SQLMXDatabaseMetaData_getCatalogs
   (JNIEnv *jenv, jobject jobj, jstring server, jlong dialogueId, jint txid, 
@@ -50,7 +52,7 @@ JNIEXPORT jobject JNICALL Java_org_trafodion_jdbc_t2_SQLMXDatabaseMetaData_getCa
 	FUNCTION_ENTRY("Java_org_trafodion_jdbc_t2_SQLMXDatabaseMetaData_getCatalogs",("..."));
 
 	jobject rc = getSQLCatalogsInfo(jenv, jobj, server, dialogueId, txid, autoCommit, txnMode,
-		SQL_API_SQLTABLES, catalogPattern, 
+		SQL_API_SQLTABLES_JDBC, catalogPattern,
 		NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 1, NULL, NULL, NULL);
 
 	FUNCTION_RETURN_PTR(rc, (NULL));
@@ -70,7 +72,7 @@ JNIEXPORT jobject JNICALL Java_org_trafodion_jdbc_t2_SQLMXDatabaseMetaData_getSc
 		DebugJString(jenv,schemaPattern)));
 
 	jobject rc = getSQLCatalogsInfo(jenv, jobj, server, dialogueId,  txid, autoCommit, txnMode,

-		SQL_API_SQLTABLES, NULL, schemaPattern, 
+		SQL_API_SQLTABLES_JDBC, NULL, schemaPattern,
 		NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 1, NULL, NULL, NULL);
 	
 	FUNCTION_RETURN_PTR(rc, (NULL));

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d5cd3383/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 c111b12..11a0dc5 100644
--- a/core/conn/jdbc_type2/native/SrvrCommon.cpp
+++ b/core/conn/jdbc_type2/native/SrvrCommon.cpp
@@ -670,7 +670,7 @@ void convertWildcard(unsigned long metadataId, BOOL isPV, const char *inName,
ch
                         break;
                     case '_':
                     case '%':
-                        *out++ = '\\';
+                        //*out++ = '\\';
                         break;
                     default:
                         break;
@@ -717,7 +717,7 @@ void convertWildcard(unsigned long metadataId, BOOL isPV, const char *inName,
ch
                         break;
                     case '_':
                     case '%':
-                        *out++ = '\\';
+                        //*out++ = '\\';
                         break;
                     default:
                         break;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d5cd3383/core/conn/jdbc_type2/native/SrvrSmd.cpp
----------------------------------------------------------------------
diff --git a/core/conn/jdbc_type2/native/SrvrSmd.cpp b/core/conn/jdbc_type2/native/SrvrSmd.cpp
index 67738b9..540e4db 100644
--- a/core/conn/jdbc_type2/native/SrvrSmd.cpp
+++ b/core/conn/jdbc_type2/native/SrvrSmd.cpp
@@ -357,6 +357,7 @@ void odbc_SQLSvc_GetSQLCatalogs_sme_(
 			}
 
 			SQLValue = (SQLValue_def *)outputValueList->_buffer;
+			/* //useless and doesn't be included in MXOS server
 
 			if (SQLValue->dataInd == -1)
 			{
@@ -364,6 +365,7 @@ void odbc_SQLSvc_GetSQLCatalogs_sme_(
 			    exception_->u.ParamError.ParamDesc = SQLSVC_EXCEPTION_INVALID_SCHEMA_VERSION;
 			    FUNCTION_RETURN_VOID(("SQLValue->dataInd == -1"));
 			}
+			*/
 	    }
 	 }
 


Mime
View raw message