Repository: trafodion
Updated Branches:
  refs/heads/master e30699db8 -> a6cfd65d3


correct the value of NON_UNIQUE column


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

Branch: refs/heads/master
Commit: d759c872da37aee9ed59af4a9d49fc97e4cdeacb
Parents: d93d17e
Author: Weixin-Xu <[email protected]>
Authored: Tue Jan 16 17:34:00 2018 +0800
Committer: Weixin-Xu <[email protected]>
Committed: Wed Jan 17 09:47:18 2018 +0800

----------------------------------------------------------------------
 core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp                 | 2 +-
 .../src/test/java/org/trafodion/jdbc_test/TestGetIndexInfo.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/d759c872/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
----------------------------------------------------------------------
diff --git a/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp 
b/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
index ccbb689..f9abfe7 100644
--- a/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
+++ b/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
@@ -5078,7 +5078,7 @@ odbc_SQLSvc_GetSQLCatalogs_sme_(
                     "cast('%s' as varchar(128)) TABLE_CAT, "
                     "cast(trim(ob_table.SCHEMA_NAME) as varchar(128)) 
TABLE_SCHEM, "
                     "cast(trim(ob_table.OBJECT_NAME) as varchar(128)) 
TABLE_NAME, "
-                    "cast(idx.is_unique as smallint) NON_UNIQUE, "
+                    "cast(case when idx.is_unique = 1 then 0 else 1 end as 
smallint) NON_UNIQUE, "
                     "cast(NULL as varchar(128)) INDEX_QUALIFIER, " // not 
support
                     "cast(trim(ob.OBJECT_NAME) as varchar(128)) INDEX_NAME, "
                     "cast(3 as smallint) TYPE, " // SQL_INDEX_OTHER

http://git-wip-us.apache.org/repos/asf/trafodion/blob/d759c872/dcs/src/test/jdbc_test/src/test/java/org/trafodion/jdbc_test/TestGetIndexInfo.java
----------------------------------------------------------------------
diff --git 
a/dcs/src/test/jdbc_test/src/test/java/org/trafodion/jdbc_test/TestGetIndexInfo.java
 
b/dcs/src/test/jdbc_test/src/test/java/org/trafodion/jdbc_test/TestGetIndexInfo.java
index 1cab0b0..2a4163b 100644
--- 
a/dcs/src/test/jdbc_test/src/test/java/org/trafodion/jdbc_test/TestGetIndexInfo.java
+++ 
b/dcs/src/test/jdbc_test/src/test/java/org/trafodion/jdbc_test/TestGetIndexInfo.java
@@ -87,7 +87,7 @@ public class TestGetIndexInfo {
                IndexInfo[] expIndexInfo = {
                                new IndexInfo("TRAFODION", "SEABASE", 
INDEX_INFO_TEST_TABLE, false, (String)null, (String)null, (short)0, (short)0, 
"C1", 0, 3, (short)0, (String)null),
                                new IndexInfo("TRAFODION", "SEABASE", 
INDEX_INFO_TEST_TABLE, false, (String)null, (String)null, (short)0, (short)0, 
"C2", 0, 3, (short)0, (String)null),
-                               new IndexInfo("TRAFODION", "SEABASE", 
INDEX_INFO_TEST_TABLE, false, (String)null, INDEX_C1_NAME, (short)3, (short)0, 
"", 0, 0, (short)0, (String)null)
+                               new IndexInfo("TRAFODION", "SEABASE", 
INDEX_INFO_TEST_TABLE, true, (String)null, INDEX_C1_NAME, (short)3, (short)0, 
"", 0, 0, (short)0, (String)null)
                };
                
                try {

Reply via email to