You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by li...@apache.org on 2018/07/21 16:23:54 UTC
[2/4] trafodion git commit: fix review comments
fix review comments
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/84142496
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/84142496
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/84142496
Branch: refs/heads/master
Commit: 841424963b538c119a482093966f48b2c83b67b5
Parents: 86fdb25
Author: Liu Ming <ov...@sina.com>
Authored: Tue Jul 17 03:58:12 2018 -0400
Committer: Liu Ming <ov...@sina.com>
Committed: Tue Jul 17 03:58:12 2018 -0400
----------------------------------------------------------------------
core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/84142496/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
index 2565cfd..92b4928 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
@@ -10993,7 +10993,7 @@ CmpSeabaseDDL::setupHbaseOptions(ElemDDLHbaseOptions * hbaseOptionsClause,
(HBASE_DATA_BLOCK_ENCODING_OPTION) == TRUE)
{
numHbaseOptions += 1;
- sprintf(optionStr, "DATA_BLOCK_ENCODING='%s'|", dataBlockEncoding.data());
+ snprintf(optionStr, 199, "DATA_BLOCK_ENCODING='%s'|", dataBlockEncoding.data());
hbaseOptionsStr += optionStr;
}
}
@@ -11007,7 +11007,7 @@ CmpSeabaseDDL::setupHbaseOptions(ElemDDLHbaseOptions * hbaseOptionsClause,
(HBASE_MEMSTORE_FLUSH_SIZE_OPTION) == TRUE)
{
numHbaseOptions += 1;
- sprintf(optionStr, "MEMSTORE_FLUSH_SIZE='%s'|", flushSize.data());
+ snprintf(optionStr, 199, "MEMSTORE_FLUSH_SIZE='%s'|", flushSize.data());
hbaseOptionsStr += optionStr;
}
}
@@ -11021,7 +11021,7 @@ CmpSeabaseDDL::setupHbaseOptions(ElemDDLHbaseOptions * hbaseOptionsClause,
(HBASE_COMPRESSION_OPTION) == TRUE)
{
numHbaseOptions += 1;
- sprintf(optionStr, "COMPRESSION='%s'|", compression.data());
+ snprintf(optionStr, 199, "COMPRESSION='%s'|", compression.data());
hbaseOptionsStr += optionStr;
}
}
@@ -11036,7 +11036,7 @@ CmpSeabaseDDL::setupHbaseOptions(ElemDDLHbaseOptions * hbaseOptionsClause,
hco += "HBASE_OPTIONS=>";
char hbaseOptionsNumCharStr[HBASE_OPTION_MAX_INTEGER_LENGTH];
- sprintf(hbaseOptionsNumCharStr, "%04d", numHbaseOptions);
+ snprintf(hbaseOptionsNumCharStr, HBASE_OPTION_MAX_INTEGER_LENGTH-1, "%04d", numHbaseOptions);
hco += hbaseOptionsNumCharStr;
hco += hbaseOptionsStr.data();