You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by xiaozhongwang <gi...@git.apache.org> on 2018/01/09 14:15:09 UTC
[GitHub] trafodion pull request #1382: [TRAFODION-2893] fix the logic Critical error ...
GitHub user xiaozhongwang opened a pull request:
https://github.com/apache/trafodion/pull/1382
[TRAFODION-2893] fix the logic Critical error checked by TScanCode.
The count of parameters mismatches the format string in sprintf
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/xiaozhongwang/trafodion TRAFODION-2893
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafodion/pull/1382.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1382
----
commit f897fff4194b18b637d37c82296dc60f743250ea
Author: Kenny <xi...@...>
Date: 2018-01-09T08:20:40Z
fix the logic Critical error checked by TScanCode
commit 7b268bd36dbc443350bb3c7eb287a59c9327bdc0
Author: Kenny <xi...@...>
Date: 2018-01-09T13:17:00Z
fix the logic Critical error checked by TScanCode
----
---
[GitHub] trafodion pull request #1382: [TRAFODION-2893] fix the logic Critical error ...
Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1382#discussion_r160475533
--- Diff: 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);
--- End diff --
This fix is fine, but I think this code is dead code. The NEO.HP_DEFINITION_SCHEMA stuff is all from a predecessor product. @hegdean, @arvind-narain , should this code simply be deleted?
---
[GitHub] trafodion pull request #1382: [TRAFODION-2893] fix the logic Critical error ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/trafodion/pull/1382
---