fix the logic Critical error checked by TScanCode

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

Branch: refs/heads/master
Commit: 7b268bd36dbc443350bb3c7eb287a59c9327bdc0
Parents: f897fff
Author: Kenny <xiaozhong.w...@esgyn.cn>
Authored: Tue Jan 9 13:17:00 2018 +0000
Committer: Kenny <xiaozhong.w...@esgyn.cn>
Committed: Tue Jan 9 13:17:00 2018 +0000

----------------------------------------------------------------------
 core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/7b268bd3/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
----------------------------------------------------------------------
diff --git a/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp 
b/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
index a0aaf26..3e15202 100644
--- a/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
+++ b/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
@@ -6286,7 +6286,7 @@ bool GetHashInfo(char* sqlString, char* genRequestError, 
char* HashTableInfo)
                                ControlQueryLen = ControlQueryLen + 4;
                                break;
                        case 6:
-                               sprintf(ControlQuery,"select cast(cast((52 * 
1024 * 128) / (sum(co.column_size)) as integer) as varchar(10) character set 
ISO88591) from  %s.SYSTEM_SCHEMA.SCHEMATA sc, NEO.HP_DEFINITION_SCHEMA.OBJECTS 
ob, NEO.HP_DEFINITION_SCHEMA.COLS co where sc.SCHEMA_NAME = '%s' and 
ob.OBJECT_NAME = '%s' and sc.SCHEMA_UID = ob.SCHEMA_UID and ob.OBJECT_UID = 
co.OBJECT_UID and ob.OBJECT_TYPE = 'BT' FOR READ UNCOMMITTED ACCESS", 
srvrGlobal->SystemCatalog, verBuffer, verBuffer, atol(verBuffer), schemaToken, 
tableName);
+                               sprintf(ControlQuery,"select cast(cast((52 * 
1024 * 128) / (sum(co.column_size)) as integer) as varchar(10) character set 
ISO88591) from  %s.SYSTEM_SCHEMA.SCHEMATA sc, NEO.HP_DEFINITION_SCHEMA.OBJECTS 
ob, NEO.HP_DEFINITION_SCHEMA.COLS co where sc.SCHEMA_NAME = '%s' and 
ob.OBJECT_NAME = '%s' and sc.SCHEMA_UID = ob.SCHEMA_UID and ob.OBJECT_UID = 
co.OBJECT_UID and ob.OBJECT_TYPE = 'BT' FOR READ UNCOMMITTED ACCESS", 
srvrGlobal->SystemCatalog, schemaToken, tableName);
                                strcpy(HashTableInfo+ControlQueryLen, ";HE="); 
// HE means Guesstimated rowset size. Change 128 to HP soon.
                                ControlQueryLen = ControlQueryLen + 4;
                                break;

Reply via email to