You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by se...@apache.org on 2017/09/29 23:56:24 UTC

[01/13] incubator-trafodion git commit: [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 4c9423f62 -> bd2932b6f


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/43c312df/core/sql/regress/core/FILTERRTS
----------------------------------------------------------------------
diff --git a/core/sql/regress/core/FILTERRTS b/core/sql/regress/core/FILTERRTS
index a4c6fbc..c7f92bc 100755
--- a/core/sql/regress/core/FILTERRTS
+++ b/core/sql/regress/core/FILTERRTS
@@ -89,13 +89,13 @@ s/IPC Memory Used[ 0-9]*/IPC Memory Used @exeMemory@/
 s/EXE Memory Used[ 0-9]*/EXE Memory Used @ipcMemory@/
 s/PID[0-9 ]*/PID @pid@/
 s/RMS Stats Reset Timestamp[ ]*[0-9]*\/[0-9]*\/[0-9]* [0-9]*:[0-9]*:[0-9]*.[0-9]*/RMS Stats Reset Timestamp @rmsStatsResetTimestamp@/
-s/10   .    11   .    5    0    EX_ROOT                  1[ ]*[0-9, |]*/10   .    11   .    5    0    EX_ROOT                  1 @exRootCounters@/
+s/EX_ROOT[ ]*[0-9, |]*/EX_ROOT @exRootCounters@/
 s/EX_SPLIT_TOP[ ]*[0-9, |]*/EX_SPLIT_TOP @exSplitTopCounters@/
 s/EX_SPLIT_BOTTOM[ ]*[0-9, |]*/EX_SPLIT_BOTTOM @exSplitBottomCounters@/
 s/EX_SEND_TOP[ ]*[0-9, |]*/EX_SEND_TOP @exSendTopCounters@/
 s/EX_SEND_BOTTOM[ ]*[0-9, |]*/EX_SEND_BOTTOM @exSendBottomCounters@/
-s/5    .    6    7    3    2    EX_HASH_GRBY             2[ ]*[0-9, -|A-Z]*/5    .    6    7    3    2    EX_HASH_GRBY             2 @exHashGrbyCounters@/
-s/.    .    1    2    1    3    EX_TRAF_KEY_SELECT       2[ ]*[0-9, |]*/.    .    1    2    1    3    EX_TRAF_KEY_SELECT       2 @exTrafKeySelectCounters@/
+s/EX_HASH_GRBY[ ]*[0-9, -|A-Z]*/EX_HASH_GRBY @exHashGrbyCounters@/
+s/EX_TRAF_KEY_SELECT[ ]*[0-9, |]*/EX_TRAF_KEY_SELECT @exTrafKeySelectCounters@/
 
 /[A-Z0-9]*\.[A-Z0-9]*\.TSTATI[ ]*/{N
 s/[A-Z0-9]*\.[A-Z0-9]*\.TSTATI[ ]*\n[0-9 ,]*/#CAT.#SCH.TSTATI pertableStats/


[06/13] incubator-trafodion git commit: [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Posted by se...@apache.org.
[TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Fix for regression failure of core/TEST019 in check PR tests


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

Branch: refs/heads/master
Commit: 2953e8c134e2febcf099db6e2c7c5f46681442e6
Parents: 43c312d
Author: selvaganesang <se...@esgyn.com>
Authored: Tue Sep 26 03:59:33 2017 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Tue Sep 26 03:59:33 2017 +0000

----------------------------------------------------------------------
 core/sql/regress/core/FILTER019 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2953e8c1/core/sql/regress/core/FILTER019
----------------------------------------------------------------------
diff --git a/core/sql/regress/core/FILTER019 b/core/sql/regress/core/FILTER019
index aa26a18..790b5e9 100755
--- a/core/sql/regress/core/FILTER019
+++ b/core/sql/regress/core/FILTER019
@@ -53,11 +53,11 @@ s/TotWriteIOs:[ ][0-9]*[ ]*/ There was an Overflow, /
 s/TotReadIOs:[ ][0-9]*[ ]*//
 s/MinClusterRows:[ ][0-9]*[ ]*//
 s/MaxClusterRows:[ ][0-9]*[ ]*//
-s/ClusterRowsVar:[ ][0-9]*[ ]*//
+s/ClusterRowsVar:[ ][0-9.]*[ ]*//
 s/ClusterNo:[ ][0-9]*[ ]*//g
 s/NumBuckets:[ ][0-9]*[ ]*//g
 s/ActRows:[ ][0-9]*[ ]*//g
 s/NumChains:[ ][0-9]*[ ]*//g
 s/MaxChain:[ ][0-9]*[ ]*//g
-s/VarChain:[ ][0-9]*[ ]*//g
+s/VarChain:[ ][0-9.]*[ ]*//g
 " $fil


[03/13] incubator-trafodion git commit: [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/43c312df/core/sql/executor/ExStats.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExStats.cpp b/core/sql/executor/ExStats.cpp
index b3f2aae..dd5c119 100644
--- a/core/sql/executor/ExStats.cpp
+++ b/core/sql/executor/ExStats.cpp
@@ -315,9 +315,9 @@ void ExClusterStats::getVariableStatsInfo(char * dataBuffer,
 {
   char *buf = dataBuffer;
 
-  str_sprintf (
+  sprintf (
        buf,
-       "NumBuckets: %u ActRows: %Ld NumChains: %u MaxChain: %Ld VarChain: %f ",
+       "NumBuckets: %u ActRows: %ld NumChains: %u MaxChain: %ld VarChain: %f ",
        bucketCnt_,
        actRows_,
        hashChains_.entryCnt(),
@@ -359,7 +359,7 @@ void ExClusterStats::getVariableStatsInfoAggr(char * dataBuffer,
       tempNext = tempNext->next_;
     }
   
-  str_sprintf(buf,
+  sprintf(buf,
 	      "NumClusters: %u ResidentClusters: %u TotNumBuckets: %u ",
 	      numClusters,
 	      residentClusters,
@@ -371,36 +371,36 @@ void ExClusterStats::getVariableStatsInfoAggr(char * dataBuffer,
   val = totalSizeTot.sum();
   if (val)
     {
-      str_sprintf(buf, "TotHashTableSize: %Ld ", val);
+      sprintf(buf, "TotHashTableSize: %ld ", val);
       buf += str_len(buf);
     }
   val = writeIOCntTot;
   if (val)
     {
-      str_sprintf(buf, "TotWriteIOs: %Ld ", val);
+      sprintf(buf, "TotWriteIOs: %ld ", val);
       buf += str_len(buf);
     }
   val = readIOCntTot;
   if (val)
     {
-      str_sprintf(buf, "TotReadIOs: %Ld ", val );
+      sprintf(buf, "TotReadIOs: %ld ", val );
       buf += str_len(buf);
     }
   val = actRowsTot.min();
   if (val)
     {
-      str_sprintf(buf, "MinClusterRows: %Ld ", val);
+      sprintf(buf, "MinClusterRows: %ld ", val);
       buf += str_len(buf);
     }
   val = actRowsTot.max();
   if (val)
     {
-      str_sprintf(buf, "MaxClusterRows: %Ld ", val);
+      sprintf(buf, "MaxClusterRows: %ld ", val);
       buf += str_len(buf);
     }
   if (actRowsTot.entryCnt())
     {
-      str_sprintf(buf, "ClusterRowsVar: %f ", actRowsTot.variance());
+      sprintf(buf, "ClusterRowsVar: %f ", actRowsTot.variance());
       buf += str_len(buf);
     }
 
@@ -411,7 +411,7 @@ void ExClusterStats::getVariableStatsInfoAggr(char * dataBuffer,
   ULng32 c = 0;
   while (tempNext && tempMaxLen > 200)
     {
-      str_sprintf(buf, "ClusterNo: %u ", c);
+      sprintf(buf, "ClusterNo: %u ", c);
       tempMaxLen -= str_len(buf);
       buf += str_len(buf);
 
@@ -458,7 +458,7 @@ void ExTimeStats::start()
       if (clock_gettime(clockid_, &startTime_))
       {
         char buf[256];
-        str_sprintf(buf, "clock_gettime failed, errno %d", errno);
+        sprintf(buf, "clock_gettime failed, errno %d", errno);
         ex_assert(0, buf);
       }
     }
@@ -474,7 +474,7 @@ Int64 ExTimeStats::stop()
       if (clock_gettime(clockid_, &endTime))
       {
         char buf[256];
-        str_sprintf(buf, "clock_gettime failed, errno %d", errno);
+        sprintf(buf, "clock_gettime failed, errno %d", errno);
         ex_assert(0, buf);
       }
       
@@ -1178,18 +1178,18 @@ void ExOperStats::getVariableStatsInfo(char * dataBuffer,
 
   ex_assert(maxLen > 1000, "Assume varchar has plenty of room");
 
-  str_sprintf(buf, "statsRowType: %d ", statType());
+  sprintf(buf, "statsRowType: %d ", statType());
   buf += str_len(buf);
   if (collectStatsType_ == ComTdb::OPERATOR_STATS ||
     collectStatsType_ == ComTdb::ALL_STATS ||
     collectStatsType_ == ComTdb::QID_DETAIL_STATS)
   {
-    str_sprintf(buf, "DOP: %d OperCpuTime: %Ld ", dop_, operTimer_.getTime());
+    sprintf(buf, "DOP: %d OperCpuTime: %ld ", dop_, operTimer_.getTime());
     buf += str_len(buf);
   }
   if (hasSentMsgIUD())
   {
-     str_sprintf(buf, "HasSentIudMsg: 1 ");
+     sprintf(buf, "HasSentIudMsg: 1 ");
      buf += str_len(buf);
   }
   if (collectStatsType_ == ComTdb::ALL_STATS)
@@ -1197,7 +1197,7 @@ void ExOperStats::getVariableStatsInfo(char * dataBuffer,
   // queue utilization
     if (allStats.upQueueSize_ || allStats.downQueueSize_)
     {
-      str_sprintf(
+      sprintf(
 	   buf,
 	   "QUtilUpMax: %u QUtilUpAvg: %u QUtilDnMax: %u QUtilDnAvg: %u ",
 	   (ULng32) allStats.upQueueStats_.max(),
@@ -1209,22 +1209,22 @@ void ExOperStats::getVariableStatsInfo(char * dataBuffer,
     // Work procedure return codes other than WORK_OK
     if (allStats.retCodes_[-WORK_OK])
     {
-      str_sprintf(buf, "RetOK: %u ", allStats.retCodes_[-WORK_OK]);
+      sprintf(buf, "RetOK: %u ", allStats.retCodes_[-WORK_OK]);
       buf += str_len(buf);
     }
     if (allStats.retCodes_[-WORK_CALL_AGAIN])
     {
-      str_sprintf(buf, "RetCallAgain: %u ", allStats.retCodes_[-WORK_CALL_AGAIN]);
+      sprintf(buf, "RetCallAgain: %u ", allStats.retCodes_[-WORK_CALL_AGAIN]);
       buf += str_len(buf);
     }
     if (allStats.retCodes_[-WORK_POOL_BLOCKED])
     {
-      str_sprintf(buf, "RetPoolBlocked: %u ", allStats.retCodes_[-WORK_POOL_BLOCKED]);
+      sprintf(buf, "RetPoolBlocked: %u ", allStats.retCodes_[-WORK_POOL_BLOCKED]);
       buf += str_len(buf);
     }
     if (allStats.retCodes_[-WORK_BAD_ERROR])
     {
-      str_sprintf(buf, "RetBadError: %u ",allStats. retCodes_[-WORK_BAD_ERROR]);
+      sprintf(buf, "RetBadError: %u ",allStats. retCodes_[-WORK_BAD_ERROR]);
       buf += str_len(buf);
     }
   }
@@ -1853,8 +1853,8 @@ void ExFragRootOperStats::getVariableStatsInfo(char * dataBuffer,
   const char *txtVal;
   if ((Int32)getCollectStatsType() == SQLCLI_CPU_OFFENDER_STATS)
   {
-    str_sprintf(buf, "statsRowType: %d ProcessId: %s Qid: %s CpuTime: %Ld SpaceUsed: %u "
-      "SpaceTotal: %u HeapUsed: %u HeapTotal: %u PMemUsed: %Ld diffCpuTime: %Ld ",
+    sprintf(buf, "statsRowType: %d ProcessId: %s Qid: %s CpuTime: %ld SpaceUsed: %u "
+      "SpaceTotal: %u HeapUsed: %u HeapTotal: %u PMemUsed: %ld diffCpuTime: %ld ",
       statType(),
       (((txtVal = getTextVal()) != NULL) ? txtVal : "NULL"),
       ((queryId_ != NULL) ? queryId_ : "NULL"),
@@ -1870,15 +1870,15 @@ void ExFragRootOperStats::getVariableStatsInfo(char * dataBuffer,
   {
     ExOperStats::getVariableStatsInfo(dataBuffer, dataLen, maxLen);
     buf += *((short *) dataLen);
-    str_sprintf(buf,
-		"CpuTime: %Ld ProcessId: %s StmtIndex: %d Timestamp: %Ld "
+    sprintf(buf,
+		"CpuTime: %ld ProcessId: %s StmtIndex: %d Timestamp: %ld "
 		"SpaceUsed: %u SpaceTotal: %u HeapUsed: %u HeapTotal: %u HeapWM: %u "
-		"Newprocess: %u NewprocessTime: %Ld reqMsgCnt: %Ld "
-		"regMsgBytes: %Ld replyMsgCnt: %Ld replyMsgBytes: %Ld "
-		"PMemUsed: %Ld scrOverFlowMode: %d sortTopN: %d "
-		"scrFileCount: %d bmoSpaceBufferSize: %d bmoSpaceBufferCount: %Ld scrIOSize: %d " 
-		"scrWriteCount:%Ld scrReadCount: %Ld scrIOMaxTime: %Ld bmoInterimRowCount: %Ld udrCpuTime: %Ld "
-		"maxWaitTime: %Ld avgWaitTime: %Ld hdfsAccess: %d ",
+		"Newprocess: %u NewprocessTime: %ld reqMsgCnt: %ld "
+		"regMsgBytes: %ld replyMsgCnt: %ld replyMsgBytes: %ld "
+		"PMemUsed: %ld scrOverFlowMode: %d sortTopN: %d "
+		"scrFileCount: %d bmoSpaceBufferSize: %d bmoSpaceBufferCount: %ld scrIOSize: %d " 
+		"scrWriteCount:%ld scrReadCount: %ld scrIOMaxTime: %ld bmoInterimRowCount: %ld udrCpuTime: %ld "
+		"maxWaitTime: %ld avgWaitTime: %ld hdfsAccess: %d ",
 		cpuTime_,
 		(((txtVal = getTextVal()) != NULL) ? txtVal : "NULL"),
 		stmtIndex_,
@@ -1925,7 +1925,7 @@ Lng32 ExFragRootOperStats::getStatsItem(SQLSTATS_ITEM* sqlStats_item)
   {
      if (sqlStats_item->str_value != NULL)
      {
-         str_sprintf(tmpBuf, "%Ld",
+         sprintf(tmpBuf, "%ld",
              cpuTime_ + espCpuTime_);
          len = str_len(tmpBuf);
          if (len > sqlStats_item->str_max_len)
@@ -2063,7 +2063,7 @@ ExHdfsScanStats::ExHdfsScanStats(NAMemory * heap,
   const char * name = hdfsTdb->tableName();
   Lng32 len = (Lng32)str_len(name); 
   tableName_ = (char *)heap_->allocateMemory(len + 1);
-  str_sprintf(tableName_, "%s", name);
+  sprintf(tableName_, "%s", name);
 
   queryId_ = NULL;
   queryIdLen_ = 0;
@@ -2306,7 +2306,7 @@ void ExHdfsScanStats::getVariableStatsInfo(char * dataBuffer,
   char *buf = dataBuffer;
   if ((Int32)getCollectStatsType() == SQLCLI_SE_OFFENDER_STATS)
   {
-     str_sprintf(buf, "statsRowType: %d Qid: %s blockedFor: %d ",
+     sprintf(buf, "statsRowType: %d Qid: %s blockedFor: %d ",
         statType(),
         ((queryId_ != NULL) ? queryId_ : "NULL"), blockTime_);
      buf += str_len(buf);
@@ -2319,8 +2319,8 @@ void ExHdfsScanStats::getVariableStatsInfo(char * dataBuffer,
      lobStats()->getVariableStatsInfo(buf, dataLen, maxLen);
      buf += *((short *) dataLen);
   }
-  str_sprintf (buf, 
-	   "AnsiName: %s  MessagesBytes: %Ld AccessedRows: %Ld UsedRows: %Ld HiveIOCalls: %Ld HiveSumIOTime: %Ld HdfsMaxIOTime: %Ld",
+  sprintf (buf, 
+	   "AnsiName: %s  MessagesBytes: %ld AccessedRows: %ld UsedRows: %ld HiveIOCalls: %ld HiveSumIOTime: %ld HdfsMaxIOTime: %ld",
 	       (char*)tableName_,
 	       numBytesRead(), 
 	       rowsAccessed(),
@@ -2401,7 +2401,7 @@ Lng32 ExHdfsScanStats::getStatsItem(SQLSTATS_ITEM* sqlStats_item)
       }
       else 
         len = 0; 
-      str_sprintf(tmpBuf, "|%Ld|%Ld", accessedRows_,
+      sprintf(tmpBuf, "|%ld|%ld", accessedRows_,
                numBytesRead_);
       len1 = str_len(tmpBuf);
       if ((len+len1) > sqlStats_item->str_max_len)
@@ -2440,7 +2440,7 @@ ExHbaseAccessStats::ExHbaseAccessStats(NAMemory * heap,
       const char * name = hbaseTdb->getTableName();
       Lng32 len = (Lng32)str_len(name); 
       tableName_ = (char *)heap_->allocateMemory(len + 1);
-      str_sprintf(tableName_, "%s", name);
+      sprintf(tableName_, "%s", name);
     }
   else
     {
@@ -2699,7 +2699,7 @@ void ExHbaseAccessStats::getVariableStatsInfo(char * dataBuffer,
   char *buf = dataBuffer;
   if ((Int32)getCollectStatsType() == SQLCLI_SE_OFFENDER_STATS)
   {
-     str_sprintf(buf, "statsRowType: %d Qid: %s blockedFor: %d ",
+     sprintf(buf, "statsRowType: %d Qid: %s blockedFor: %d ",
         statType(),
         ((queryId_ != NULL) ? queryId_ : "NULL"), blockTime_);
      buf += str_len(buf);
@@ -2712,8 +2712,8 @@ void ExHbaseAccessStats::getVariableStatsInfo(char * dataBuffer,
      lobStats()->getVariableStatsInfo(buf, dataLen, maxLen);
      buf += *((short *) dataLen);
   }
-  str_sprintf (buf, 
-	   "AnsiName: %s  MessagesBytes: %Ld AccessedRows: %Ld UsedRows: %Ld HbaseSumIOCalls: %Ld HbaseSumIOTime: %Ld HbaseMaxIOTime: %Ld",
+  sprintf (buf, 
+	   "AnsiName: %s  MessagesBytes: %ld AccessedRows: %ld UsedRows: %ld HbaseSumIOCalls: %ld HbaseSumIOTime: %ld HbaseMaxIOTime: %ld",
 	       (char*)tableName_,
 	       numBytesRead(), 
 	       rowsAccessed(),
@@ -2794,7 +2794,7 @@ Lng32 ExHbaseAccessStats::getStatsItem(SQLSTATS_ITEM* sqlStats_item)
       }
       else 
         len = 0; 
-      str_sprintf(tmpBuf, "|%Ld|%Ld", accessedRows_,
+      sprintf(tmpBuf, "|%ld|%ld", accessedRows_,
                numBytesRead_);
       len1 = str_len(tmpBuf);
       if ((len+len1) > sqlStats_item->str_max_len)
@@ -3013,20 +3013,20 @@ void ExProbeCacheStats::getVariableStatsInfo(char * dataBuffer,
   ExOperStats::getVariableStatsInfo(dataBuffer, dataLen, maxLen);
   buf += *((short *) dataLen);
 
-  str_sprintf(buf, "CacheHits: %d CacheMisses: %d ",
+  sprintf(buf, "CacheHits: %d CacheMisses: %d ",
 	            cacheHits_,    cacheMisses_ );
   buf += str_len(buf);
 
-  str_sprintf(buf, 
+  sprintf(buf, 
              "CanceledHits: %d CanceledMisses: %d CanceledNotStarted: %d ",
 	      canceledHits_,    canceledMisses_,    canceledNotStarted_);
   buf += str_len(buf);
 
-  str_sprintf(buf, "LongestChain: %d MaxNumChains: %d ",
+  sprintf(buf, "LongestChain: %d MaxNumChains: %d ",
 	            longestChain_,    maxNumChains_);
   buf += str_len(buf);
 
-  str_sprintf(buf, 
+  sprintf(buf, 
     "HighestUseCount: %d ResultBufferSizeBytes: %d NumCacheEntries: %d",
      highestUseCount_,    bufferSize_,                numCacheEntries_);
   buf += str_len(buf);
@@ -3235,27 +3235,26 @@ void ExPartitionAccessStats::getVariableStatsInfo(char * dataBuffer,
   ExOperStats::getVariableStatsInfo(dataBuffer, dataLen, maxLen);
   buf += *((short *) dataLen);
 
-  str_sprintf(buf,
-	      "AnsiName: %s PhysName: %s BuffersSize: %u BuffersSent: %u BuffersRcvd: %u NumMessages: %Ld MsgBytes: %Ld StatsBytes: %Ld MsgBytesSent: %Ld MsgBytesRcvd: %Ld ",
+  sprintf(buf,
+	      "AnsiName: %s PhysName: %s BuffersSize: %u BuffersSent: %u BuffersRcvd: %u NumMessages: %ld MsgBytes: %ld MsgBytesSent: %ld MsgBytesRcvd: %ld ",
 	      ansiName_, fileName_,
 	      bufferStats()->sendBufferSize(), bufferStats()->sentBuffers().entryCnt(), bufferStats()->recdBuffers().entryCnt(), 
 	      exeSEStats()->getNumIOCalls(),
 	      exeSEStats()->getNumIOBytes(),
-              0,
 	      bufferStats()->totalSentBytes(),
 	      bufferStats()->totalRecdBytes());
   buf += str_len(buf);
 
-  str_sprintf(buf,
-    "SendUtilMin: %Ld SendUtilMax: %Ld SendUtilAvg: %f RecvUtilMin: %Ld RecvUtilMax: %Ld RecvUtilAvg: %f Opens: %u OpenTime: %Ld ",
+  sprintf(buf,
+    "SendUtilMin: %ld SendUtilMax: %ld SendUtilAvg: %f RecvUtilMin: %ld RecvUtilMax: %ld RecvUtilAvg: %f Opens: %u OpenTime: %ld ",
 	      bufferStats()->sentBuffers().min(),
 	      bufferStats()->sentBuffers().max(),
 	      bufferStats()->sentBuffers().mean(), 
 	      bufferStats()->recdBuffers().min(),
 	      bufferStats()->recdBuffers().max(),
-	      bufferStats()->recdBuffers().mean()),
+	      bufferStats()->recdBuffers().mean(),
               opens_,
-              openTime_;
+              openTime_);
   buf += str_len(buf);
 
   *(short*)dataLen = (short) (buf - dataBuffer);
@@ -3494,12 +3493,12 @@ void ExHashGroupByStats::getVariableStatsInfo(char * dataBuffer,
   ExOperStats::getVariableStatsInfo(dataBuffer, dataLen, maxLen);
   buf += *((short *) dataLen);
 
-  str_sprintf(buf, "Memory: %Ld IOBytes: %Ld ", memSize_, ioSize_);
+  sprintf(buf, "Memory: %ld IOBytes: %ld ", memSize_, ioSize_);
   buf += str_len(buf);
 
   if (partialGroups_)
     {
-      str_sprintf(buf, "PartialGroups: %Ld ", partialGroups_);
+      sprintf(buf, "PartialGroups: %ld ", partialGroups_);
       buf += str_len(buf);
     }
 
@@ -3779,11 +3778,11 @@ void ExHashJoinStats::getVariableStatsInfo(char * dataBuffer,
   ExOperStats::getVariableStatsInfo(dataBuffer, dataLen, maxLen);
   buf += *((short *) dataLen);
 
-  str_sprintf(buf, "Memory: %Ld IOBytes: %Ld ", memSize_, ioSize_);
+  sprintf(buf, "Memory: %ld IOBytes: %ld ", memSize_, ioSize_);
   buf += str_len(buf);
 
   if ( clusterSplits_ || hashLoops_ ) {
-    str_sprintf(buf, "ClusterSplits: %u HashLoops: %u ", clusterSplits_, hashLoops_);
+    sprintf(buf, "ClusterSplits: %u HashLoops: %u ", clusterSplits_, hashLoops_);
     buf += str_len(buf);
   }
 
@@ -3969,11 +3968,11 @@ void ExESPStats::getVariableStatsInfo(char * dataBuffer,
   buf += *((short *) dataLen);
   maxLen -= (buf - dataBuffer);
 
-  str_sprintf(buf, "SendBufferSize: %u ", bufferStats()->sendBufferSize());
+  sprintf(buf, "SendBufferSize: %u ", bufferStats()->sendBufferSize());
   buf += str_len(buf);
   
-  str_sprintf(buf,
-	      "BuffersSent: %u MsgBytesSent: %Ld SendUtilMin: %Ld SendUtilMax: %Ld SendUtilAvg: %f ",
+  sprintf(buf,
+	      "BuffersSent: %u MsgBytesSent: %ld SendUtilMin: %ld SendUtilMax: %ld SendUtilAvg: %f ",
 	      bufferStats()->sentBuffers().entryCnt(),
 	      bufferStats()->totalSentBytes(),
 	      bufferStats()->sentBuffers().min(),
@@ -3981,11 +3980,11 @@ void ExESPStats::getVariableStatsInfo(char * dataBuffer,
 	      bufferStats()->sentBuffers().mean());
   buf += str_len(buf);
 
-  str_sprintf(buf, "RecvBufferSize: %u ", bufferStats()->recdBufferSize());
+  sprintf(buf, "RecvBufferSize: %u ", bufferStats()->recdBufferSize());
   buf += str_len(buf);
 
-  str_sprintf(buf,
-	      "BuffersRcvd: %u MsgBytesRcvd: %Ld RecvUtilMin: %Ld RecvUtilMax: %Ld RecvUtilAvg: %f ",
+  sprintf(buf,
+	      "BuffersRcvd: %u MsgBytesRcvd: %ld RecvUtilMin: %ld RecvUtilMax: %ld RecvUtilAvg: %f ",
 	      bufferStats()->recdBuffers().entryCnt(),
 	      bufferStats()->totalRecdBytes(),
 	      bufferStats()->recdBuffers().min(),
@@ -4115,7 +4114,7 @@ void ExSplitTopStats::getVariableStatsInfo(char * dataBuffer,
   buf += *((short *) dataLen);
   maxLen -= (buf - dataBuffer);
 
-  str_sprintf(buf, "MaxChildren: %u ActChildren: %u", 
+  sprintf(buf, "MaxChildren: %u ActChildren: %u", 
 	      maxChildren_, actChildren_);
   buf += str_len(buf);
   
@@ -4321,7 +4320,7 @@ void ExSortStats::getVariableStatsInfo(char * dataBuffer,
   ExOperStats::getVariableStatsInfo(dataBuffer, dataLen, maxLen);
   buf += *((short *) dataLen);
 
-  str_sprintf(buf, "RunSize: %u NumRuns: %u NumCompares: %u NumDupRecs: %u ScratchBlockSize: %u NumScratchBlocks: %u NumScratchWrites: %u NumScratchReads: %u", 
+  sprintf(buf, "RunSize: %u NumRuns: %u NumCompares: %u NumDupRecs: %u ScratchBlockSize: %u NumScratchBlocks: %u NumScratchWrites: %u NumScratchReads: %u", 
 	     runSize_, numRuns_, numCompares_, numDupRecs_,
 	      scrBlockSize_, scrNumBlocks_, scrNumWrites_, scrNumReads_);
   buf += str_len(buf);
@@ -4983,7 +4982,7 @@ void ExMeasStats::getVariableStatsInfo(char * dataBuffer, char * datalen,
   char * buf = dataBuffer;
   if ((Int32)getCollectStatsType() == SQLCLI_CPU_OFFENDER_STATS)
   {
-    str_sprintf(buf, "statsRowType: %d ProcessId: %s Qid: %s CpuTime: %Ld SpaceUsed: %u SpaceTotal: %u HeapUsed: %u HeapTotal: %u ",
+    sprintf(buf, "statsRowType: %d ProcessId: %s Qid: %s CpuTime: %ld SpaceUsed: %u SpaceTotal: %u HeapUsed: %u HeapTotal: %u ",
       statType(),
       "NULL",
       ((queryId_ != NULL) ? queryId_ : "NULL"),
@@ -4996,7 +4995,7 @@ void ExMeasStats::getVariableStatsInfo(char * dataBuffer, char * datalen,
   else
   if ((Int32)getCollectStatsType() == SQLCLI_QID_DETAIL_STATS)
   {
-    str_sprintf(buf, "statsRowType: %d ProcessId: %s CpuTime: %Ld SpaceUsed: %u SpaceTotal: %u HeapUsed: %u HeapTotal: %u HeapWM: %u reqMsgCnt: %Ld reqMsgBytes: %Ld replyMsgCnt: %Ld replyMsgBytes: %Ld ",
+    sprintf(buf, "statsRowType: %d ProcessId: %s CpuTime: %ld SpaceUsed: %u SpaceTotal: %u HeapUsed: %u HeapTotal: %u HeapWM: %u reqMsgCnt: %ld reqMsgBytes: %ld replyMsgCnt: %ld replyMsgBytes: %ld ",
       statType(),
       "NULL",
       cpuTime_,
@@ -5016,13 +5015,13 @@ void ExMeasStats::getVariableStatsInfo(char * dataBuffer, char * datalen,
   ExMeasBaseStats::getVariableStatsInfo(dataBuffer, datalen, maxLen);
   buf += *((short *) datalen);
 
-  str_sprintf(buf, 
-    "statsRowType: %d Newprocess: %u NewprocessTime: %Ld Timeouts: %u NumSorts: %u SortElapsedTime: %Ld "
-    "SpaceTotal: %d  SpaceUsed: %d HeapTotal: %d HeapUsed: %d HeapWM: %u CpuTime: %Ld "
-    "reqMsgCnt: %Ld reqMsgBytes: %Ld replyMsgCnt: %Ld "
-    "replyMsgBytes: %Ld scrOverflowMode: %d sortTopN: %d "
-    "scrFileCount: %d bmoSpaceBufferSize: %d bmoSpaceBufferCount: %Ld scrIoSize: %d "
-    "scrWriteCount: %Ld scrReadCount: %Ld scrIOMaxTime: %Ld interimRowCount: %Ld udrCpuTime: %Ld ",
+  sprintf(buf, 
+    "statsRowType: %d Newprocess: %u NewprocessTime: %ld Timeouts: %u NumSorts: %u SortElapsedTime: %ld "
+    "SpaceTotal: %d  SpaceUsed: %d HeapTotal: %d HeapUsed: %d HeapWM: %u CpuTime: %ld "
+    "reqMsgCnt: %ld reqMsgBytes: %ld replyMsgCnt: %ld "
+    "replyMsgBytes: %ld scrOverflowMode: %d sortTopN: %d "
+    "scrFileCount: %d bmoSpaceBufferSize: %d bmoSpaceBufferCount: %ld scrIoSize: %d "
+    "scrWriteCount: %ld scrReadCount: %ld scrIOMaxTime: %ld interimRowCount: %ld udrCpuTime: %ld ",
 	      statType(),
               getNewprocess(),
 	      getNewprocessTime(),
@@ -5328,13 +5327,13 @@ void ExUDRStats::getVariableStatsInfo(char * dataBuffer,
   ULng32 startUpSec = startUp / 1000000;
   ULng32 startUpMilli = (startUp % 1000000) / 10000;
 
-  str_sprintf(buf, "SendBufferSize: %u RecvBufferSize: %u UDRServerId: %s ", 
+  sprintf(buf, "SendBufferSize: %u RecvBufferSize: %u UDRServerId: %s ", 
               (ULng32) bufferStats()->sendBufferSize(),
               (ULng32) bufferStats()->recdBufferSize(),
               getUDRServerId() ? getUDRServerId() : "No Server Id info");
   buf += str_len(buf);
 
-  str_sprintf(buf, "UDRServerInit: %u.%03u CtrlMsgNum: %u CtrlMsgMean: %f DataMsgNum: %u DataMsgMean: %f ContMsgNum: %u ContMsgMean: %f ",
+  sprintf(buf, "UDRServerInit: %u.%03u CtrlMsgNum: %u CtrlMsgMean: %f DataMsgNum: %u DataMsgMean: %f ContMsgNum: %u ContMsgMean: %f ",
               startUpSec, startUpMilli,
               (ULng32) sentControlBuffers_.entryCnt(),
               sentControlBuffers_.mean(),
@@ -8749,14 +8748,14 @@ void ExMasterStats::getVariableStatsInfo(char * dataBuffer,
     stmtState = Statement::SUSPENDED_;
   if ((Int32)getCollectStatsType() == SQLCLI_ET_OFFENDER_STATS)
   {
-     str_sprintf(buf,"statsRowType: %d Qid: %s CompStartTime: %Ld "
-    "CompEndTime: %Ld "
-    "ExeStartTime: %Ld ExeEndTime: %Ld CanceledTime: %Ld RowsAffected: %Ld "
+     sprintf(buf,"statsRowType: %d Qid: %s CompStartTime: %ld "
+    "CompEndTime: %ld "
+    "ExeStartTime: %ld ExeEndTime: %ld CanceledTime: %ld RowsAffected: %ld "
     "SqlErrorCode: %d StatsErrorCode: %d State: %s StatsType: %s queryType: %s "
-    "subqueryType: %s EstRowsAccessed: %f EstRowsUsed: %f compElapsedTime: %Ld "
-    "exeElapsedTime: %Ld parentQid: %s parentQidSystem: %s childQid: %s "
-    "rowsReturned: %Ld firstRowReturnTime: %Ld numSqlProcs: %d  numCpus: %d "
-    "exePriority: %d transId: %Ld suspended: %s lastSuspendTime: %Ld "
+    "subqueryType: %s EstRowsAccessed: %f EstRowsUsed: %f compElapsedTime: %ld "
+    "exeElapsedTime: %ld parentQid: %s parentQidSystem: %s childQid: %s "
+    "rowsReturned: %ld firstRowReturnTime: %ld numSqlProcs: %d  numCpus: %d "
+    "exePriority: %d transId: %ld suspended: %s lastSuspendTime: %ld "
     "LastErrorBeforeAQR: %d AQRNumRetries: %d DelayBeforeAQR: %d "
     "reclaimSpaceCnt: %d "
     "blockedInSQL: %d blockedInClient: %d  lastActivity: %d "
@@ -8803,17 +8802,17 @@ void ExMasterStats::getVariableStatsInfo(char * dataBuffer,
    }
    else
    {
-     str_sprintf(buf,"statsRowType: %d Qid: %s CompStartTime: %Ld "
-    "CompEndTime: %Ld "
-    "ExeStartTime: %Ld ExeEndTime: %Ld CanceledTime: %Ld RowsAffected: %Ld "
+     sprintf(buf,"statsRowType: %d Qid: %s CompStartTime: %ld "
+    "CompEndTime: %ld "
+    "ExeStartTime: %ld ExeEndTime: %ld CanceledTime: %ld RowsAffected: %ld "
     "SqlErrorCode: %d StatsErrorCode: %d State: %d StatsType: %d queryType: %d "
-    "subqueryType: %d EstRowsAccessed: %f EstRowsUsed: %f compElapsedTime: %Ld "
-    "exeElapsedTime: %Ld parentQid: %s parentQidSystem: %s childQid: %s "
-    "rowsReturned: %Ld firstRowReturnTime: %Ld numSqlProcs: %d  numCpus: %d "
-    "exePriority: %d transId: %Ld suspended: %s lastSuspendTime: %Ld "
+    "subqueryType: %d EstRowsAccessed: %f EstRowsUsed: %f compElapsedTime: %ld "
+    "exeElapsedTime: %ld parentQid: %s parentQidSystem: %s childQid: %s "
+    "rowsReturned: %ld firstRowReturnTime: %ld numSqlProcs: %d  numCpus: %d "
+    "exePriority: %d transId: %ld suspended: %s lastSuspendTime: %ld "
     "LastErrorBeforeAQR: %d AQRNumRetries: %d DelayBeforeAQR: %d reclaimSpaceCnt: %d "
     "blockedInSQL: %d blockedInClient: %d  lastActivity: %d "
-    "exeCount: %Ld, exeTimeMin: %Ld exeTimeMax: %Ld exeTimeAvg: %Ld "
+    "exeCount: %u, exeTimeMin: %ld exeTimeMax: %ld exeTimeAvg: %f "
                   "sqlSrcLen: %d sqlSrc: \"%s\"",
               statType(),
               ((queryId_ != NULL) ? queryId_ : "NULL"),
@@ -10154,7 +10153,7 @@ void ExRMSStats::getVariableStatsInfo(char * dataBuffer,
 
   if (subReqType()== SQLCLI_STATS_REQ_RMS_CHECK)
   {
-      str_sprintf(buf,
+      sprintf(buf,
          "statsRowType: %d nodeId: %d nodeName: %s ",
          SQLCLI_RMS_CHECK_STATS,
          cpu_,
@@ -10162,14 +10161,14 @@ void ExRMSStats::getVariableStatsInfo(char * dataBuffer,
       );
       if (sscpOpens_ != 0 && nodesInCluster_ != sscpOpens_)
       {    
-         str_sprintf(tmpbuf, "sscpOpens: %d ", sscpOpens_);
+         sprintf(tmpbuf, "sscpOpens: %d ", sscpOpens_);
          if (status < 1)
             status = 1;
          strcat(buf, tmpbuf);
       }   
       if (sscpDeletedOpens_ > 0)
       {    
-         str_sprintf(tmpbuf, "sscpDeletedOpens: %d ", sscpDeletedOpens_);
+         sprintf(tmpbuf, "sscpDeletedOpens: %d ", sscpDeletedOpens_);
          if (status < 1)
             status = 1;
          strcat(buf, tmpbuf);
@@ -10184,7 +10183,7 @@ void ExRMSStats::getVariableStatsInfo(char * dataBuffer,
                   (double) currGlobalStatsHeapAlloc_) > 
                     (100 - statsHeapFreePercent))
       {
-         str_sprintf(tmpbuf, "statsHeapUsed: %Ld statsHeapTotal: %Ld statsHeapWM: %Ld ",
+         sprintf(tmpbuf, "statsHeapUsed: %ld statsHeapTotal: %ld statsHeapWM: %ld ",
                   currGlobalStatsHeapUsage_,
                   currGlobalStatsHeapAlloc_,
                   globalStatsHeapWatermark_);
@@ -10194,29 +10193,29 @@ void ExRMSStats::getVariableStatsInfo(char * dataBuffer,
       } 
       if ((currNoOfProcessStatsHeap_ - currNoOfRegProcesses_) > 100)
       {
-         str_sprintf(tmpbuf, "noOfProcessRegd: %d  noOfProcessStatsHeaps: %d ",
+         sprintf(tmpbuf, "noOfProcessRegd: %d  noOfProcessStatsHeaps: %d ",
                    currNoOfRegProcesses_,
                    currNoOfProcessStatsHeap_);
          if (status < 1)
             status = 1;
          strcat(buf, tmpbuf);
       } 
-      str_sprintf(tmpbuf, "Status: %s ", statusStr[status]);
+      sprintf(tmpbuf, "Status: %s ", statusStr[status]);
       strcat(buf, tmpbuf);
   }
   else
   {
-    str_sprintf (
+    sprintf (
        buf,
        "statsRowType: %d rmsVersion: %d nodeName: %s cpu: %d nodeId: %d "
-       "sscpPid: %d sscpPri: %d sscpTimestamp: %Ld "
-       "ssmpPid: %d ssmpPri: %d ssmpTimestamp: %Ld srcLen: %d rtsEnvType: %d "
-        "statsHeapUsed: %Ld "
-        "statsHeapTotal: %Ld statsHeapWM: %Ld noOfProcessRegd: %d  noOfProcessStatsHeaps: %d "
+       "sscpPid: %d sscpPri: %d sscpTimestamp: %ld "
+       "ssmpPid: %d ssmpPri: %d ssmpTimestamp: %ld srcLen: %d rtsEnvType: %d "
+        "statsHeapUsed: %ld "
+        "statsHeapTotal: %ld statsHeapWM: %ld noOfProcessRegd: %d  noOfProcessStatsHeaps: %d "
         "noOfQidRegd: %d semPid: %d sscpOpens: %d sscpDeleted: %d "
-        "stmtStatsGCed: %d lastGCTime: %Ld "
-        "totalStmtStatsGCed: %Ld ssmpReqMsgCnt: %Ld ssmpReqMsgBytes: %Ld ssmpReplyMsgCnt: %Ld ssmpReplyMsgBytes: %Ld "
-        "sscpReqMsgCnt: %Ld sscpReqMsgBytes: %Ld sscpReplyMsgCnt: %Ld sscpReplyMsgBytes: %Ld resetTimestamp: %Ld " 
+        "stmtStatsGCed: %d lastGCTime: %ld "
+        "totalStmtStatsGCed: %ld ssmpReqMsgCnt: %ld ssmpReqMsgBytes: %ld ssmpReplyMsgCnt: %ld ssmpReplyMsgBytes: %ld "
+        "sscpReqMsgCnt: %ld sscpReqMsgBytes: %ld sscpReplyMsgCnt: %ld sscpReplyMsgBytes: %ld resetTimestamp: %ld " 
         "numQueryInvKeys: %d ",
         statType(),
         rmsVersion_,
@@ -10554,16 +10553,17 @@ void ExBMOStats::getVariableStatsInfo(char * dataBuffer,
           		  Lng32 maxLen)
 {
   char *buf = dataBuffer;
-  str_sprintf (
+  sprintf (
        buf,
-       "statsRowType: %d explainTdbId: %d bmoPhase: %s bmoIntCount: %Ld estMemory: %f bmoHeapUsed: %d bmoHeapTotal: %d bmoHeapWM: %d "
+       "statsRowType: %d explainTdbId: %d bmoPhase: %s bmoIntCount: %ld estMemory: %f bmoHeapUsed: %d bmoHeapTotal: %d bmoHeapWM: %d "
        "bmoSpaceBufferSize: %d bmoSpaceBufferCount: %d "
        "scrOverFlowMode: %d scrFileCount: %d scrBufferBlockSize: %d scrBuffferRead: %d scrBufferWritten: %d "
-       "scrWriteCount: %Ld scrReadCount: %Ld sortTopN: %d scrIOSize: %d scrIOTime: %Ld scrIOMaxTime: %Ld ",
+       "scrWriteCount: %ld scrReadCount: %ld sortTopN: %d scrIOSize: %d scrIOTime: %ld scrIOMaxTime: %ld ",
         statType(),
         getExplainNodeId(),
         getBmoPhaseStr(),
         interimRowCount_,
+        estMemoryUsage_, 
         bmoHeapUsage_,
         bmoHeapAlloc_,
         bmoHeapWM_,
@@ -10712,7 +10712,7 @@ Lng32 ExBMOStats::getStatsItem(SQLSTATS_ITEM* sqlStats_item)
   case SQLSTATS_DETAIL:
    if (sqlStats_item->str_value != NULL)
     {
-      str_sprintf(tmpBuf, "%d|%d|%d", 
+      sprintf(tmpBuf, "%d|%d|%d", 
               scratchBufferBlockRead_,
               scratchBufferBlockWritten_,
               scratchFileCount_);
@@ -10846,10 +10846,10 @@ void ExUDRBaseStats::getVariableStatsInfo(char * dataBuffer,
 {
   char *buf = dataBuffer;
   char tmpBuf[50];
-  str_sprintf (
+  sprintf (
        buf,
-       "statsRowType: %d reqMsgCnt: %Ld regMsgBytes: %Ld replyMsgCnt: %Ld replyMsgBytes: %Ld "
-       "udrCpuTime: %Ld recentReqTS: %Ld recentReplyTS: %Ld ",
+       "statsRowType: %d reqMsgCnt: %ld regMsgBytes: %ld replyMsgCnt: %ld replyMsgBytes: %ld "
+       "udrCpuTime: %ld recentReqTS: %ld recentReplyTS: %ld ",
         statType(),
         reqMsgCnt_,
         reqMsgBytes_,
@@ -10861,7 +10861,7 @@ void ExUDRBaseStats::getVariableStatsInfo(char * dataBuffer,
        );
   if ((Int32)getCollectStatsType() == SQLCLI_QID_DETAIL_STATS)
   { 
-    str_sprintf(tmpBuf, " UDRServerId: %s ", (UDRServerId_[0] =='\0' ? "None" : UDRServerId_));
+    sprintf(tmpBuf, " UDRServerId: %s ", (UDRServerId_[0] =='\0' ? "None" : UDRServerId_));
     str_cat(buf, tmpBuf, buf);
   }
   buf += str_len(buf);
@@ -11127,7 +11127,7 @@ void ExFastExtractStats::getVariableStatsInfo(char * dataBuffer,
   ExOperStats::getVariableStatsInfo(dataBuffer, dataLen, maxLen);
   buf += *((short *) dataLen);
 
-  str_sprintf(buf,
+  sprintf(buf,
               "BufferCount: %u processedRowsCount: %u errorRowsCount: %u "
               "readyToSendBuffersCount: %u sentBuffersCount: %u "
               "partition Number: %u bufferAllocFailuresCount: %u "
@@ -11311,11 +11311,11 @@ void ExProcessStats::getVariableStatsInfo(char * dataBuffer,
                           Lng32 maxLen)
 {
   char *buf = dataBuffer;
-  str_sprintf (
+  sprintf (
        buf,
-       "statsRowType: %d nodeId: %d processId: %d startTime: %Ld "
-       "exeMemHighWMInMB: %Ld exeMemAllocInMB: %Ld exeMemUsedInMB: %Ld "
-       "ipcMemHighWMInMB: %Ld ipcMemAllocInMB: %Ld ipcMemUsedInMB: %Ld "
+       "statsRowType: %d nodeId: %d processId: %d startTime: %ld "
+       "exeMemHighWMInMB: %ld exeMemAllocInMB: %ld exeMemUsedInMB: %ld "
+       "ipcMemHighWMInMB: %ld ipcMemAllocInMB: %ld ipcMemUsedInMB: %ld "
        "pfsAllocSize: %d pfsCurUse: %d pfsMaxUse: %d "
        "numSqlOpens: %d arkfsSessionCount: %d "
        "staticStmtCount: %d dynamicStmtCount: %d "


[05/13] incubator-trafodion git commit: [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Posted by se...@apache.org.
[TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

str_sprintf is Trafodion specific formatting function. Replaced
str_sprintf with sprint that provides better checking with parameters.
str_sprintf is replaced with sprintf in the statistics output related functions
only. It is advised that the new code should start using the standard formatting
functions.


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

Branch: refs/heads/master
Commit: 43c312df5ea45c810a1b7f5e2bcd8e5a0bde8bdb
Parents: 4e316c0
Author: selvaganesang <se...@esgyn.com>
Authored: Tue Sep 26 00:36:26 2017 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Tue Sep 26 00:36:26 2017 +0000

----------------------------------------------------------------------
 core/sql/executor/ExExeUtilGetStats.cpp |  895 +++++------
 core/sql/executor/ExStats.cpp           |  234 +--
 core/sql/regress/core/EXPECTEDRTS       | 2134 +++++++++++++-------------
 core/sql/regress/core/FILTERRTS         |    6 +-
 4 files changed, 1635 insertions(+), 1634 deletions(-)
----------------------------------------------------------------------



[10/13] incubator-trafodion git commit: Merge branch 'master' of git://git.apache.org/incubator-trafodion into master_stats_core_issue

Posted by se...@apache.org.
Merge branch 'master' of git://git.apache.org/incubator-trafodion into master_stats_core_issue

Conflicts:
	core/sql/common/str.cpp


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

Branch: refs/heads/master
Commit: 84a21ddf6bd3bfe49728330bafa3a71f8b808f67
Parents: 8fd4987 e1ae98f
Author: selvaganesang <se...@esgyn.com>
Authored: Wed Sep 27 21:40:42 2017 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Wed Sep 27 21:40:42 2017 +0000

----------------------------------------------------------------------
 core/conn/odb/Makefile                          |   7 +-
 core/conn/odb/odb/odb.vcxproj                   | 342 ++++++-----
 core/conn/odb/odb/odb.vcxproj.filters           |  92 +--
 core/conn/odb/src/JsonReader.c                  | 598 ++++++++++++++++++
 core/conn/odb/src/JsonReader.h                  | 301 +++++++++
 core/conn/odb/src/odb.c                         | 614 ++++++++++++++++++-
 core/sql/arkcmp/vers_libarkcmp.cpp              |   2 -
 core/sql/bin/ex_esp_main.cpp                    |   4 -
 core/sql/bin/ex_ssmp_main.cpp                   |   2 -
 core/sql/cli/Cli.cpp                            | 145 +----
 core/sql/cli/Cli.h                              |   2 -
 core/sql/cli/CliExpExchange.cpp                 |  10 -
 core/sql/cli/CliExtern.cpp                      |  85 ---
 core/sql/cli/CliImplLmExtFunc.cpp               |   2 -
 core/sql/cli/ExSqlComp.cpp                      |  24 +-
 core/sql/cli/Globals.cpp                        |  17 -
 core/sql/cli/Globals.h                          |  12 +-
 core/sql/comexe/ComKeyRange.cpp                 |   2 -
 core/sql/comexe/ComPackDefs.h                   |   2 -
 core/sql/comexe/ComTdb.cpp                      |   5 -
 core/sql/comexe/ComTdb.h                        |  10 +-
 core/sql/comexe/ComTdbCompoundStmt.cpp          |   2 -
 core/sql/comexe/ComTdbCompoundStmt.h            |   4 -
 core/sql/comexe/ComTdbControl.h                 |   2 -
 core/sql/comexe/ComTdbExeUtil.cpp               |   2 -
 core/sql/comexe/ComTdbExplain.cpp               |   2 -
 core/sql/comexe/ComTdbMj.cpp                    |   4 +-
 core/sql/comexe/ComTdbSendBottom.cpp            |   6 -
 core/sql/comexe/ComTdbSendBottom.h              |   2 -
 core/sql/comexe/ComTdbSendTop.cpp               |   6 -
 core/sql/comexe/ComTdbSendTop.h                 |   2 +-
 core/sql/comexe/ComTdbSequence.cpp              |   4 -
 core/sql/comexe/ComTdbSplitBottom.cpp           |   4 -
 core/sql/comexe/ComTdbSplitBottom.h             |   2 -
 core/sql/comexe/ComTdbSplitTop.cpp              |   4 -
 core/sql/comexe/ComTdbSplitTop.h                |   4 -
 core/sql/comexe/ComTdbTranspose.h               |   2 -
 core/sql/comexe/ComTdbTuple.cpp                 |   2 -
 core/sql/comexe/ComTdbTuple.h                   |   4 -
 core/sql/comexe/ComTdbUnPackRows.cpp            |   4 -
 core/sql/comexe/ComTdbUnPackRows.h              |   2 -
 core/sql/comexe/ComTdbUnion.cpp                 |   4 -
 core/sql/comexe/ComTdbUnion.h                   |   4 -
 core/sql/comexe/LateBindInfo.cpp                |   3 -
 core/sql/common/BaseTypes.cpp                   |   6 +-
 core/sql/common/CharType.cpp                    |  24 +-
 core/sql/common/ComMvAttributeBitmap.cpp        |  10 -
 core/sql/common/ComMvAttributeBitmap.h          |   2 -
 core/sql/common/ComSpace.cpp                    |   4 -
 core/sql/common/DateTimeType.cpp                |  10 -
 core/sql/common/ExprNode.cpp                    |   2 -
 core/sql/common/Ipc.cpp                         |  42 +-
 core/sql/common/Ipc.h                           |   2 -
 core/sql/common/IpcGuardian.cpp                 |   1 -
 core/sql/common/NAMemory.h                      |   4 -
 core/sql/common/NAString.cpp                    |  10 +-
 core/sql/common/NAString2.cpp                   |   2 -
 core/sql/common/NAType.cpp                      |   6 -
 core/sql/common/Timer.h                         |   2 -
 core/sql/common/charinfo.cpp                    |  14 -
 core/sql/common/charinfo.h                      |   2 -
 core/sql/common/conversionSJIS.cpp              |   2 -
 core/sql/common/dfs2rec.h                       |   2 -
 core/sql/common/nawstring.cpp                   |   6 -
 core/sql/common/nchar_mp.h                      |   4 -
 core/sql/common/str.cpp                         |   8 +-
 core/sql/common/wstr.cpp                        |   4 -
 core/sql/executor/Allocator.h                   |   4 -
 core/sql/executor/CliMsgObj.cpp                 |   2 -
 core/sql/executor/ExComTdb.cpp                  |   8 +-
 core/sql/executor/ExExeUtilGet.cpp              |   3 -
 core/sql/executor/ExSequence.cpp                |  54 --
 core/sql/executor/ExVPJoin.cpp                  |   2 -
 core/sql/executor/ExVPJoin.h                    |   2 -
 core/sql/executor/HdfsLogger.h                  |   2 -
 core/sql/executor/MdamRefList.cpp               |   4 -
 core/sql/executor/MdamRefList.h                 |   4 -
 core/sql/executor/cluster.cpp                   |   4 +-
 core/sql/executor/cluster.h                     |   2 +-
 core/sql/executor/ex_ex.h                       |   2 +-
 core/sql/executor/ex_hash_grby.cpp              |  29 +-
 core/sql/executor/ex_hash_grby.h                |   6 +-
 core/sql/executor/ex_mdam.cpp                   |   8 +-
 core/sql/executor/ex_queue.cpp                  |   2 -
 core/sql/executor/ex_root.cpp                   |  10 -
 core/sql/executor/ex_sort.cpp                   | 116 ----
 core/sql/executor/ex_split_bottom.cpp           |   2 -
 core/sql/executor/ex_tcb_private.cpp            |   2 -
 core/sql/executor/ex_timeout.cpp                |   2 -
 core/sql/executor/ex_timeout.h                  |   4 +-
 core/sql/executor/ex_transaction.cpp            |  15 +-
 core/sql/executor/ex_transaction.h              |   4 +-
 core/sql/executor/ex_tuple.cpp                  |   6 -
 core/sql/executor/ex_tuple.h                    |  10 +-
 core/sql/executor/ex_tuple_flow.cpp             |  22 +-
 core/sql/executor/key_range.h                   |   4 +-
 core/sql/executor/timeout_data.h                |   6 +-
 core/sql/exp/ExpLOBprocess.cpp                  |   8 +-
 core/sql/exp/ExpPCode.cpp                       |  18 -
 core/sql/exp/ExpPCodeOptimizations.cpp          |   2 -
 core/sql/exp/ExpSequenceFunction.cpp            |  20 -
 core/sql/exp/ExpSqlTupp.cpp                     |   2 -
 core/sql/exp/exp_aggregate.cpp                  |   4 -
 core/sql/exp/exp_arith.cpp                      |  26 -
 core/sql/exp/exp_bignum.cpp                     |  16 -
 core/sql/exp/exp_clause.cpp                     |  36 --
 core/sql/exp/exp_comp.cpp                       |  48 --
 core/sql/exp/exp_conv.cpp                       | 144 +----
 core/sql/exp/exp_datetime.cpp                   |  12 -
 core/sql/exp/exp_expr.cpp                       |   6 -
 core/sql/exp/exp_function.cpp                   |  27 -
 core/sql/exp/exp_like.cpp                       |  35 +-
 core/sql/exp/exp_math_func.cpp                  |  11 -
 core/sql/exp/exp_misc.cpp                       |   2 -
 core/sql/export/ComDiags.cpp                    |   1 -
 core/sql/generator/GenPreCode.cpp               |  20 -
 core/sql/generator/vers_libgenerator.cpp        |   2 -
 core/sql/langman/LmAssert.cpp                   |   2 -
 core/sql/langman/LmComQueue.cpp                 |   4 -
 core/sql/langman/LmContManager.cpp              |   4 -
 core/sql/langman/LmDebug.cpp                    |  12 +-
 core/sql/langman/LmJavaExceptionReporter.cpp    |   6 -
 core/sql/langman/LmJavaHooks.cpp                |   2 -
 core/sql/langman/LmLangManager.cpp              |   2 -
 core/sql/langman/LmResultSetJava.cpp            |   2 -
 core/sql/langman/LmUtility.cpp                  |   8 -
 core/sql/langman/vers_libtdm_sqllangman.cpp     |   2 -
 core/sql/optimizer/Analyzer.cpp                 | 128 +---
 core/sql/optimizer/Analyzer.h                   |  40 --
 core/sql/optimizer/AppliedStatMan.cpp           |   6 -
 core/sql/optimizer/AppliedStatMan.h             |   2 -
 core/sql/optimizer/BindItemExpr.cpp             |   8 +-
 core/sql/optimizer/BindRI.cpp                   |   2 -
 core/sql/optimizer/BindRelExpr.cpp              |  24 -
 core/sql/optimizer/BindWA.cpp                   |   8 -
 core/sql/optimizer/ChangesTable.cpp             |  16 +-
 core/sql/optimizer/ChangesTable.h               |  14 +-
 core/sql/optimizer/ClusteredBitmap.cpp          |   4 -
 core/sql/optimizer/CmpProcess.cpp               |   2 -
 core/sql/optimizer/ColStatDesc.cpp              |  60 +-
 core/sql/optimizer/ColStatDesc.h                |   2 -
 core/sql/optimizer/ColumnDesc.cpp               |   2 -
 core/sql/optimizer/ColumnDesc.h                 |   2 -
 core/sql/optimizer/ColumnNameMap.h              |   2 -
 core/sql/optimizer/ControlDB.cpp                |   2 -
 core/sql/optimizer/Cost.cpp                     |  30 -
 core/sql/optimizer/EncodedValue.cpp             |   4 -
 core/sql/optimizer/EstLogProp.cpp               |   4 -
 core/sql/optimizer/EstLogProp.h                 |   4 +-
 core/sql/optimizer/GroupAttr.cpp                |  10 +-
 core/sql/optimizer/ImplRule.cpp                 |  74 ++-
 core/sql/optimizer/Inlining.cpp                 |   8 -
 core/sql/optimizer/Inlining.h                   |   6 +-
 core/sql/optimizer/ItemArith.h                  |   2 +-
 core/sql/optimizer/ItemColRef.h                 |  14 +-
 core/sql/optimizer/ItemConstr.h                 |   2 +-
 core/sql/optimizer/ItemExpr.cpp                 |  26 +-
 core/sql/optimizer/ItemExpr.h                   |   8 +-
 core/sql/optimizer/ItmBitMuxFunction.cpp        |   2 -
 core/sql/optimizer/ItmBitMuxFunction.h          |   2 -
 core/sql/optimizer/ItmFlowControlFunction.cpp   |   6 -
 core/sql/optimizer/LargeScopeRules.cpp          |  38 --
 core/sql/optimizer/MVCandidates.cpp             |  38 +-
 core/sql/optimizer/MVCandidates.h               |   2 -
 core/sql/optimizer/MVInfo.cpp                   |  18 -
 core/sql/optimizer/MjvBuilder.cpp               |   6 -
 core/sql/optimizer/MultiJoin.cpp                |  18 +-
 core/sql/optimizer/MultiJoin.h                  |   4 -
 core/sql/optimizer/MvLog.cpp                    |   2 -
 core/sql/optimizer/MvLog.h                      |   2 -
 core/sql/optimizer/MvMultiTxnMavBuilder.cpp     |  14 -
 core/sql/optimizer/MvRefreshBuilder.cpp         |  32 -
 core/sql/optimizer/MvRefreshBuilder.h           |   2 -
 core/sql/optimizer/NAClusterInfo.cpp            |   8 -
 core/sql/optimizer/NAClusterInfo.h              |   2 -
 core/sql/optimizer/NAColumn.cpp                 |   8 -
 core/sql/optimizer/NATable.cpp                  |  10 -
 core/sql/optimizer/NATable.h                    |   6 -
 core/sql/optimizer/NodeMap.cpp                  |  12 -
 core/sql/optimizer/NormRelExpr.cpp              |   1 -
 core/sql/optimizer/ObjectNames.cpp              |   4 -
 core/sql/optimizer/OptRange.cpp                 |  30 +-
 core/sql/optimizer/OptTrigger.cpp               |  10 +-
 core/sql/optimizer/OptTrigger.h                 |   8 +-
 core/sql/optimizer/PackedColDesc.cpp            |   2 -
 core/sql/optimizer/PackedColDesc.h              |   2 -
 core/sql/optimizer/PartFunc.cpp                 |  38 --
 core/sql/optimizer/PartFunc.h                   |   2 -
 core/sql/optimizer/PartReq.cpp                  |  26 -
 core/sql/optimizer/PartReq.h                    |   6 -
 core/sql/optimizer/PhyProp.cpp                  |   6 -
 core/sql/optimizer/PhyProp.h                    |   8 +-
 core/sql/optimizer/QRDescGenerator.cpp          |  16 +-
 core/sql/optimizer/QueryGraph.cpp               |   2 -
 core/sql/optimizer/QueryRewriteHandler.cpp      |  18 +-
 core/sql/optimizer/QueryRewriteHandler.h        |   2 +-
 core/sql/optimizer/Refresh.cpp                  |   2 -
 core/sql/optimizer/Rule.cpp                     |  14 -
 core/sql/optimizer/Rule.h                       |   8 -
 core/sql/optimizer/ScanOptimizer.cpp            |  66 +-
 core/sql/optimizer/SearchKey.cpp                |  10 +-
 core/sql/optimizer/Stats.cpp                    |  92 +--
 core/sql/optimizer/Stats.h                      |   4 -
 core/sql/optimizer/SynthType.cpp                |  28 +-
 core/sql/optimizer/TableDesc.cpp                |   8 +-
 core/sql/optimizer/TableDesc.h                  |   4 -
 core/sql/optimizer/TransRule.cpp                |   4 +-
 core/sql/optimizer/TransRule.h                  |  42 +-
 core/sql/optimizer/TriggerDB.cpp                |  16 -
 core/sql/optimizer/Triggers.cpp                 |  18 -
 core/sql/optimizer/Triggers.h                   |  15 +-
 core/sql/optimizer/ValueDesc.cpp                |   2 +-
 core/sql/optimizer/costmethod.cpp               |  58 +-
 core/sql/optimizer/disjunct.h                   |   2 -
 core/sql/optimizer/mdam.cpp                     |  28 +-
 core/sql/optimizer/memo.cpp                     |  12 +-
 core/sql/optimizer/opt.cpp                      |  16 -
 core/sql/optimizer/tasks.cpp                    |  22 -
 core/sql/optimizer/vers_liboptimizer.cpp        |   2 -
 core/sql/parser/BindStmtDDL.cpp                 |   4 -
 .../ElemDDLCreateMVOneAttributeTableList.cpp    |   2 -
 .../ElemDDLCreateMVOneAttributeTableList.h      |   2 -
 core/sql/parser/ElemDDLLobAttrs.h               |   2 -
 core/sql/parser/ElemDDLLoggable.h               |   1 -
 core/sql/parser/ElemDDLTableFeature.h           |   1 -
 core/sql/parser/StmtDDLAlterMV.h                |   4 -
 core/sql/parser/StmtDDLCreate.cpp               |   2 -
 .../parser/StmtDDLCreateComponentPrivilege.h    |   2 -
 core/sql/parser/StmtDDLCreateMV.h               |   8 -
 core/sql/parser/StmtDDLCreateTrigger.h          |   2 -
 core/sql/parser/StmtDDLDrop.cpp                 |   2 -
 core/sql/parser/StmtDDLDropComponentPrivilege.h |   2 -
 core/sql/parser/StmtDDLDropMV.h                 |   2 -
 .../sql/parser/StmtDDLGrantComponentPrivilege.h |   2 -
 core/sql/parser/StmtDDLNode.cpp                 |   8 -
 .../parser/StmtDDLRevokeComponentPrivilege.h    |   2 -
 core/sql/parser/sqlparser.y                     |   6 +-
 core/sql/parser/vers_libparser.cpp              |   2 -
 core/sql/qms/QRDescriptorStubs.cpp              |   2 -
 core/sql/qms/QmpMain.cpp                        |  10 -
 core/sql/qms/QmpPublish.cpp                     |   8 +-
 core/sql/qms/QmsGroupLattice.cpp                |   4 -
 core/sql/qms/QmsInitializer.cpp                 |  10 -
 core/sql/qms/QmsJoinGraph.cpp                   |  22 +-
 core/sql/qms/QmsLatticeIndex.cpp                |  14 -
 core/sql/qms/QmsMVMemo.cpp                      |  10 -
 core/sql/qms/QmsMain.cpp                        |   2 -
 core/sql/qms/QmsQms.cpp                         |  14 -
 core/sql/qms/QmsRequest.cpp                     |  22 +-
 core/sql/qms/QmsRequest.h                       |   4 +-
 core/sql/qms/QmsSelfJoinHandler.cpp             |   6 -
 core/sql/qms/QmsStubs.cpp                       |   2 -
 core/sql/qmscommon/QRDescriptor.cpp             | 118 ++--
 core/sql/qmscommon/QRDescriptor.h               |  52 +-
 core/sql/qmscommon/QRLogger.cpp                 |   8 +-
 core/sql/qmscommon/QRLogger.h                   |   2 -
 core/sql/qmscommon/QRQueries.h                  |   2 -
 core/sql/qmscommon/QRQueriesImpl.cpp            |  16 +-
 core/sql/qmscommon/QueryRewriteServer.cpp       |  44 +-
 core/sql/qmscommon/Range.cpp                    |  20 -
 core/sql/qmscommon/XMLUtil.h                    |  14 +-
 core/sql/qmscommon/vers_libqmscommon.cpp        |   2 -
 core/sql/refresh/RuAuditRefreshTaskExecutor.h   |   2 -
 core/sql/refresh/RuDeltaDef.cpp                 |  10 -
 core/sql/refresh/RuDupElimGlobals.cpp           |   4 -
 core/sql/refresh/RuDupElimLogScanner.h          |   2 -
 core/sql/refresh/RuDupElimTaskExecutor.cpp      |  10 -
 core/sql/refresh/RuEmpCheckTaskExecutor.cpp     |   8 -
 core/sql/refresh/RuEmpCheckTaskExecutor.h       |   2 -
 core/sql/refresh/RuException.cpp                |   8 -
 core/sql/refresh/RuExecController.cpp           |   8 -
 core/sql/refresh/RuForceOptions.cpp             |   2 -
 core/sql/refresh/RuForceOptions.h               |   4 -
 core/sql/refresh/RuForceOptionsParser.cpp       |   2 -
 core/sql/refresh/RuForceOptionsParser.h         |   2 -
 core/sql/refresh/RuLockEquivSetTaskExecutor.h   |   4 -
 core/sql/refresh/RuLogCleanupTaskExecutor.cpp   |   6 -
 core/sql/refresh/RuLogCleanupTaskExecutor.h     |   4 -
 core/sql/refresh/RuMVEquivSetBuilder.cpp        |   2 -
 core/sql/refresh/RuMVEquivSetBuilder.h          |   2 -
 .../refresh/RuMultiTxnRefreshTaskExecutor.cpp   |  14 -
 core/sql/refresh/RuOptions.cpp                  |   6 -
 core/sql/refresh/RuRcReleaseTaskExecutor.h      |   2 -
 core/sql/refresh/RuRefreshSQLComposer.cpp       |  14 -
 core/sql/refresh/RuRefreshTaskExecutor.cpp      |  24 -
 core/sql/refresh/RuSQLStatementContainer.cpp    |   8 -
 .../sql/refresh/RuSimpleRefreshTaskExecutor.cpp |  12 -
 core/sql/refresh/RuTableSyncTaskExecutor.h      |   2 -
 core/sql/refresh/RuTask.cpp                     |   6 -
 core/sql/refresh/RuTaskExecutor.cpp             |  10 -
 core/sql/refresh/RuTaskExecutor.h               |   2 -
 core/sql/refresh/RuTaskServerExecControler.cpp  |   2 -
 core/sql/refresh/RuTbl.cpp                      |   2 -
 core/sql/refresh/RuTestTaskExecutor.cpp         |   2 -
 core/sql/refresh/RuTestTaskExecutor.h           |   2 -
 core/sql/refresh/RuUnAuditRefreshTaskExecutor.h |   2 -
 core/sql/runtimestats/RtsStubs.cpp              |   2 -
 core/sql/runtimestats/sscpipc.cpp               |   2 -
 core/sql/smdio/vers_libsmdio.cpp                |   2 -
 core/sql/sort/DiskPool_sq.h                     |   2 -
 core/sql/sort/ScratchFileConnection.h           |   2 -
 core/sql/sort/SortUtil.cpp                      |  15 -
 core/sql/sort/Statistics.cpp                    |   2 -
 core/sql/sort/TourTree.cpp                      |   2 -
 core/sql/sort/scratchfileconnection.cpp         |   2 -
 core/sql/sort/vers_libsort.cpp                  |   2 -
 core/sql/sqlcomp/CmpDescribe.cpp                |   2 -
 core/sql/sqlcomp/CmpMain.cpp                    |   6 +-
 core/sql/sqlcomp/CmpMain.h                      |   6 +-
 core/sql/sqlcomp/DefaultValidator.cpp           |   4 -
 core/sql/sqlcomp/NADefaults.h                   |   4 -
 core/sql/sqlcomp/NewDel.cpp                     |   2 -
 core/sql/sqlcomp/QCache.cpp                     |   2 -
 core/sql/sqlcomp/nadefaults.cpp                 |   4 -
 core/sql/sqlcomp/vers_libsqlcomp.cpp            |   2 -
 core/sql/sqlmxevents/logmxevent_sq.cpp          |   7 -
 core/sql/udrserv/UdrAbortCallBack.cpp           |   2 -
 core/sql/udrserv/UdrDebug.cpp                   |   2 -
 core/sql/udrserv/UdrFFDC.cpp                    |   2 -
 core/sql/udrserv/UdrImplLmExtFunc.cpp           |   2 -
 core/sql/udrserv/UdrRSProcess.cpp               |   8 -
 core/sql/udrserv/UdrResultSet.cpp               |   6 -
 core/sql/udrserv/spinfo.cpp                     |   2 -
 core/sql/udrserv/spinfoCallback.cpp             |   6 -
 core/sql/udrserv/udrglobals.cpp                 |   2 -
 core/sql/udrserv/udrload.cpp                    |   2 -
 core/sql/udrserv/udrserv.cpp                    |  10 -
 core/sql/udrserv/udrunload.cpp                  |   4 -
 core/sql/udrserv/udrutil.cpp                    |   2 -
 core/sql/ustat/hs_cli.cpp                       |  22 -
 core/sql/ustat/hs_cli.h                         |   2 -
 core/sql/ustat/hs_globals.cpp                   |  50 +-
 core/sql/ustat/hs_la.cpp                        |  11 +-
 core/sql/ustat/hs_log.cpp                       |   4 +-
 core/sql/ustat/hs_parser.cpp                    |   8 -
 core/sql/ustat/hs_read.cpp                      |  24 +-
 core/sql/ustat/hs_update.cpp                    |   4 -
 core/sql/ustat/hs_util.cpp                      |  12 -
 core/sql/ustat/hs_util.h                        |   4 -
 core/sql/ustat/vers_libustat.cpp                |   2 -
 340 files changed, 2054 insertions(+), 3616 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/cli/Cli.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/comexe/ComTdb.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/comexe/ComTdbExeUtil.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/comexe/ComTdbMj.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/comexe/ComTdbSendBottom.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/comexe/ComTdbSendTop.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/comexe/ComTdbSequence.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/comexe/ComTdbSplitBottom.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/comexe/ComTdbSplitTop.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/comexe/ComTdbUnPackRows.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/comexe/ComTdbUnion.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/common/IpcGuardian.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/common/str.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/executor/ExExeUtilGet.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/exp/ExpPCode.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/exp/exp_clause.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/exp/exp_datetime.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/exp/exp_expr.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/optimizer/BindItemExpr.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/optimizer/CmpProcess.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/sort/SortUtil.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84a21ddf/core/sql/sqlcomp/CmpDescribe.cpp
----------------------------------------------------------------------


[02/13] incubator-trafodion git commit: [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/43c312df/core/sql/regress/core/EXPECTEDRTS
----------------------------------------------------------------------
diff --git a/core/sql/regress/core/EXPECTEDRTS b/core/sql/regress/core/EXPECTEDRTS
index a12f581..a975e8b 100644
--- a/core/sql/regress/core/EXPECTEDRTS
+++ b/core/sql/regress/core/EXPECTEDRTS
@@ -56,10 +56,10 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 --- SQL operation complete.
 >>log LOGRTS;
 >>get statistics for qid current ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_302_S1
-Compile Start Time       2017/07/17 04:57:16.975498
-Compile End Time         2017/07/17 04:57:17.007581
-Compile Elapsed Time                 0:00:00.032083
+Qid                      MXID11000031882212373144360231001000000000206U3333300_303_S1
+Compile Start Time       2017/09/26 00:06:16.558838
+Compile End Time         2017/09/26 00:06:16.588403
+Compile Elapsed Time                 0:00:00.029565
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -98,11 +98,11 @@ Stats Collection Type    ACCUMULATED_STATS
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_302_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_302_S1
-Compile Start Time       2017/07/17 04:57:16.975498
-Compile End Time         2017/07/17 04:57:17.007581
-Compile Elapsed Time                 0:00:00.032083
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_303_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_303_S1
+Compile Start Time       2017/09/26 00:06:16.558838
+Compile End Time         2017/09/26 00:06:16.588403
+Compile Elapsed Time                 0:00:00.029565
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -137,11 +137,11 @@ Avg. Execute Time        0.000000 secs
 Stats Collection Type    ACCUMULATED_STATS
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_302_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_302_S1
-Compile Start Time       2017/07/17 04:57:16.975498
-Compile End Time         2017/07/17 04:57:17.007581
-Compile Elapsed Time                 0:00:00.032083
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_303_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_303_S1
+Compile Start Time       2017/09/26 00:06:16.558838
+Compile End Time         2017/09/26 00:06:16.588403
+Compile Elapsed Time                 0:00:00.029565
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -178,10 +178,10 @@ Stats Collection Type    ACCUMULATED_STATS
 --- SQL operation complete.
 >>log;
 >>display statistics for qid current;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_302_S1
-Compile Start Time       2017/07/17 04:57:16.975498
-Compile End Time         2017/07/17 04:57:17.007581
-Compile Elapsed Time                 0:00:00.032083
+Qid                      MXID11000031882212373144360231001000000000206U3333300_303_S1
+Compile Start Time       2017/09/26 00:06:16.558838
+Compile End Time         2017/09/26 00:06:16.588403
+Compile Elapsed Time                 0:00:00.029565
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -217,10 +217,10 @@ Stats Collection Type    ACCUMULATED_STATS
 
 --- SQL operation complete.
 >>get statistics for qid current ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_302_S1
-Compile Start Time       2017/07/17 04:57:16.975498
-Compile End Time         2017/07/17 04:57:17.007581
-Compile Elapsed Time                 0:00:00.032083
+Qid                      MXID11000031882212373144360231001000000000206U3333300_303_S1
+Compile Start Time       2017/09/26 00:06:16.558838
+Compile End Time         2017/09/26 00:06:16.588403
+Compile Elapsed Time                 0:00:00.029565
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -260,24 +260,24 @@ Stats Collection Type    ACCUMULATED_STATS
 D          
 -----------
 
-         12
          11
          21
          22
+         12
 
 --- 4 row(s) selected.
 >>log;
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_302_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_302_S1
-Compile Start Time       2017/07/17 04:57:16.975498
-Compile End Time         2017/07/17 04:57:17.007581
-Compile Elapsed Time                 0:00:00.032083
-Execute Start Time       2017/07/17 04:57:23.613254
-Execute End Time         2017/07/17 04:57:26.843039
-Execute Elapsed Time                 0:00:03.229785
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_303_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_303_S1
+Compile Start Time       2017/09/26 00:06:16.558838
+Compile End Time         2017/09/26 00:06:16.588403
+Compile Elapsed Time                 0:00:00.029565
+Execute Start Time       2017/09/26 00:06:23.683457
+Execute End Time         2017/09/26 00:06:27.513095
+Execute Elapsed Time                 0:00:03.829638
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -295,7 +295,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:26.841272
+First Row Returned Time  2017/09/26 00:06:27.511111
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -303,28 +303,28 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        3.229785 secs
-Max. Execute Time        3.229785 secs
-Avg. Execute Time        3.229785 secs
+Min. Execute Time        3.829638 secs
+Max. Execute Time        3.829638 secs
+Avg. Execute Time        3.829638 secs
 Stats Collection Type    ACCUMULATED_STATS
 Accessed Rows            4
 Used Rows                4
 SE IOs                   4
 SE IO Bytes              176
-SE IO MAX Time           689,510
-SQL Process Busy Time    4,385,817
+SE IO MAX Time           789,718
+SQL Process Busy Time    5,000,157
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       10,471                    KB
-SQL Heap Used            80                        KB
-SQL Heap WM              67                        KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       10,471 KB
+SQL Heap Used            80 KB
+SQL Heap WM              67 KB
 Processes Created        2
-Process Create Time      141,744
+Process Create Time      161,427
 Request Message Count    26
-Request Message Bytes    39,392
-Reply Message Count      15
-Reply Message Bytes      38,792
+Request Message Bytes    39,408
+Reply Message Count      14
+Reply Message Bytes      32,280
 BMO Space Buffer Size    0
 BMO Space Buffer Count   0
 BMO Interim Row Count    0
@@ -337,14 +337,14 @@ Scr. IO Max Time         0
 Sort TopN                -1
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_302_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_302_S1
-Compile Start Time       2017/07/17 04:57:16.975498
-Compile End Time         2017/07/17 04:57:17.007581
-Compile Elapsed Time                 0:00:00.032083
-Execute Start Time       2017/07/17 04:57:23.613254
-Execute End Time         2017/07/17 04:57:26.843039
-Execute Elapsed Time                 0:00:03.229785
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_303_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_303_S1
+Compile Start Time       2017/09/26 00:06:16.558838
+Compile End Time         2017/09/26 00:06:16.588403
+Compile Elapsed Time                 0:00:00.029565
+Execute Start Time       2017/09/26 00:06:23.683457
+Execute End Time         2017/09/26 00:06:27.513095
+Execute Elapsed Time                 0:00:03.829638
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -362,7 +362,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:26.841272
+First Row Returned Time  2017/09/26 00:06:27.511111
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -370,28 +370,28 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        3.229785 secs
-Max. Execute Time        3.229785 secs
-Avg. Execute Time        3.229785 secs
+Min. Execute Time        3.829638 secs
+Max. Execute Time        3.829638 secs
+Avg. Execute Time        3.829638 secs
 Stats Collection Type    ACCUMULATED_STATS
 Accessed Rows            4
 Used Rows                4
 SE IOs                   4
 SE IO Bytes              176
-SE IO MAX Time           689,510
-SQL Process Busy Time    4,385,817
+SE IO MAX Time           789,718
+SQL Process Busy Time    5,000,157
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       10,471                    KB
-SQL Heap Used            80                        KB
-SQL Heap WM              67                        KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       10,471 KB
+SQL Heap Used            80 KB
+SQL Heap WM              67 KB
 Processes Created        2
-Process Create Time      141,744
+Process Create Time      161,427
 Request Message Count    26
-Request Message Bytes    39,392
-Reply Message Count      15
-Reply Message Bytes      38,792
+Request Message Bytes    39,408
+Reply Message Count      14
+Reply Message Bytes      32,280
 BMO Space Buffer Size    0
 BMO Space Buffer Count   0
 BMO Interim Row Count    0
@@ -406,13 +406,13 @@ Sort TopN                -1
 --- SQL operation complete.
 >>log;
 >>display statistics for qid current;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_302_S1
-Compile Start Time       2017/07/17 04:57:16.975498
-Compile End Time         2017/07/17 04:57:17.007581
-Compile Elapsed Time                 0:00:00.032083
-Execute Start Time       2017/07/17 04:57:23.613254
-Execute End Time         2017/07/17 04:57:26.843039
-Execute Elapsed Time                 0:00:03.229785
+Qid                      MXID11000031882212373144360231001000000000206U3333300_303_S1
+Compile Start Time       2017/09/26 00:06:16.558838
+Compile End Time         2017/09/26 00:06:16.588403
+Compile Elapsed Time                 0:00:00.029565
+Execute Start Time       2017/09/26 00:06:23.683457
+Execute End Time         2017/09/26 00:06:27.513095
+Execute Elapsed Time                 0:00:03.829638
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -430,7 +430,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:26.841272
+First Row Returned Time  2017/09/26 00:06:27.511111
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -438,28 +438,28 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        3.229785 secs
-Max. Execute Time        3.229785 secs
-Avg. Execute Time        3.229785 secs
+Min. Execute Time        3.829638 secs
+Max. Execute Time        3.829638 secs
+Avg. Execute Time        3.829638 secs
 Stats Collection Type    ACCUMULATED_STATS
 Accessed Rows            4
 Used Rows                4
 SE IOs                   4
 SE IO Bytes              176
-SE IO MAX Time           689,510
-SQL Process Busy Time    4,385,817
+SE IO MAX Time           789,718
+SQL Process Busy Time    5,000,157
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       10,471                    KB
-SQL Heap Used            80                        KB
-SQL Heap WM              67                        KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       10,471 KB
+SQL Heap Used            80 KB
+SQL Heap WM              67 KB
 Processes Created        2
-Process Create Time      141,744
+Process Create Time      161,427
 Request Message Count    26
-Request Message Bytes    39,392
-Reply Message Count      15
-Reply Message Bytes      38,792
+Request Message Bytes    39,408
+Reply Message Count      14
+Reply Message Bytes      32,280
 BMO Space Buffer Size    0
 BMO Space Buffer Count   0
 BMO Interim Row Count    0
@@ -473,13 +473,13 @@ Sort TopN                -1
 
 --- SQL operation complete.
 >>get statistics for qid current ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_302_S1
-Compile Start Time       2017/07/17 04:57:16.975498
-Compile End Time         2017/07/17 04:57:17.007581
-Compile Elapsed Time                 0:00:00.032083
-Execute Start Time       2017/07/17 04:57:23.613254
-Execute End Time         2017/07/17 04:57:26.843039
-Execute Elapsed Time                 0:00:03.229785
+Qid                      MXID11000031882212373144360231001000000000206U3333300_303_S1
+Compile Start Time       2017/09/26 00:06:16.558838
+Compile End Time         2017/09/26 00:06:16.588403
+Compile Elapsed Time                 0:00:00.029565
+Execute Start Time       2017/09/26 00:06:23.683457
+Execute End Time         2017/09/26 00:06:27.513095
+Execute Elapsed Time                 0:00:03.829638
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -497,7 +497,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:26.841272
+First Row Returned Time  2017/09/26 00:06:27.511111
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -505,28 +505,28 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        3.229785 secs
-Max. Execute Time        3.229785 secs
-Avg. Execute Time        3.229785 secs
+Min. Execute Time        3.829638 secs
+Max. Execute Time        3.829638 secs
+Avg. Execute Time        3.829638 secs
 Stats Collection Type    ACCUMULATED_STATS
 Accessed Rows            4
 Used Rows                4
 SE IOs                   4
 SE IO Bytes              176
-SE IO MAX Time           689,510
-SQL Process Busy Time    4,385,817
+SE IO MAX Time           789,718
+SQL Process Busy Time    5,000,157
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       10,471                    KB
-SQL Heap Used            80                        KB
-SQL Heap WM              67                        KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       10,471 KB
+SQL Heap Used            80 KB
+SQL Heap WM              67 KB
 Processes Created        2
-Process Create Time      141,744
+Process Create Time      161,427
 Request Message Count    26
-Request Message Bytes    39,392
-Reply Message Count      15
-Reply Message Bytes      38,792
+Request Message Bytes    39,408
+Reply Message Count      14
+Reply Message Bytes      32,280
 BMO Space Buffer Size    0
 BMO Space Buffer Count   0
 BMO Interim Row Count    0
@@ -546,25 +546,25 @@ Sort TopN                -1
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_302_S1 ;
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_303_S1 ;
 
-*** ERROR[8923] The given Query Id MXID11000024709212367027407408000000000000206U3333300_302_S1 is not found.
+*** ERROR[8923] The given Query Id MXID11000031882212373144360231001000000000206U3333300_303_S1 is not found.
 
 --- SQL operation failed with errors.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_302_S1 ;
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_303_S1 ;
 
-*** ERROR[8923] The given Query Id MXID11000024709212367027407408000000000000206U3333300_302_S1 is not found.
+*** ERROR[8923] The given Query Id MXID11000031882212373144360231001000000000206U3333300_303_S1 is not found.
 
 --- SQL operation failed with errors.
 >>log;
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_311_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_311_S1
-Compile Start Time       2017/07/17 04:57:33.096199
-Compile End Time         2017/07/17 04:57:33.096764
-Compile Elapsed Time                 0:00:00.000565
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_312_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_312_S1
+Compile Start Time       2017/09/26 00:06:31.359957
+Compile End Time         2017/09/26 00:06:31.360855
+Compile Elapsed Time                 0:00:00.000898
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -599,11 +599,11 @@ Avg. Execute Time        0.000000 secs
 Stats Collection Type    ACCUMULATED_STATS
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_311_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_311_S1
-Compile Start Time       2017/07/17 04:57:33.096199
-Compile End Time         2017/07/17 04:57:33.096764
-Compile Elapsed Time                 0:00:00.000565
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_312_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_312_S1
+Compile Start Time       2017/09/26 00:06:31.359957
+Compile End Time         2017/09/26 00:06:31.360855
+Compile Elapsed Time                 0:00:00.000898
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -640,10 +640,10 @@ Stats Collection Type    ACCUMULATED_STATS
 --- SQL operation complete.
 >>log;
 >>display statistics for qid current;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_311_S1
-Compile Start Time       2017/07/17 04:57:33.096199
-Compile End Time         2017/07/17 04:57:33.096764
-Compile Elapsed Time                 0:00:00.000565
+Qid                      MXID11000031882212373144360231001000000000206U3333300_312_S1
+Compile Start Time       2017/09/26 00:06:31.359957
+Compile End Time         2017/09/26 00:06:31.360855
+Compile Elapsed Time                 0:00:00.000898
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -679,10 +679,10 @@ Stats Collection Type    ACCUMULATED_STATS
 
 --- SQL operation complete.
 >>get statistics for qid current ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_311_S1
-Compile Start Time       2017/07/17 04:57:33.096199
-Compile End Time         2017/07/17 04:57:33.096764
-Compile Elapsed Time                 0:00:00.000565
+Qid                      MXID11000031882212373144360231001000000000206U3333300_312_S1
+Compile Start Time       2017/09/26 00:06:31.359957
+Compile End Time         2017/09/26 00:06:31.360855
+Compile Elapsed Time                 0:00:00.000898
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -730,10 +730,10 @@ Stats Collection Type    ACCUMULATED_STATS
 --- SQL command prepared.
 >>log;
 >>get statistics for qid current ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -772,11 +772,11 @@ Stats Collection Type    PERTABLE_STATS
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_316_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_317_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -811,11 +811,11 @@ Avg. Execute Time        0.000000 secs
 Stats Collection Type    PERTABLE_STATS
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_316_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_317_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -854,11 +854,11 @@ Stats Collection Type    PERTABLE_STATS
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_316_S1 ACCUMULATED;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_317_S1 ACCUMULATED;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -893,11 +893,11 @@ Avg. Execute Time        0.000000 secs
 Stats Collection Type    PERTABLE_STATS
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_316_S1 ACCUMULATED;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_317_S1 ACCUMULATED;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -934,10 +934,10 @@ Stats Collection Type    PERTABLE_STATS
 --- SQL operation complete.
 >>log;
 >>display statistics for qid current;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -973,10 +973,10 @@ Stats Collection Type    PERTABLE_STATS
 
 --- SQL operation complete.
 >>get statistics for qid current ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -1012,10 +1012,10 @@ Stats Collection Type    PERTABLE_STATS
 
 --- SQL operation complete.
 >>display statistics for qid current accumulated ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -1051,10 +1051,10 @@ Stats Collection Type    PERTABLE_STATS
 
 --- SQL operation complete.
 >>get statistics for qid current accumulated ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -1104,14 +1104,14 @@ D
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_316_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
-Execute Start Time       2017/07/17 04:57:49.683630
-Execute End Time         2017/07/17 04:57:49.695340
-Execute Elapsed Time                 0:00:00.011710
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_317_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
+Execute Start Time       2017/09/26 00:06:46.574348
+Execute End Time         2017/09/26 00:06:46.638206
+Execute Elapsed Time                 0:00:00.063858
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -1129,7 +1129,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:49.693689
+First Row Returned Time  2017/09/26 00:06:46.636794
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -1137,21 +1137,21 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.011710 secs
-Max. Execute Time        0.011710 secs
-Avg. Execute Time        0.011710 secs
+Min. Execute Time        0.063858 secs
+Max. Execute Time        0.063858 secs
+Avg. Execute Time        0.063858 secs
 Stats Collection Type    PERTABLE_STATS
-SQL Process Busy Time    5,776
+SQL Process Busy Time    16,866
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,338                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,338 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    27
-Request Message Bytes    39,552
+Request Message Bytes    39,568
 Reply Message Count      15
 Reply Message Bytes      39,208
 BMO Space Buffer Size    0
@@ -1165,20 +1165,20 @@ Scr. Write Count         0
 Scr. IO Max Time         0
 Sort TopN                -1
 
-   Id       DOP          Table Name
+   Id       DOP Table Name
   EstRowsAccess       ActRowsAccess    EstRowsUsed         ActRowsUsed              SE_IOs        SE_IO_KBytes       SE_IO_SumTime       SE_IO_MaxTime
-    1         2   TRAFODION.SCH.TSTAT
-              0                   4            100                   4                   4                   0               5,738               2,914
+    1         2 TRAFODION.SCH.TSTAT
+              0                   4            100                   4                   4                   0              53,929              46,340
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_316_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
-Execute Start Time       2017/07/17 04:57:49.683630
-Execute End Time         2017/07/17 04:57:49.695340
-Execute Elapsed Time                 0:00:00.011710
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_317_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
+Execute Start Time       2017/09/26 00:06:46.574348
+Execute End Time         2017/09/26 00:06:46.638206
+Execute Elapsed Time                 0:00:00.063858
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -1196,7 +1196,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:49.693689
+First Row Returned Time  2017/09/26 00:06:46.636794
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -1204,21 +1204,21 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.011710 secs
-Max. Execute Time        0.011710 secs
-Avg. Execute Time        0.011710 secs
+Min. Execute Time        0.063858 secs
+Max. Execute Time        0.063858 secs
+Avg. Execute Time        0.063858 secs
 Stats Collection Type    PERTABLE_STATS
-SQL Process Busy Time    5,776
+SQL Process Busy Time    16,866
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,338                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,338 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    27
-Request Message Bytes    39,552
+Request Message Bytes    39,568
 Reply Message Count      15
 Reply Message Bytes      39,208
 BMO Space Buffer Size    0
@@ -1232,24 +1232,24 @@ Scr. Write Count         0
 Scr. IO Max Time         0
 Sort TopN                -1
 
-   Id       DOP          Table Name
+   Id       DOP Table Name
   EstRowsAccess       ActRowsAccess    EstRowsUsed         ActRowsUsed              SE_IOs        SE_IO_KBytes       SE_IO_SumTime       SE_IO_MaxTime
-    1         2   TRAFODION.SCH.TSTAT
-              0                   4            100                   4                   4                   0               5,738               2,914
+    1         2 TRAFODION.SCH.TSTAT
+              0                   4            100                   4                   4                   0              53,929              46,340
 
 --- SQL operation complete.
 >>log;
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_316_S1 ACCUMULATED;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
-Execute Start Time       2017/07/17 04:57:49.683630
-Execute End Time         2017/07/17 04:57:49.695340
-Execute Elapsed Time                 0:00:00.011710
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_317_S1 ACCUMULATED;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
+Execute Start Time       2017/09/26 00:06:46.574348
+Execute End Time         2017/09/26 00:06:46.638206
+Execute Elapsed Time                 0:00:00.063858
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -1267,7 +1267,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:49.693689
+First Row Returned Time  2017/09/26 00:06:46.636794
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -1275,26 +1275,26 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.011710 secs
-Max. Execute Time        0.011710 secs
-Avg. Execute Time        0.011710 secs
+Min. Execute Time        0.063858 secs
+Max. Execute Time        0.063858 secs
+Avg. Execute Time        0.063858 secs
 Stats Collection Type    PERTABLE_STATS
 Accessed Rows            4
 Used Rows                4
 SE IOs                   4
 SE IO Bytes              176
-SE IO MAX Time           2,914
-SQL Process Busy Time    5,776
+SE IO MAX Time           46,340
+SQL Process Busy Time    16,866
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,338                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,338 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    27
-Request Message Bytes    39,552
+Request Message Bytes    39,568
 Reply Message Count      15
 Reply Message Bytes      39,208
 BMO Space Buffer Size    0
@@ -1309,14 +1309,14 @@ Scr. IO Max Time         0
 Sort TopN                -1
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_316_S1 ACCUMULATED;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
-Execute Start Time       2017/07/17 04:57:49.683630
-Execute End Time         2017/07/17 04:57:49.695340
-Execute Elapsed Time                 0:00:00.011710
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_317_S1 ACCUMULATED;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
+Execute Start Time       2017/09/26 00:06:46.574348
+Execute End Time         2017/09/26 00:06:46.638206
+Execute Elapsed Time                 0:00:00.063858
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -1334,7 +1334,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:49.693689
+First Row Returned Time  2017/09/26 00:06:46.636794
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -1342,26 +1342,26 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.011710 secs
-Max. Execute Time        0.011710 secs
-Avg. Execute Time        0.011710 secs
+Min. Execute Time        0.063858 secs
+Max. Execute Time        0.063858 secs
+Avg. Execute Time        0.063858 secs
 Stats Collection Type    PERTABLE_STATS
 Accessed Rows            4
 Used Rows                4
 SE IOs                   4
 SE IO Bytes              176
-SE IO MAX Time           2,914
-SQL Process Busy Time    5,776
+SE IO MAX Time           46,340
+SQL Process Busy Time    16,866
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,338                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,338 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    27
-Request Message Bytes    39,552
+Request Message Bytes    39,568
 Reply Message Count      15
 Reply Message Bytes      39,208
 BMO Space Buffer Size    0
@@ -1378,13 +1378,13 @@ Sort TopN                -1
 --- SQL operation complete.
 >>log;
 >>display statistics for qid current;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
-Execute Start Time       2017/07/17 04:57:49.683630
-Execute End Time         2017/07/17 04:57:49.695340
-Execute Elapsed Time                 0:00:00.011710
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
+Execute Start Time       2017/09/26 00:06:46.574348
+Execute End Time         2017/09/26 00:06:46.638206
+Execute Elapsed Time                 0:00:00.063858
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -1402,7 +1402,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:49.693689
+First Row Returned Time  2017/09/26 00:06:46.636794
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -1410,21 +1410,21 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.011710 secs
-Max. Execute Time        0.011710 secs
-Avg. Execute Time        0.011710 secs
+Min. Execute Time        0.063858 secs
+Max. Execute Time        0.063858 secs
+Avg. Execute Time        0.063858 secs
 Stats Collection Type    PERTABLE_STATS
-SQL Process Busy Time    5,776
+SQL Process Busy Time    16,866
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,338                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,338 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    27
-Request Message Bytes    39,552
+Request Message Bytes    39,568
 Reply Message Count      15
 Reply Message Bytes      39,208
 BMO Space Buffer Size    0
@@ -1438,20 +1438,20 @@ Scr. Write Count         0
 Scr. IO Max Time         0
 Sort TopN                -1
 
-   Id       DOP          Table Name
+   Id       DOP Table Name
   EstRowsAccess       ActRowsAccess    EstRowsUsed         ActRowsUsed              SE_IOs        SE_IO_KBytes       SE_IO_SumTime       SE_IO_MaxTime
-    1         2   TRAFODION.SCH.TSTAT
-              0                   4            100                   4                   4                   0               5,738               2,914
+    1         2 TRAFODION.SCH.TSTAT
+              0                   4            100                   4                   4                   0              53,929              46,340
 
 --- SQL operation complete.
 >>get statistics for qid current ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
-Execute Start Time       2017/07/17 04:57:49.683630
-Execute End Time         2017/07/17 04:57:49.695340
-Execute Elapsed Time                 0:00:00.011710
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
+Execute Start Time       2017/09/26 00:06:46.574348
+Execute End Time         2017/09/26 00:06:46.638206
+Execute Elapsed Time                 0:00:00.063858
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -1469,7 +1469,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:49.693689
+First Row Returned Time  2017/09/26 00:06:46.636794
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -1477,21 +1477,21 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.011710 secs
-Max. Execute Time        0.011710 secs
-Avg. Execute Time        0.011710 secs
+Min. Execute Time        0.063858 secs
+Max. Execute Time        0.063858 secs
+Avg. Execute Time        0.063858 secs
 Stats Collection Type    PERTABLE_STATS
-SQL Process Busy Time    5,776
+SQL Process Busy Time    16,866
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,338                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,338 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    27
-Request Message Bytes    39,552
+Request Message Bytes    39,568
 Reply Message Count      15
 Reply Message Bytes      39,208
 BMO Space Buffer Size    0
@@ -1505,20 +1505,20 @@ Scr. Write Count         0
 Scr. IO Max Time         0
 Sort TopN                -1
 
-   Id       DOP          Table Name
+   Id       DOP Table Name
   EstRowsAccess       ActRowsAccess    EstRowsUsed         ActRowsUsed              SE_IOs        SE_IO_KBytes       SE_IO_SumTime       SE_IO_MaxTime
-    1         2   TRAFODION.SCH.TSTAT
-              0                   4            100                   4                   4                   0               5,738               2,914
+    1         2 TRAFODION.SCH.TSTAT
+              0                   4            100                   4                   4                   0              53,929              46,340
 
 --- SQL operation complete.
 >>display statistics for qid current accumulated;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
-Execute Start Time       2017/07/17 04:57:49.683630
-Execute End Time         2017/07/17 04:57:49.695340
-Execute Elapsed Time                 0:00:00.011710
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
+Execute Start Time       2017/09/26 00:06:46.574348
+Execute End Time         2017/09/26 00:06:46.638206
+Execute Elapsed Time                 0:00:00.063858
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -1536,7 +1536,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:49.693689
+First Row Returned Time  2017/09/26 00:06:46.636794
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -1544,26 +1544,26 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.011710 secs
-Max. Execute Time        0.011710 secs
-Avg. Execute Time        0.011710 secs
+Min. Execute Time        0.063858 secs
+Max. Execute Time        0.063858 secs
+Avg. Execute Time        0.063858 secs
 Stats Collection Type    PERTABLE_STATS
 Accessed Rows            4
 Used Rows                4
 SE IOs                   4
 SE IO Bytes              176
-SE IO MAX Time           2,914
-SQL Process Busy Time    5,776
+SE IO MAX Time           46,340
+SQL Process Busy Time    16,866
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,338                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,338 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    27
-Request Message Bytes    39,552
+Request Message Bytes    39,568
 Reply Message Count      15
 Reply Message Bytes      39,208
 BMO Space Buffer Size    0
@@ -1579,13 +1579,13 @@ Sort TopN                -1
 
 --- SQL operation complete.
 >>get statistics for qid current accumulated;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_316_S1
-Compile Start Time       2017/07/17 04:57:39.632898
-Compile End Time         2017/07/17 04:57:39.665467
-Compile Elapsed Time                 0:00:00.032569
-Execute Start Time       2017/07/17 04:57:49.683630
-Execute End Time         2017/07/17 04:57:49.695340
-Execute Elapsed Time                 0:00:00.011710
+Qid                      MXID11000031882212373144360231001000000000206U3333300_317_S1
+Compile Start Time       2017/09/26 00:06:38.742687
+Compile End Time         2017/09/26 00:06:38.781655
+Compile Elapsed Time                 0:00:00.038968
+Execute Start Time       2017/09/26 00:06:46.574348
+Execute End Time         2017/09/26 00:06:46.638206
+Execute Elapsed Time                 0:00:00.063858
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -1603,7 +1603,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:57:49.693689
+First Row Returned Time  2017/09/26 00:06:46.636794
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -1611,26 +1611,26 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.011710 secs
-Max. Execute Time        0.011710 secs
-Avg. Execute Time        0.011710 secs
+Min. Execute Time        0.063858 secs
+Max. Execute Time        0.063858 secs
+Avg. Execute Time        0.063858 secs
 Stats Collection Type    PERTABLE_STATS
 Accessed Rows            4
 Used Rows                4
 SE IOs                   4
 SE IO Bytes              176
-SE IO MAX Time           2,914
-SQL Process Busy Time    5,776
+SE IO MAX Time           46,340
+SQL Process Busy Time    16,866
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,338                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,338 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    27
-Request Message Bytes    39,552
+Request Message Bytes    39,568
 Reply Message Count      15
 Reply Message Bytes      39,208
 BMO Space Buffer Size    0
@@ -1647,7 +1647,7 @@ Sort TopN                -1
 --- SQL operation complete.
 >>log;
 >>obey PQIDOUT;
->>SET SESSION DEFAULT PARENT_QID 'MXID11000024709212367027407408000000000000206U3333300_316_S1';
+>>SET SESSION DEFAULT PARENT_QID 'MXID11000031882212373144360231001000000000206U3333300_317_S1';
 
 --- SQL operation complete.
 >>prepare s1 from select distinct d from tstat ;
@@ -1657,11 +1657,11 @@ Sort TopN                -1
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_330_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_330_S1
-Compile Start Time       2017/07/17 04:57:56.670883
-Compile End Time         2017/07/17 04:57:56.671315
-Compile Elapsed Time                 0:00:00.000432
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_331_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_331_S1
+Compile Start Time       2017/09/26 00:06:54.034555
+Compile End Time         2017/09/26 00:06:54.035229
+Compile Elapsed Time                 0:00:00.000674
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -1673,7 +1673,7 @@ Query Type               SQL_SELECT_NON_UNIQUE
 Sub Query Type           SQL_STMT_NA
 Estimated Accessed Rows  0
 Estimated Used Rows      0
-Parent Qid               MXID11000024709212367027407408000000000000206U3333300_316_S1
+Parent Qid               MXID11000031882212373144360231001000000000206U3333300_317_S1
 Parent Query System      SAME
 Child Qid                NONE
 Number of SQL Processes  1
@@ -1696,11 +1696,11 @@ Avg. Execute Time        0.000000 secs
 Stats Collection Type    PERTABLE_STATS
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_330_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_330_S1
-Compile Start Time       2017/07/17 04:57:56.670883
-Compile End Time         2017/07/17 04:57:56.671315
-Compile Elapsed Time                 0:00:00.000432
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_331_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_331_S1
+Compile Start Time       2017/09/26 00:06:54.034555
+Compile End Time         2017/09/26 00:06:54.035229
+Compile Elapsed Time                 0:00:00.000674
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -1712,7 +1712,7 @@ Query Type               SQL_SELECT_NON_UNIQUE
 Sub Query Type           SQL_STMT_NA
 Estimated Accessed Rows  0
 Estimated Used Rows      0
-Parent Qid               MXID11000024709212367027407408000000000000206U3333300_316_S1
+Parent Qid               MXID11000031882212373144360231001000000000206U3333300_317_S1
 Parent Query System      SAME
 Child Qid                NONE
 Number of SQL Processes  1
@@ -1746,11 +1746,11 @@ Stats Collection Type    PERTABLE_STATS
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_332_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_332_S1
-Compile Start Time       2017/07/17 04:57:59.906249
-Compile End Time         2017/07/17 04:57:59.906902
-Compile Elapsed Time                 0:00:00.000653
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_333_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_333_S1
+Compile Start Time       2017/09/26 00:06:57.730975
+Compile End Time         2017/09/26 00:06:57.731618
+Compile Elapsed Time                 0:00:00.000643
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -1785,11 +1785,11 @@ Avg. Execute Time        0.000000 secs
 Stats Collection Type    PERTABLE_STATS
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_332_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_332_S1
-Compile Start Time       2017/07/17 04:57:59.906249
-Compile End Time         2017/07/17 04:57:59.906902
-Compile Elapsed Time                 0:00:00.000653
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_333_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_333_S1
+Compile Start Time       2017/09/26 00:06:57.730975
+Compile End Time         2017/09/26 00:06:57.731618
+Compile Elapsed Time                 0:00:00.000643
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -1840,11 +1840,11 @@ Stats Collection Type    PERTABLE_STATS
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_335_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_335_S1
-Compile Start Time       2017/07/17 04:58:06.342753
-Compile End Time         2017/07/17 04:58:06.391558
-Compile Elapsed Time                 0:00:00.048805
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_336_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_336_S1
+Compile Start Time       2017/09/26 00:07:04.432712
+Compile End Time         2017/09/26 00:07:04.478608
+Compile Elapsed Time                 0:00:00.045896
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -1879,11 +1879,11 @@ Avg. Execute Time        0.000000 secs
 Stats Collection Type    OPERATOR_STATS
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_335_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_335_S1
-Compile Start Time       2017/07/17 04:58:06.342753
-Compile End Time         2017/07/17 04:58:06.391558
-Compile Elapsed Time                 0:00:00.048805
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_336_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_336_S1
+Compile Start Time       2017/09/26 00:07:04.432712
+Compile End Time         2017/09/26 00:07:04.478608
+Compile Elapsed Time                 0:00:00.045896
 Execute Start Time       -1
 Execute End Time         -1
 Execute Elapsed Time                 0:00:00.000000
@@ -1934,14 +1934,14 @@ D
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_335_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_335_S1
-Compile Start Time       2017/07/17 04:58:06.342753
-Compile End Time         2017/07/17 04:58:06.391558
-Compile Elapsed Time                 0:00:00.048805
-Execute Start Time       2017/07/17 04:58:09.741408
-Execute End Time         2017/07/17 04:58:09.757985
-Execute Elapsed Time                 0:00:00.016577
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_336_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_336_S1
+Compile Start Time       2017/09/26 00:07:04.432712
+Compile End Time         2017/09/26 00:07:04.478608
+Compile Elapsed Time                 0:00:00.045896
+Execute Start Time       2017/09/26 00:07:11.341441
+Execute End Time         2017/09/26 00:07:11.375178
+Execute Elapsed Time                 0:00:00.033737
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -1959,7 +1959,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:58:09.756320
+First Row Returned Time  2017/09/26 00:07:11.366701
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -1967,34 +1967,34 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.016577 secs
-Max. Execute Time        0.016577 secs
-Avg. Execute Time        0.016577 secs
+Min. Execute Time        0.033737 secs
+Max. Execute Time        0.033737 secs
+Avg. Execute Time        0.033737 secs
 Stats Collection Type    OPERATOR_STATS
 
-LC   RC   Id   PaId ExId Frag TDB Name                 DOP     Dispatches      Oper CPU Time  Est. Records Used  Act. Records Used    Details
+   LC   RC   Id PaId ExId Frag TDB Name                   DOP   Dispatches      Oper CPU Time  Est. Records Used  Act. Records Used    Details
 
-10   .    11   .    5    0    EX_ROOT                  1                5                 10                  0                  4 1694
-9    .    10   11   4    0    EX_SPLIT_TOP             1                5                 10                  2                  4
-8    .    9    10   4    0    EX_SEND_TOP              2               10              1,674                  2                  4
-7    .    8    9    4    2    EX_SEND_BOTTOM           2               17                119                  2                  4
-6    .    7    8    4    2    EX_SPLIT_BOTTOM          2                7                  7                  2                  4 3201
-5    .    6    7    3    2    EX_HASH_GRBY             2                6              2,283                  1                  4 0|0|0
-4    .    5    6    2    2    EX_SPLIT_TOP             2               11                 11                100                  4
-3    .    4    5    2    2    EX_SEND_TOP              4               18                781                100                  4
-2    .    3    4    2    3    EX_SEND_BOTTOM           4               31                154                100                  4
-1    .    2    3    2    3    EX_SPLIT_BOTTOM          2                8                 13                100                  4 3346
-.    .    1    2    1    3    EX_TRAF_KEY_SELECT       2                4              3,179                100                  4 TRAFODION.SCH.TSTAT|4|176
+   10    .   11    .    5    0 EX_ROOT                      1            5                  9                  0                  4 1821
+    9    .   10   11    4    0 EX_SPLIT_TOP                 1            5                 40                  2                  4
+    8    .    9   10    4    0 EX_SEND_TOP                  2           10              1,772                  2                  4
+    7    .    8    9    4    2 EX_SEND_BOTTOM               2           17                190                  2                  4
+    6    .    7    8    4    2 EX_SPLIT_BOTTOM              2            7                 11                  2                  4 6457
+    5    .    6    7    3    2 EX_HASH_GRBY                 2            6              4,263                  1                  4 0|0|0
+    4    .    5    6    2    2 EX_SPLIT_TOP                 2           11                 17                100                  4
+    3    .    4    5    2    2 EX_SEND_TOP                  4           18              1,976                100                  4
+    2    .    3    4    2    3 EX_SEND_BOTTOM               4           24                260                100                  4
+    1    .    2    3    2    3 EX_SPLIT_BOTTOM              2            8                 30                100                  4 6063
+    .    .    1    2    1    3 EX_TRAF_KEY_SELECT           2            4              5,773                100                  4 TRAFODION.SCH.TSTAT|4|176
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_335_S1 ;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_335_S1
-Compile Start Time       2017/07/17 04:58:06.342753
-Compile End Time         2017/07/17 04:58:06.391558
-Compile Elapsed Time                 0:00:00.048805
-Execute Start Time       2017/07/17 04:58:09.741408
-Execute End Time         2017/07/17 04:58:09.757985
-Execute Elapsed Time                 0:00:00.016577
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_336_S1 ;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_336_S1
+Compile Start Time       2017/09/26 00:07:04.432712
+Compile End Time         2017/09/26 00:07:04.478608
+Compile Elapsed Time                 0:00:00.045896
+Execute Start Time       2017/09/26 00:07:11.341441
+Execute End Time         2017/09/26 00:07:11.375178
+Execute Elapsed Time                 0:00:00.033737
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -2012,7 +2012,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:58:09.756320
+First Row Returned Time  2017/09/26 00:07:11.366701
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -2020,38 +2020,38 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.016577 secs
-Max. Execute Time        0.016577 secs
-Avg. Execute Time        0.016577 secs
+Min. Execute Time        0.033737 secs
+Max. Execute Time        0.033737 secs
+Avg. Execute Time        0.033737 secs
 Stats Collection Type    OPERATOR_STATS
 
-LC   RC   Id   PaId ExId Frag TDB Name                 DOP     Dispatches      Oper CPU Time  Est. Records Used  Act. Records Used    Details
+   LC   RC   Id PaId ExId Frag TDB Name                   DOP   Dispatches      Oper CPU Time  Est. Records Used  Act. Records Used    Details
 
-10   .    11   .    5    0    EX_ROOT                  1                5                 10                  0                  4 1694
-9    .    10   11   4    0    EX_SPLIT_TOP             1                5                 10                  2                  4
-8    .    9    10   4    0    EX_SEND_TOP              2               10              1,674                  2                  4
-7    .    8    9    4    2    EX_SEND_BOTTOM           2               17                119                  2                  4
-6    .    7    8    4    2    EX_SPLIT_BOTTOM          2                7                  7                  2                  4 3201
-5    .    6    7    3    2    EX_HASH_GRBY             2                6              2,283                  1                  4 0|0|0
-4    .    5    6    2    2    EX_SPLIT_TOP             2               11                 11                100                  4
-3    .    4    5    2    2    EX_SEND_TOP              4               18                781                100                  4
-2    .    3    4    2    3    EX_SEND_BOTTOM           4               31                154                100                  4
-1    .    2    3    2    3    EX_SPLIT_BOTTOM          2                8                 13                100                  4 3346
-.    .    1    2    1    3    EX_TRAF_KEY_SELECT       2                4              3,179                100                  4 TRAFODION.SCH.TSTAT|4|176
+   10    .   11    .    5    0 EX_ROOT                      1            5                  9                  0                  4 1821
+    9    .   10   11    4    0 EX_SPLIT_TOP                 1            5                 40                  2                  4
+    8    .    9   10    4    0 EX_SEND_TOP                  2           10              1,772                  2                  4
+    7    .    8    9    4    2 EX_SEND_BOTTOM               2           17                190                  2                  4
+    6    .    7    8    4    2 EX_SPLIT_BOTTOM              2            7                 11                  2                  4 6457
+    5    .    6    7    3    2 EX_HASH_GRBY                 2            6              4,263                  1                  4 0|0|0
+    4    .    5    6    2    2 EX_SPLIT_TOP                 2           11                 17                100                  4
+    3    .    4    5    2    2 EX_SEND_TOP                  4           18              1,976                100                  4
+    2    .    3    4    2    3 EX_SEND_BOTTOM               4           24                260                100                  4
+    1    .    2    3    2    3 EX_SPLIT_BOTTOM              2            8                 30                100                  4 6063
+    .    .    1    2    1    3 EX_TRAF_KEY_SELECT           2            4              5,773                100                  4 TRAFODION.SCH.TSTAT|4|176
 
 --- SQL operation complete.
 >>log;
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_335_S1 ACCUMULATED;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_335_S1
-Compile Start Time       2017/07/17 04:58:06.342753
-Compile End Time         2017/07/17 04:58:06.391558
-Compile Elapsed Time                 0:00:00.048805
-Execute Start Time       2017/07/17 04:58:09.741408
-Execute End Time         2017/07/17 04:58:09.757985
-Execute Elapsed Time                 0:00:00.016577
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_336_S1 ACCUMULATED;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_336_S1
+Compile Start Time       2017/09/26 00:07:04.432712
+Compile End Time         2017/09/26 00:07:04.478608
+Compile Elapsed Time                 0:00:00.045896
+Execute Start Time       2017/09/26 00:07:11.341441
+Execute End Time         2017/09/26 00:07:11.375178
+Execute Elapsed Time                 0:00:00.033737
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -2069,7 +2069,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:58:09.756320
+First Row Returned Time  2017/09/26 00:07:11.366701
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -2077,26 +2077,26 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.016577 secs
-Max. Execute Time        0.016577 secs
-Avg. Execute Time        0.016577 secs
+Min. Execute Time        0.033737 secs
+Max. Execute Time        0.033737 secs
+Avg. Execute Time        0.033737 secs
 Stats Collection Type    OPERATOR_STATS
 Accessed Rows            4
 Used Rows                4
 SE IOs                   4
 SE IO Bytes              176
-SE IO MAX Time           5,606
-SQL Process Busy Time    8,241
+SE IO MAX Time           12,577
+SQL Process Busy Time    14,341
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,341                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,341 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    28
-Request Message Bytes    39,712
+Request Message Bytes    39,728
 Reply Message Count      15
 Reply Message Bytes      42,528
 BMO Space Buffer Size    256
@@ -2111,14 +2111,14 @@ Scr. IO Max Time         0
 Sort TopN                -1
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_335_S1 ACCUMULATED;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_335_S1
-Compile Start Time       2017/07/17 04:58:06.342753
-Compile End Time         2017/07/17 04:58:06.391558
-Compile Elapsed Time                 0:00:00.048805
-Execute Start Time       2017/07/17 04:58:09.741408
-Execute End Time         2017/07/17 04:58:09.757985
-Execute Elapsed Time                 0:00:00.016577
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_336_S1 ACCUMULATED;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_336_S1
+Compile Start Time       2017/09/26 00:07:04.432712
+Compile End Time         2017/09/26 00:07:04.478608
+Compile Elapsed Time                 0:00:00.045896
+Execute Start Time       2017/09/26 00:07:11.341441
+Execute End Time         2017/09/26 00:07:11.375178
+Execute Elapsed Time                 0:00:00.033737
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -2136,7 +2136,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:58:09.756320
+First Row Returned Time  2017/09/26 00:07:11.366701
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -2144,26 +2144,26 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.016577 secs
-Max. Execute Time        0.016577 secs
-Avg. Execute Time        0.016577 secs
+Min. Execute Time        0.033737 secs
+Max. Execute Time        0.033737 secs
+Avg. Execute Time        0.033737 secs
 Stats Collection Type    OPERATOR_STATS
 Accessed Rows            4
 Used Rows                4
 SE IOs                   4
 SE IO Bytes              176
-SE IO MAX Time           5,606
-SQL Process Busy Time    8,241
+SE IO MAX Time           12,577
+SQL Process Busy Time    14,341
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,341                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,341 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    28
-Request Message Bytes    39,712
+Request Message Bytes    39,728
 Reply Message Count      15
 Reply Message Bytes      42,528
 BMO Space Buffer Size    256
@@ -2182,14 +2182,14 @@ Sort TopN                -1
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_335_S1 PERTABLE;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_335_S1
-Compile Start Time       2017/07/17 04:58:06.342753
-Compile End Time         2017/07/17 04:58:06.391558
-Compile Elapsed Time                 0:00:00.048805
-Execute Start Time       2017/07/17 04:58:09.741408
-Execute End Time         2017/07/17 04:58:09.757985
-Execute Elapsed Time                 0:00:00.016577
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_336_S1 PERTABLE;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_336_S1
+Compile Start Time       2017/09/26 00:07:04.432712
+Compile End Time         2017/09/26 00:07:04.478608
+Compile Elapsed Time                 0:00:00.045896
+Execute Start Time       2017/09/26 00:07:11.341441
+Execute End Time         2017/09/26 00:07:11.375178
+Execute Elapsed Time                 0:00:00.033737
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -2207,7 +2207,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:58:09.756320
+First Row Returned Time  2017/09/26 00:07:11.366701
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -2215,21 +2215,21 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.016577 secs
-Max. Execute Time        0.016577 secs
-Avg. Execute Time        0.016577 secs
+Min. Execute Time        0.033737 secs
+Max. Execute Time        0.033737 secs
+Avg. Execute Time        0.033737 secs
 Stats Collection Type    OPERATOR_STATS
-SQL Process Busy Time    8,241
+SQL Process Busy Time    14,341
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,341                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,341 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    28
-Request Message Bytes    39,712
+Request Message Bytes    39,728
 Reply Message Count      15
 Reply Message Bytes      42,528
 BMO Space Buffer Size    256
@@ -2243,20 +2243,20 @@ Scr. Write Count         0
 Scr. IO Max Time         0
 Sort TopN                -1
 
-   Id       DOP          Table Name
+   Id       DOP Table Name
   EstRowsAccess       ActRowsAccess    EstRowsUsed         ActRowsUsed              SE_IOs        SE_IO_KBytes       SE_IO_SumTime       SE_IO_MaxTime
-    1         2   TRAFODION.SCH.TSTAT
-              0                   4            100                   4                   4                   0               9,682               5,606
+    1         2 TRAFODION.SCH.TSTAT
+              0                   4            100                   4                   4                   0              22,752              12,577
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_335_S1 PERTABLE;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_335_S1
-Compile Start Time       2017/07/17 04:58:06.342753
-Compile End Time         2017/07/17 04:58:06.391558
-Compile Elapsed Time                 0:00:00.048805
-Execute Start Time       2017/07/17 04:58:09.741408
-Execute End Time         2017/07/17 04:58:09.757985
-Execute Elapsed Time                 0:00:00.016577
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_336_S1 PERTABLE;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_336_S1
+Compile Start Time       2017/09/26 00:07:04.432712
+Compile End Time         2017/09/26 00:07:04.478608
+Compile Elapsed Time                 0:00:00.045896
+Execute Start Time       2017/09/26 00:07:11.341441
+Execute End Time         2017/09/26 00:07:11.375178
+Execute Elapsed Time                 0:00:00.033737
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -2274,7 +2274,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:58:09.756320
+First Row Returned Time  2017/09/26 00:07:11.366701
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -2282,21 +2282,21 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.016577 secs
-Max. Execute Time        0.016577 secs
-Avg. Execute Time        0.016577 secs
+Min. Execute Time        0.033737 secs
+Max. Execute Time        0.033737 secs
+Avg. Execute Time        0.033737 secs
 Stats Collection Type    OPERATOR_STATS
-SQL Process Busy Time    8,241
+SQL Process Busy Time    14,341
 UDR Process Busy Time    0
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,341                    KB
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,341 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    28
-Request Message Bytes    39,712
+Request Message Bytes    39,728
 Reply Message Count      15
 Reply Message Bytes      42,528
 BMO Space Buffer Size    256
@@ -2310,24 +2310,24 @@ Scr. Write Count         0
 Scr. IO Max Time         0
 Sort TopN                -1
 
-   Id       DOP          Table Name
+   Id       DOP Table Name
   EstRowsAccess       ActRowsAccess    EstRowsUsed         ActRowsUsed              SE_IOs        SE_IO_KBytes       SE_IO_SumTime       SE_IO_MaxTime
-    1         2   TRAFODION.SCH.TSTAT
-              0                   4            100                   4                   4                   0               9,682               5,606
+    1         2 TRAFODION.SCH.TSTAT
+              0                   4            100                   4                   4                   0              22,752              12,577
 
 --- SQL operation complete.
 >>log;
 >>SET SESSION DEFAULT STATISTICS_VIEW_TYPE 'DEFAULT' ;
 
 --- SQL operation complete.
->>display statistics for QID MXID11000024709212367027407408000000000000206U3333300_335_S1 PROGRESS;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_335_S1
-Compile Start Time       2017/07/17 04:58:06.342753
-Compile End Time         2017/07/17 04:58:06.391558
-Compile Elapsed Time                 0:00:00.048805
-Execute Start Time       2017/07/17 04:58:09.741408
-Execute End Time         2017/07/17 04:58:09.757985
-Execute Elapsed Time                 0:00:00.016577
+>>display statistics for QID MXID11000031882212373144360231001000000000206U3333300_336_S1 PROGRESS;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_336_S1
+Compile Start Time       2017/09/26 00:07:04.432712
+Compile End Time         2017/09/26 00:07:04.478608
+Compile Elapsed Time                 0:00:00.045896
+Execute Start Time       2017/09/26 00:07:11.341441
+Execute End Time         2017/09/26 00:07:11.375178
+Execute Elapsed Time                 0:00:00.033737
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -2345,7 +2345,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:58:09.756320
+First Row Returned Time  2017/09/26 00:07:11.366701
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -2353,44 +2353,44 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.016577 secs
-Max. Execute Time        0.016577 secs
-Avg. Execute Time        0.016577 secs
+Min. Execute Time        0.033737 secs
+Max. Execute Time        0.033737 secs
+Avg. Execute Time        0.033737 secs
 Stats Collection Type    OPERATOR_STATS
-SQL Process Busy Time    8,241
-SQL Space Allocated      896                       KB
-SQL Space Used           766                       KB
-SQL Heap Allocated       200                       KB
-SQL Heap Used            78                        KB
-SQL Heap WM              10,341                    KB
+SQL Process Busy Time    14,341
+SQL Space Allocated      896 KB
+SQL Space Used           766 KB
+SQL Heap Allocated       200 KB
+SQL Heap Used            78 KB
+SQL Heap WM              10,341 KB
 Processes Created        0
 Process Create Time      0
 Request Message Count    28
-Request Message Bytes    39,712
+Request Message Bytes    39,728
 Reply Message Count      15
 Reply Message Bytes      42,528
 
-   Id       DOP          Table Name
+   Id       DOP Table Name
   EstRowsAccess       ActRowsAccess    EstRowsUsed         ActRowsUsed              SE_IOs        SE_IO_KBytes       SE_IO_SumTime       SE_IO_MaxTime
-    1         2   TRAFODION.SCH.TSTAT
-              0                   4            100                   4                   4                   0               9,682               5,606
+    1         2 TRAFODION.SCH.TSTAT
+              0                   4            100                   4                   4                   0              22,752              12,577
 
    Id             TDBName                Mode       DOP      TopN            BMOPhase     InterimRowCount             CPUTime
-              BMOHeapUsed    BMOHeapAllocated           BMOHeapWM       BMOSpaceBufSz      BMOSpaceBufCnt
+              BMOHeapUsed    BMOHeapAllocated           BMOHeapWM           EstMemory       BMOSpaceBufSz      BMOSpaceBufCnt
                ScrFileCnt           ScrIOSize           ScrIORead        ScrIOWritten           ScrIOTime        ScrIOMaxTime
-    6        EX_HASH_GRBY                DISK         2        -1           READ_ROWS                   0               2,283
-                        4               1,024               7,687                 256                   0
+    6        EX_HASH_GRBY                DISK         2        -1           READ_ROWS                   0               4,263
+                        4               1,024               7,687                0.07                 256                   0
                         0                  -1                   0                   0                   0                   0
 
 --- SQL operation complete.
->>get statistics for QID MXID11000024709212367027407408000000000000206U3333300_335_S1 PROGRESS;
-Qid                      MXID11000024709212367027407408000000000000206U3333300_335_S1
-Compile Start Time       2017/07/17 04:58:06.342753
-Compile End Time         2017/07/17 04:58:06.391558
-Compile Elapsed Time                 0:00:00.048805
-Execute Start Time       2017/07/17 04:58:09.741408
-Execute End Time         2017/07/17 04:58:09.757985
-Execute Elapsed Time                 0:00:00.016577
+>>get statistics for QID MXID11000031882212373144360231001000000000206U3333300_336_S1 PROGRESS;
+Qid                      MXID11000031882212373144360231001000000000206U3333300_336_S1
+Compile Start Time       2017/09/26 00:07:04.432712
+Compile End Time         2017/09/26 00:07:04.478608
+Compile Elapsed Time                 0:00:00.045896
+Execute Start Time       2017/09/26 00:07:11.341441
+Execute End Time         2017/09/26 00:07:11.375178
+Execute Elapsed Time                 0:00:00.033737
 State                    CLOSE
 Rows Affected            0
 SQL Error Code           100
@@ -2408,7 +2408,7 @@ Transaction Id           -1
 Source String            select distinct d from tstat ;
 SQL Source Length        30
 Rows Returned            4
-First Row Returned Time  2017/07/17 04:58:09.756320
+First Row Returned Time  2017/09/26 00:07:11.366701
 Last Error before AQR    0
 Number of AQR retries    0
 Delay before AQR         0
@@ -2416,33 +2416,33 @@ No. of times reclaimed   0
 Cancel Time              -1
 Last Suspend Time        -1
 No. of times executed    1
-Min. Execute Time        0.016577 secs
-Max. Execute Time        0.016577 secs
-Avg. Execute Time        0.016577 secs
+Min. Execute Time        0.033737 secs
+Max. Execute Time        0.033737 secs
+Avg. Execute Time        0.033737 secs
 Stats Collection Type    OPERATOR_STATS
-SQL Process Busy Time    8,241
-SQL

<TRUNCATED>


[13/13] incubator-trafodion git commit: Merge PR 1245 [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Posted by se...@apache.org.
Merge PR 1245 [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf() 


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

Branch: refs/heads/master
Commit: bd2932b6f89da916f872ac65c4f8a824c59767a8
Parents: 4c9423f 9d9d124
Author: selvaganesang <se...@apache.org>
Authored: Fri Sep 29 23:55:09 2017 +0000
Committer: selvaganesang <se...@apache.org>
Committed: Fri Sep 29 23:55:09 2017 +0000

----------------------------------------------------------------------
 core/sql/arkcmp/CmpContext.cpp            |    2 +-
 core/sql/arkcmp/CmpSqlSession.cpp         |    2 +-
 core/sql/cli/Cli.cpp                      |   54 +-
 core/sql/cli/Statement.cpp                |    2 +-
 core/sql/clitest/blobtest.cpp             |   20 +-
 core/sql/comexe/ComTdb.cpp                |    2 +-
 core/sql/comexe/ComTdbExeUtil.cpp         |    8 +-
 core/sql/comexe/ComTdbExeUtil.h           |    2 +-
 core/sql/comexe/ComTdbFastTransport.cpp   |    4 +-
 core/sql/comexe/ComTdbFirstN.cpp          |    2 +-
 core/sql/comexe/ComTdbHashj.cpp           |    2 +-
 core/sql/comexe/ComTdbHbaseAccess.cpp     |    8 +-
 core/sql/comexe/ComTdbHdfsScan.cpp        |   22 +-
 core/sql/comexe/ComTdbHdfsScan.h          |    2 +
 core/sql/comexe/ComTdbMj.cpp              |    2 +-
 core/sql/comexe/ComTdbOnlj.cpp            |    2 +-
 core/sql/comexe/ComTdbProbeCache.cpp      |    2 +-
 core/sql/comexe/ComTdbRoot.cpp            |   16 +-
 core/sql/comexe/ComTdbSendBottom.cpp      |    2 +-
 core/sql/comexe/ComTdbSendTop.cpp         |    2 +-
 core/sql/comexe/ComTdbSequence.cpp        |    2 +-
 core/sql/comexe/ComTdbSort.cpp            |    4 +-
 core/sql/comexe/ComTdbSortGrby.cpp        |    2 +-
 core/sql/comexe/ComTdbSplitBottom.cpp     |    8 +-
 core/sql/comexe/ComTdbSplitTop.cpp        |    4 +-
 core/sql/comexe/ComTdbTupleFlow.cpp       |    2 +-
 core/sql/comexe/ComTdbUdr.cpp             |    4 +-
 core/sql/comexe/ComTdbUnPackRows.cpp      |    2 +-
 core/sql/comexe/ComTdbUnion.cpp           |    2 +-
 core/sql/common/ComSqlId.cpp              |    4 +-
 core/sql/common/ComViewColUsage.h         |    2 +-
 core/sql/common/IpcGuardian.cpp           |    2 +-
 core/sql/common/str.cpp                   |  289 ----
 core/sql/common/str.h                     |    1 +
 core/sql/executor/ExExeUtilExplain.cpp    |    2 +-
 core/sql/executor/ExExeUtilGet.cpp        |   49 +-
 core/sql/executor/ExExeUtilGetStats.cpp   |  895 +++++-----
 core/sql/executor/ExExeUtilLoad.cpp       |   10 +-
 core/sql/executor/ExExeUtilMisc.cpp       |   14 +-
 core/sql/executor/ExExplain.cpp           |    2 +-
 core/sql/executor/ExFastTransport.cpp     |    2 +-
 core/sql/executor/ExHbaseAccess.cpp       |    2 +-
 core/sql/executor/ExHdfsScan.cpp          |    2 +-
 core/sql/executor/ExSMGlobals.cpp         |    2 +-
 core/sql/executor/ExStats.cpp             |  234 +--
 core/sql/executor/ex_hashj.cpp            |    2 +-
 core/sql/exp/ExpLOB.cpp                   |   18 +-
 core/sql/exp/ExpLOBaccess.cpp             |   58 +-
 core/sql/exp/ExpPCode.cpp                 |    8 +-
 core/sql/exp/exp_attrs.cpp                |    6 +-
 core/sql/exp/exp_clause.cpp               |    8 +-
 core/sql/exp/exp_datetime.cpp             |    2 +-
 core/sql/exp/exp_expr.cpp                 |    2 +-
 core/sql/generator/GenExplain.cpp         |   12 +-
 core/sql/generator/GenRelEnforcer.cpp     |    2 +-
 core/sql/optimizer/BindItemExpr.cpp       |    4 +-
 core/sql/optimizer/CmpProcess.cpp         |   14 +-
 core/sql/optimizer/CmpProcess.h           |    2 +-
 core/sql/optimizer/CompilationStats.cpp   |    6 +-
 core/sql/optimizer/CompilationStats.h     |    2 +-
 core/sql/optimizer/CompilerTracking.cpp   |    4 +-
 core/sql/regress/core/EXPECTEDRTS         | 2134 ++++++++++++------------
 core/sql/regress/core/FILTER019           |    4 +-
 core/sql/regress/core/FILTERRTS           |    6 +-
 core/sql/sort/Qsort.cpp                   |    2 +-
 core/sql/sort/SortUtil.cpp                |   12 +-
 core/sql/sqlci/SqlCmd.cpp                 |    2 +-
 core/sql/sqlcomp/CmpDescribe.cpp          |    6 +-
 core/sql/sqlcomp/CmpSeabaseDDLauth.cpp    |    2 +-
 core/sql/sqlcomp/CmpSeabaseDDLcleanup.cpp |   55 +-
 core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp  |  112 +-
 core/sql/sqlcomp/CmpSeabaseDDLroutine.cpp |   14 +-
 core/sql/sqlcomp/CmpSeabaseDDLschema.cpp  |    4 +-
 core/sql/sqlcomp/CmpSeabaseDDLtable.cpp   |  104 +-
 core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp |   18 +-
 core/sql/sqlcomp/CmpSeabaseDDLview.cpp    |    8 +-
 76 files changed, 2022 insertions(+), 2311 deletions(-)
----------------------------------------------------------------------



[09/13] incubator-trafodion git commit: [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Posted by se...@apache.org.
[TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Switched str_sprinf to use the standard sprintf function to ensure
that the format specification and the passed in parameters are consistent


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

Branch: refs/heads/master
Commit: 8fd4987967a35cf5fda14089c4715e6142ee85e9
Parents: 2953e8c
Author: selvaganesang <se...@esgyn.com>
Authored: Wed Sep 27 17:54:39 2017 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Wed Sep 27 17:54:39 2017 +0000

----------------------------------------------------------------------
 core/sql/arkcmp/CmpSqlSession.cpp         |   2 +-
 core/sql/cli/Cli.cpp                      |  54 ++---
 core/sql/cli/Statement.cpp                |   2 +-
 core/sql/clitest/blobtest.cpp             |  20 +-
 core/sql/comexe/ComTdb.cpp                |   2 +-
 core/sql/comexe/ComTdbExeUtil.cpp         |   8 +-
 core/sql/comexe/ComTdbExeUtil.h           |   2 +-
 core/sql/comexe/ComTdbFastTransport.cpp   |   4 +-
 core/sql/comexe/ComTdbFirstN.cpp          |   2 +-
 core/sql/comexe/ComTdbHashj.cpp           |   2 +-
 core/sql/comexe/ComTdbHbaseAccess.cpp     |   8 +-
 core/sql/comexe/ComTdbHdfsScan.cpp        |  22 +-
 core/sql/comexe/ComTdbHdfsScan.h          |   2 +
 core/sql/comexe/ComTdbMj.cpp              |   2 +-
 core/sql/comexe/ComTdbOnlj.cpp            |   2 +-
 core/sql/comexe/ComTdbProbeCache.cpp      |   2 +-
 core/sql/comexe/ComTdbRoot.cpp            |  16 +-
 core/sql/comexe/ComTdbSendBottom.cpp      |   2 +-
 core/sql/comexe/ComTdbSendTop.cpp         |   2 +-
 core/sql/comexe/ComTdbSequence.cpp        |   2 +-
 core/sql/comexe/ComTdbSort.cpp            |   4 +-
 core/sql/comexe/ComTdbSortGrby.cpp        |   2 +-
 core/sql/comexe/ComTdbSplitBottom.cpp     |   8 +-
 core/sql/comexe/ComTdbSplitTop.cpp        |   4 +-
 core/sql/comexe/ComTdbTupleFlow.cpp       |   2 +-
 core/sql/comexe/ComTdbUdr.cpp             |   4 +-
 core/sql/comexe/ComTdbUnPackRows.cpp      |   2 +-
 core/sql/comexe/ComTdbUnion.cpp           |   2 +-
 core/sql/common/ComSqlId.cpp              |   4 +-
 core/sql/common/ComViewColUsage.h         |   2 +-
 core/sql/common/IpcGuardian.cpp           |   2 +-
 core/sql/common/str.cpp                   | 291 -------------------------
 core/sql/common/str.h                     |   1 +
 core/sql/executor/ExExeUtilExplain.cpp    |   2 +-
 core/sql/executor/ExExeUtilGet.cpp        |  49 ++---
 core/sql/executor/ExExeUtilLoad.cpp       |  10 +-
 core/sql/executor/ExExeUtilMisc.cpp       |   8 +-
 core/sql/executor/ExExplain.cpp           |   2 +-
 core/sql/executor/ExFastTransport.cpp     |   2 +-
 core/sql/executor/ExHbaseAccess.cpp       |   2 +-
 core/sql/executor/ExHdfsScan.cpp          |   2 +-
 core/sql/executor/ExSMGlobals.cpp         |   2 +-
 core/sql/executor/ex_hashj.cpp            |   2 +-
 core/sql/exp/ExpLOB.cpp                   |  18 +-
 core/sql/exp/ExpLOBaccess.cpp             |  58 ++---
 core/sql/exp/ExpPCode.cpp                 |   8 +-
 core/sql/exp/exp_attrs.cpp                |   6 +-
 core/sql/exp/exp_clause.cpp               |   8 +-
 core/sql/exp/exp_datetime.cpp             |   2 +-
 core/sql/exp/exp_expr.cpp                 |   2 +-
 core/sql/generator/GenExplain.cpp         |  12 +-
 core/sql/generator/GenRelEnforcer.cpp     |   2 +-
 core/sql/optimizer/BindItemExpr.cpp       |   4 +-
 core/sql/optimizer/CmpProcess.cpp         |   2 +-
 core/sql/sort/Qsort.cpp                   |   2 +-
 core/sql/sort/SortUtil.cpp                |  12 +-
 core/sql/sqlci/SqlCmd.cpp                 |   2 +-
 core/sql/sqlcomp/CmpDescribe.cpp          |   6 +-
 core/sql/sqlcomp/CmpSeabaseDDLauth.cpp    |   2 +-
 core/sql/sqlcomp/CmpSeabaseDDLcleanup.cpp |  55 +++--
 core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp  | 112 +++++-----
 core/sql/sqlcomp/CmpSeabaseDDLroutine.cpp |  14 +-
 core/sql/sqlcomp/CmpSeabaseDDLschema.cpp  |   4 +-
 core/sql/sqlcomp/CmpSeabaseDDLtable.cpp   | 104 ++++-----
 core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp |  18 +-
 core/sql/sqlcomp/CmpSeabaseDDLview.cpp    |   8 +-
 66 files changed, 369 insertions(+), 659 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/arkcmp/CmpSqlSession.cpp
----------------------------------------------------------------------
diff --git a/core/sql/arkcmp/CmpSqlSession.cpp b/core/sql/arkcmp/CmpSqlSession.cpp
index 962e754..06ec7bf 100644
--- a/core/sql/arkcmp/CmpSqlSession.cpp
+++ b/core/sql/arkcmp/CmpSqlSession.cpp
@@ -242,7 +242,7 @@ void CmpSqlSession::setSessionId(NAString &sessionID)
 	 sessionUniqNum,
 	 userNameLen, NULL,
 	 userSessionNameLen, NULL);
-      str_sprintf(sName, "%02d%03Ld%06Ld%018Ld%010Ld",
+      str_sprintf(sName, "%02d%03ld%06ld%018ld%010ld",
 		  ComSqlId::SQ_SQL_ID_VERSION,
 		  segmentNum_, pin_l, schemaNameCreateTime,
 		  sessionUniqNum);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/cli/Cli.cpp
----------------------------------------------------------------------
diff --git a/core/sql/cli/Cli.cpp b/core/sql/cli/Cli.cpp
index 1fdc61c..d351202 100644
--- a/core/sql/cli/Cli.cpp
+++ b/core/sql/cli/Cli.cpp
@@ -2550,7 +2550,7 @@ Lng32 SQLCLI_ProcessRetryQuery(
 			    stringParam1 = (char*)errCond->getOptionalString(0);
 			  intParam1 = errCond->getOptionalInteger(0);
 			  
-			  str_sprintf(emsText, "AutoQueryRetry will be attempted for Sqlcode=%d, Nskcode=%d, StringParam=%s, IntParam=%s",
+			  str_sprintf(emsText, "AutoQueryRetry will be attempted for Sqlcode=%d, Nskcode=%d, StringParam=%s, IntParam=%d",
 				      sqlcode, nskcode, 
 				      (stringParam1 ? stringParam1 : "NULL"),
 				      (intParam1 != ComDiags_UnInitialized_Int
@@ -8501,7 +8501,7 @@ Lng32 SQLCLI_LOBcliInterface
 				       &inDescSyskey, &descPartnKey,
 				       &schNameLen, schName,
 				       inLobHandle);
-      str_sprintf(logBuf,"Handle contents : flags %d, lobType %d, lobNum :%d, uid : %Ld, descSyskey: %Ld, descPartnKey : %Ld, schNameLen:%d, schName %s", flags,lobType,lobNum,uid,inDescSyskey,descPartnKey,schNameLen,schName);
+      str_sprintf(logBuf,"Handle contents : flags %d, lobType %d, lobNum :%d, uid : %ld, descSyskey: %ld, descPartnKey : %ld, schNameLen:%d, schName %s", flags,lobType,lobNum,uid,inDescSyskey,descPartnKey,schNameLen,schName);
        lobDebugInfo(logBuf,0,__LINE__,lobTrace);
     }
 
@@ -8709,7 +8709,7 @@ Lng32 SQLCLI_LOBcliInterface
     case LOB_CLI_INSERT:
       {
 	// insert into lob descriptor handle table
-	str_sprintf(query, "select syskey from (insert into table(ghost table %s) values (%Ld, 1, %Ld)) x",
+	str_sprintf(query, "select syskey from (insert into table(ghost table %s) values (%ld, 1, %ld)) x",
 		    lobDescHandleName, descPartnKey, (dataLen ? *dataLen : 0));
         lobDebugInfo(query,0,__LINE__,lobTrace);
 	// set parserflags to allow ghost table
@@ -8733,7 +8733,7 @@ Lng32 SQLCLI_LOBcliInterface
         if (blackBox && (blackBoxLen && (*blackBoxLen > 0)))
           {
             //blackBox points to external file name
-            str_sprintf(query, "insert into table(ghost table %s) values (%Ld, %Ld, 1, %Ld, %Ld, '%s')",
+            str_sprintf(query, "insert into table(ghost table %s) values (%ld, %ld, 1, %ld, %ld, '%s')",
                         lobDescChunksName, descPartnKey, descSyskey,
                         (dataLen ? *dataLen : 0),
                         (dataOffset ? *dataOffset : 0),
@@ -8742,7 +8742,7 @@ Lng32 SQLCLI_LOBcliInterface
           }
         else
           {
-            str_sprintf(query, "insert into table(ghost table %s) values (%Ld, %Ld, 1, %Ld, %Ld, NULL)",
+            str_sprintf(query, "insert into table(ghost table %s) values (%ld, %ld, 1, %ld, %ld, NULL)",
                         lobDescChunksName, descPartnKey, descSyskey,
                         (dataLen ? *dataLen : 0),
                         (dataOffset ? *dataOffset : 0));
@@ -8794,7 +8794,7 @@ Lng32 SQLCLI_LOBcliInterface
             cliRC = -LOB_DESC_APPEND_ERROR;       
             goto error_return;
           } 
-	str_sprintf(query, "update table(ghost table %s) set numChunks = numChunks + 1, lobLen = lobLen + %Ld where descPartnKey = %Ld and syskey = %Ld",
+	str_sprintf(query, "update table(ghost table %s) set numChunks = numChunks + 1, lobLen = lobLen + %ld where descPartnKey = %ld and syskey = %ld",
 		    lobDescHandleName, 
 		    (dataLen ? *dataLen : 0),
 		    descPartnKey, inDescSyskey);
@@ -8812,7 +8812,7 @@ Lng32 SQLCLI_LOBcliInterface
 	    goto error_return;
 	  }
 
-	str_sprintf(query, "select numChunks from table(ghost table %s) h where h.descPartnKey = %Ld and h.syskey = %Ld for read committed access",
+	str_sprintf(query, "select numChunks from table(ghost table %s) h where h.descPartnKey = %ld and h.syskey = %ld for read committed access",
 		    lobDescHandleName,  
 		    descPartnKey, inDescSyskey);
 
@@ -8835,7 +8835,7 @@ Lng32 SQLCLI_LOBcliInterface
 	// insert into lob descriptor chunks table
 	if (blackBox && (blackBoxLen && (*blackBoxLen > 0)))
 	  {
-	    str_sprintf(query, "insert into table(ghost table %s) values (%Ld, %Ld, %d, %Ld, %Ld, '%s')",
+	    str_sprintf(query, "insert into table(ghost table %s) values (%ld, %ld, %d, %ld, %ld, '%s')",
 			lobDescChunksName, descPartnKey, inDescSyskey, 
 			numChunks, (dataLen ? *dataLen : 0),
 			(dataOffset ? *dataOffset : 0),
@@ -8844,7 +8844,7 @@ Lng32 SQLCLI_LOBcliInterface
 	  }
 	else
 	  {
-	    str_sprintf(query, "insert into table(ghost table %s) values (%Ld, %Ld, %d, %Ld, %Ld, NULL)",
+	    str_sprintf(query, "insert into table(ghost table %s) values (%ld, %ld, %d, %ld, %ld, NULL)",
 			lobDescChunksName, descPartnKey, inDescSyskey, 
 			numChunks, (dataLen ? *dataLen : 0),
 			(dataOffset ? *dataOffset : 0)
@@ -8884,7 +8884,7 @@ Lng32 SQLCLI_LOBcliInterface
   case LOB_CLI_UPDATE_UNIQUE:
       {
 	// update desc handle table
-	str_sprintf(query, "update table(ghost table %s) set numChunks = 1, lobLen = %Ld where descPartnKey = %Ld and syskey = %Ld",
+	str_sprintf(query, "update table(ghost table %s) set numChunks = 1, lobLen = %ld where descPartnKey = %ld and syskey = %ld",
 		    lobDescHandleName, 
 		    (dataLen ? *dataLen : 0),
 		    descPartnKey, inDescSyskey);
@@ -8906,7 +8906,7 @@ Lng32 SQLCLI_LOBcliInterface
 
 
 	// delete all chunks from lob descriptor chunks table
-	str_sprintf(query, "delete from table(ghost table %s) where descPartnKey = %Ld and descSysKey = %Ld",
+	str_sprintf(query, "delete from table(ghost table %s) where descPartnKey = %ld and descSysKey = %ld",
 		    lobDescChunksName, descPartnKey, inDescSyskey);
 
 	// set parserflags to allow ghost table
@@ -8933,7 +8933,7 @@ Lng32 SQLCLI_LOBcliInterface
 	// insert the new chunk into lob descriptor chunks table
 	if (blackBox && (blackBoxLen && (*blackBoxLen > 0)))
 	  {
-	    str_sprintf(query, "insert into table(ghost table %s) values (%Ld, %Ld, 1, %Ld, %Ld, '%s')",
+	    str_sprintf(query, "insert into table(ghost table %s) values (%ld, %ld, 1, %ld, %ld, '%s')",
 			lobDescChunksName, descPartnKey, inDescSyskey,
 			(dataLen ? *dataLen : 0),
 			(dataOffset ? *dataOffset : 0),
@@ -8942,7 +8942,7 @@ Lng32 SQLCLI_LOBcliInterface
 	  }
 	else
 	  {
-	   str_sprintf(query, "insert into table(ghost table %s) values (%Ld, %Ld, 1, %Ld, %Ld, NULL)",
+	   str_sprintf(query, "insert into table(ghost table %s) values (%ld, %ld, 1, %ld, %ld, NULL)",
 			lobDescChunksName, descPartnKey, inDescSyskey,
 			(dataLen ? *dataLen : 0),
 			(dataOffset ? *dataOffset : 0));
@@ -8984,7 +8984,7 @@ Lng32 SQLCLI_LOBcliInterface
     case LOB_CLI_DELETE:
       {
 	// delete from lob descriptor handle table
-	str_sprintf(query, "delete from table(ghost table %s) where descPartnKey = %Ld and syskey = %Ld",
+	str_sprintf(query, "delete from table(ghost table %s) where descPartnKey = %ld and syskey = %ld",
 		    lobDescHandleName, descPartnKey, inDescSyskey);
         lobDebugInfo(query,0,__LINE__,lobTrace);
 	// set parserflags to allow ghost table
@@ -9002,7 +9002,7 @@ Lng32 SQLCLI_LOBcliInterface
 	  }
 
 	// delete from lob descriptor chunks table
-	str_sprintf(query, "delete from table(ghost table %s) where descPartnKey = %Ld and descSysKey = %Ld",
+	str_sprintf(query, "delete from table(ghost table %s) where descPartnKey = %ld and descSysKey = %ld",
 		    lobDescChunksName, descPartnKey, inDescSyskey);
         lobDebugInfo(query,0,__LINE__,lobTrace);
 	// set parserflags to allow ghost table
@@ -9026,7 +9026,7 @@ Lng32 SQLCLI_LOBcliInterface
       {
 	// check if there are multiple chunks.
 	Int32 numChunks = 0;
-	str_sprintf(query, "select numChunks from table(ghost table %s) where descPartnKey = %Ld for read committed access",
+	str_sprintf(query, "select numChunks from table(ghost table %s) where descPartnKey = %ld for read committed access",
 		    lobDescHandleName,
 		    descPartnKey);
         lobDebugInfo(query,0,__LINE__,lobTrace);
@@ -9086,7 +9086,7 @@ Lng32 SQLCLI_LOBcliInterface
 	
 	// This lob has only one chunk. Read and return the single descriptor.
       
-	str_sprintf(query, "select c.chunkLen, c.dataOffset ,c.stringParam from table(ghost table %s) h, table(ghost table %s) c where h.descPartnKey = c.descPartnKey and h.syskey = c.descSyskey and h.descPartnKey = %Ld and h.syskey = %Ld and c.chunkNum = h.numChunks for read committed access",
+	str_sprintf(query, "select c.chunkLen, c.dataOffset ,c.stringParam from table(ghost table %s) h, table(ghost table %s) c where h.descPartnKey = c.descPartnKey and h.syskey = c.descSyskey and h.descPartnKey = %ld and h.syskey = %ld and c.chunkNum = h.numChunks for read committed access",
 		    lobDescHandleName, lobDescChunksName, 
 		    descPartnKey, inDescSyskey);
          
@@ -9175,7 +9175,7 @@ Lng32 SQLCLI_LOBcliInterface
 
    case LOB_CLI_SELECT_CURSOR:
       {
-	str_sprintf(query, "select dataOffset, chunkLen, stringParam from table(ghost table %s) where descPartnKey = %Ld and descSyskey = %Ld order by chunkNum for read committed access",
+	str_sprintf(query, "select dataOffset, chunkLen, stringParam from table(ghost table %s) where descPartnKey = %ld and descSyskey = %ld order by chunkNum for read committed access",
 		    lobDescChunksName, descPartnKey, inDescSyskey);
         lobDebugInfo(query,0,__LINE__,lobTrace);
 	// set parserflags to allow ghost table
@@ -9308,7 +9308,7 @@ Lng32 SQLCLI_LOBcliInterface
 	
 	//aggregate on chunklen for this lob.
 
-	str_sprintf (query,  "select sum(chunklen) from  %s   where descpartnkey = %Ld and descsyskey = %Ld ", lobDescChunksName, descPartnKey, inDescSyskey );
+	str_sprintf (query,  "select sum(chunklen) from  %s   where descpartnkey = %ld and descsyskey = %ld ", lobDescChunksName, descPartnKey, inDescSyskey );
         lobDebugInfo(query,0,__LINE__,lobTrace);
 	// set parserflags to allow ghost table
 	currContext.setSqlParserFlags(0x1);
@@ -9439,7 +9439,7 @@ Lng32 SQLCLI_LOB_GC_Interface
 				       &schNameLen, schName,
 				       handle);
     }
-  str_sprintf(logBuf,"flags %d, lobType %d, lobNum :%d, uid : %Ld, descSyskey: %Ld, descPartnKey : %Ld, schNameLen:%d, schName %s", flags,lobType,lobNum,uid,inDescSyskey,inDescPartnKey,schNameLen,schName);
+  str_sprintf(logBuf,"flags %d, lobType %d, lobNum :%d, uid : %ld, descSyskey: %ld, descPartnKey : %ld, schNameLen:%d, schName %s", flags,lobType,lobNum,uid,inDescSyskey,inDescPartnKey,schNameLen,schName);
   lobDebugInfo(logBuf,0,__LINE__,lobTrace);
   char tgtLobNameBuf[100];
   char * tgtLobName = 
@@ -9474,7 +9474,7 @@ Lng32 SQLCLI_LOB_GC_Interface
   Int64 numEntries = 0;
   Lng32 len;
   cliRC = cliInterface->executeImmediate(query, (char*)&numEntries, &len, FALSE);
-  str_sprintf(logBuf,"Number of entries in descchunktable %s is %d",lobDescChunksName, numEntries);
+  str_sprintf(logBuf,"Number of entries in descchunktable %s is %ld",lobDescChunksName, numEntries);
    lobDebugInfo(logBuf,0,__LINE__,lobTrace);
   currContext.resetSqlParserFlags(0x1);
 
@@ -9548,7 +9548,7 @@ Lng32 SQLCLI_LOB_GC_Interface
       dcInMemoryArray[i].setChunkLen(chunkLen);
       dcInMemoryArray[i].setChunkNum(chunkNum);
 
-      str_sprintf(logBuf,"Fetched for entry i=%d; currentOffset:%Ld, descPartnKey:%Ld, sysKey:%Ld, chunkLen:%Ld,chunkNum %d", i,currentOffset,descPartnKey,descSyskey,chunkLen,chunkNum);
+      str_sprintf(logBuf,"Fetched for entry i=%d; currentOffset:%ld, descPartnKey:%ld, sysKey:%ld, chunkLen:%ld,chunkNum %ld", i,currentOffset,descPartnKey,descSyskey,chunkLen,chunkNum);
       lobDebugInfo(logBuf,0,__LINE__,lobTrace);
 
       cliRC = cliInterface->fetch();
@@ -9589,7 +9589,7 @@ Lng32 SQLCLI_LOB_GC_Interface
       else
         {
          
-          str_sprintf(query, "update table(ghost table %s) set dataOffset=%Ld, chunkLen = %Ld where descPartnKey = %Ld and descSysKey = %Ld",
+          str_sprintf(query, "update table(ghost table %s) set dataOffset=%ld, chunkLen = %ld where descPartnKey = %ld and descSysKey = %ld",
                       lobDescChunksName, 
                       dcInMemoryArray[i].getNewOffset(),
                       dcInMemoryArray[i].getChunkLen(),
@@ -10462,7 +10462,7 @@ static Lng32 SeqGenCliInterfacePrepQry(
 			  &currContext,
 			  NULL);
       
-      str_sprintf(stmtName, "%s_%Ld", qryName, sga->getSGObjectUID().get_value());
+      str_sprintf(stmtName, "%s_%ld", qryName, sga->getSGObjectUID().get_value());
       
       doPrep = TRUE;
     }
@@ -10535,7 +10535,7 @@ static Lng32 SeqGenCliInterfaceUpdAndValidate(
       if (! cliInterfaceArr[SEQ_UPD_TS_QRY_IDX])
         {
           cliRC = SeqGenCliInterfacePrepQry(
-                                            "update %s.\"%s\".%s set upd_ts = cast(? as largeint not null) where seq_uid = %Ld",
+                                            "update %s.\"%s\".%s set upd_ts = cast(? as largeint not null) where seq_uid = %ld",
                                             SEQ_UPD_TS_QRY_IDX,
                                             "SEQ_UPD_TS_QRY_IDX",
                                             cliInterfaceArr, sga, myDiags, currContext, diags, exHeap);
@@ -10576,7 +10576,7 @@ static Lng32 SeqGenCliInterfaceUpdAndValidate(
   if (! cliInterfaceArr[SEQ_PROCESS_QRY_IDX])
     {
       cliRC = SeqGenCliInterfacePrepQry(
-                                        "select  case when cast(? as largeint not null) = 1 then t.startVal else t.nextValue end, t.redefTS from (update %s.\"%s\".%s set next_value = (case when cast(? as largeint not null) = 1 then start_value + cast(? as largeint not null) else (case when next_value + cast(? as largeint not null) > max_value then max_value+1 else next_value + cast(? as largeint not null) end) end), num_calls = num_calls + 1 where seq_uid = %Ld return old.start_value, old.next_value, old.redef_ts) t(startVal, nextValue, redefTS);",
+                                        "select  case when cast(? as largeint not null) = 1 then t.startVal else t.nextValue end, t.redefTS from (update %s.\"%s\".%s set next_value = (case when cast(? as largeint not null) = 1 then start_value + cast(? as largeint not null) else (case when next_value + cast(? as largeint not null) > max_value then max_value+1 else next_value + cast(? as largeint not null) end) end), num_calls = num_calls + 1 where seq_uid = %ld return old.start_value, old.next_value, old.redef_ts) t(startVal, nextValue, redefTS);",
                                         SEQ_PROCESS_QRY_IDX,
                                         "SEQ_PROCESS_QRY_IDX",
                                         cliInterfaceArr, sga, myDiags, currContext, diags, exHeap);
@@ -10641,7 +10641,7 @@ static Lng32 SeqGenCliInterfaceUpdAndValidate(
       if (! cliInterfaceArr[SEQ_SEL_TS_QRY_IDX])
         {
           cliRC = SeqGenCliInterfacePrepQry(
-                                            "select upd_ts from %s.\"%s\".%s where seq_uid = %Ld",
+                                            "select upd_ts from %s.\"%s\".%s where seq_uid = %ld",
                                             SEQ_SEL_TS_QRY_IDX,
                                             "SEQ_SEL_TS_QRY_IDX",
                                             cliInterfaceArr, sga, myDiags, currContext, diags, exHeap);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/cli/Statement.cpp
----------------------------------------------------------------------
diff --git a/core/sql/cli/Statement.cpp b/core/sql/cli/Statement.cpp
index db6a48f..cc6044f 100644
--- a/core/sql/cli/Statement.cpp
+++ b/core/sql/cli/Statement.cpp
@@ -2068,7 +2068,7 @@ RETCODE Statement::doHiveTableSimCheck(TrafSimilarityTableInfo *si,
   if (retcode == 1) // check failed
     {
       char errStr[2000];
-      str_sprintf(errStr, "compiledModTS = %Ld, failedModTS = %Ld, failedLoc = %s", 
+      str_sprintf(errStr, "compiledModTS = %ld, failedModTS = %ld, failedLoc = %s", 
                   si->modTS(), failedModTS, 
                   (failedLocBufLen > 0 ? failedLocBuf : si->hdfsRootDir()));
       

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/clitest/blobtest.cpp
----------------------------------------------------------------------
diff --git a/core/sql/clitest/blobtest.cpp b/core/sql/clitest/blobtest.cpp
index 492bbd6..98c7279 100644
--- a/core/sql/clitest/blobtest.cpp
+++ b/core/sql/clitest/blobtest.cpp
@@ -44,7 +44,7 @@ Int32 extractLengthOfLobColumn(CliGlobals *cliglob, char *lobHandle,
   char lobLengthResult[200];
   str_cpy_all(lobLengthResult," ",200);
   Int32 lobLengthResultLen = 0;
-  str_sprintf(query,"extract loblength (lob '%s') LOCATION %Ld ",lobHandle, &lengthOfLob);
+  str_sprintf(query,"extract loblength (lob '%s') LENGTH %ld ",lobHandle, lengthOfLob);
   retcode = cliInterface.executeImmediate(query,lobLengthResult,&lobLengthResultLen,FALSE);
 
   delete query;
@@ -84,7 +84,7 @@ Int32 extractLobToBuffer(CliGlobals *cliglob, char * lobHandle, Int64 &lengthOfL
   Int64 lobExtractLen = 10000;
   char *lobDataBuf = new char[lobExtractLen];
   
-  str_sprintf(query,"extract lobtobuffer(lob '%s', LOCATION %Ld, SIZE %Ld) ", lobHandle, (Int64)lobDataBuf, &lobExtractLen);
+  str_sprintf(query,"extract lobtobuffer(lob '%s', LOCATION %ld, SIZE %ld) ", lobHandle, (Int64)lobDataBuf, lobExtractLen);
  
  
   retcode = cliInterface.executeImmediatePrepare(query);
@@ -107,7 +107,7 @@ Int32 extractLobToBuffer(CliGlobals *cliglob, char * lobHandle, Int64 &lengthOfL
 
       fclose(lobFileId);
     }
-  str_sprintf(query,"extract lobtobuffer(lob '%s', LOCATION %Ld, SIZE 0) ", lobHandle, (Int64)lobDataBuf);
+  str_sprintf(query,"extract lobtobuffer(lob '%s', LOCATION %ld, SIZE 0) ", lobHandle, (Int64)lobDataBuf);
  
   cliInterface.clearExecFetchClose(NULL,NULL,statusBuf, &statusBufLen);
   delete  lobFinalBuf;
@@ -135,7 +135,7 @@ Int32 extractLobToFileInChunks(CliGlobals *cliglob,  char * lobHandle, char *fil
   char *lobDataBuf = new char[lobExtractLen];
   Int64 *inputOutputAddr = &lobExtractLen;
 
-  str_sprintf(query,"extract lobtobuffer(lob '%s', LOCATION %Ld, SIZE %Ld) ", lobHandle, (Int64)lobDataBuf, inputOutputAddr);
+  str_sprintf(query,"extract lobtobuffer(lob '%s', LOCATION %ld, SIZE %ld) ", lobHandle, (Int64)lobDataBuf, lobExtractLen);
  
  
   retcode = cliInterface.executeImmediatePrepare(query);
@@ -152,7 +152,7 @@ Int32 extractLobToFileInChunks(CliGlobals *cliglob,  char * lobHandle, char *fil
 	}
     }
   lobExtractLen = 0;
-  str_sprintf(query,"extract lobtobuffer(lob '%s', LOCATION %Ld, SIZE %Ld) ", lobHandle, (Int64)lobDataBuf, inputOutputAddr);
+  str_sprintf(query,"extract lobtobuffer(lob '%s', LOCATION %ld, SIZE %ld) ", lobHandle, (Int64)lobDataBuf, lobExtractLen);
   retcode = cliInterface.executeImmediatePrepare(query);
   cliInterface.clearExecFetchClose(NULL,NULL,statusBuf, &statusBufLen);
 
@@ -181,7 +181,7 @@ Int32 insertBufferToLob(CliGlobals *cliglob, char *tableName)
   Int64 lobInsertLen = 10;
   char *lobDataBuf = new char[lobInsertLen];
   memcpy(lobDataBuf, "xxxxxyyyyy",10);
-  str_sprintf(query,"insert into %s values (1, buffertolob (LOCATION %Ld, SIZE %Ld))", tableName,(Int64)lobDataBuf, lobInsertLen);
+  str_sprintf(query,"insert into %s values (1, buffertolob (LOCATION %ld, SIZE %ld))", tableName,(Int64)lobDataBuf, lobInsertLen);
  
  
   retcode = cliInterface.executeImmediate(query);
@@ -217,7 +217,7 @@ Int32 updateBufferToLob(CliGlobals *cliglob, char *tableName, char *columnName)
   Int64 lobUpdateLen = 20;
   char *lobDataBuf = new char[lobUpdateLen];
   memcpy(lobDataBuf, "zzzzzzzzzzzzzzzzzzzz",20);
-  str_sprintf(query,"update %s set %s= buffertolob(LOCATION %Ld, SIZE %Ld)", tableName,columnName, (Int64)lobDataBuf, lobUpdateLen);
+  str_sprintf(query,"update %s set %s= buffertolob(LOCATION %ld, SIZE %ld)", tableName,columnName, (Int64)lobDataBuf, lobUpdateLen);
  
  
   retcode = cliInterface.executeImmediate(query);
@@ -253,7 +253,7 @@ Int32 updateAppendBufferToLob(CliGlobals *cliglob, char *tableName, char *column
   Int64 lobUpdateLen = 15;
   char *lobDataBuf = new char[lobUpdateLen];
   memcpy(lobDataBuf, "aaaaabbbbbccccc",15);
-  str_sprintf(query,"update %s set %s=buffertolob (LOCATION %Ld, SIZE %Ld,append)", tableName, columnName,(Int64)lobDataBuf, lobUpdateLen);
+  str_sprintf(query,"update %s set %s=buffertolob (LOCATION %ld, SIZE %ld,append)", tableName, columnName,(Int64)lobDataBuf, lobUpdateLen);
  
  
   retcode = cliInterface.executeImmediate(query);
@@ -288,7 +288,7 @@ Int32 updateBufferToLobHandle(CliGlobals *cliglob,char *handle)
   Int64 lobUpdateLen = 20;
   char *lobDataBuf = new char[lobUpdateLen];
   memcpy(lobDataBuf, "zzzzzzzzzzzzzzzzzzzz",20);
-  str_sprintf(query,"update lob (LOB '%s' , LOCATION %Ld, SIZE %Ld)", handle, (Int64)lobDataBuf, lobUpdateLen);
+  str_sprintf(query,"update lob (LOB '%s' , LOCATION %ld, SIZE %ld)", handle, (Int64)lobDataBuf, lobUpdateLen);
  
  
   retcode = cliInterface.executeImmediate(query);
@@ -321,7 +321,7 @@ Int32 updateAppendBufferToLobHandle(CliGlobals *cliglob,char *handle, Int64 lobU
   Int32 statusBufLen = 0;
   char *lobDataBuf = new char[lobUpdateLen];
   memcpy(lobDataBuf, (char *)sourceAddress,lobUpdateLen);
-  str_sprintf(query,"update lob (LOB '%s' , LOCATION %Ld, SIZE %Ld,append )", handle, (Int64)lobDataBuf, lobUpdateLen);
+  str_sprintf(query,"update lob (LOB '%s' , LOCATION %ld, SIZE %ld,append )", handle, (Int64)lobDataBuf, lobUpdateLen);
  
  
   retcode = cliInterface.executeImmediate(query);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdb.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdb.cpp b/core/sql/comexe/ComTdb.cpp
index 5007e01..5696ce4 100644
--- a/core/sql/comexe/ComTdb.cpp
+++ b/core/sql/comexe/ComTdb.cpp
@@ -228,7 +228,7 @@ void ComTdb::displayContents(Space * space,ULng32 flag)
                   estRowsUsed_, estRowsAccessed_, expressionMode_);
   		space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-  		str_sprintf(buf, "Flag = %b",flags_);
+  		str_sprintf(buf, "Flag = %x",flags_);
   		space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
   		if (firstNRows() >= 0)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbExeUtil.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbExeUtil.cpp b/core/sql/comexe/ComTdbExeUtil.cpp
index b295bc3..35b6112 100644
--- a/core/sql/comexe/ComTdbExeUtil.cpp
+++ b/core/sql/comexe/ComTdbExeUtil.cpp
@@ -786,7 +786,7 @@ void ComTdbExeUtilLoadVolatileTable::displayContents(Space * space,ULng32 flag)
 	  space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 	}
 
-      str_sprintf(buf,"Threshold = %Ld ", threshold_);
+      str_sprintf(buf,"Threshold = %ld ", threshold_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
     }
@@ -1626,7 +1626,7 @@ void ComTdbExeUtilGetUID::displayContents(Space * space,ULng32 flag)
       str_sprintf(buf, "\nFor ComTdbExeUtilGetUID :");
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
       
-      str_sprintf(buf,"UID = %LD", uid_);
+      str_sprintf(buf,"UID = %ld", uid_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     }
   
@@ -1802,7 +1802,7 @@ void ComTdbExeUtilPopulateInMemStats::displayContents(Space * space,ULng32 flag)
       str_sprintf(buf, "\nFor ComTdbExeUtilPopulateInMemStats :");
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
       
-      str_sprintf(buf,"UID = %LD", uid_);
+      str_sprintf(buf,"UID = %ld", uid_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
       if ((char *)inMemHistogramsTableName_ != (char *)NULL)
@@ -2146,7 +2146,7 @@ void ComTdbExeUtilGetMetadataInfo::displayContents(Space * space,ULng32 flag)
 	  space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 	}
 
-      str_sprintf(buf, "Flags = %b",flags_);
+      str_sprintf(buf, "Flags = %x",flags_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
     }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbExeUtil.h
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbExeUtil.h b/core/sql/comexe/ComTdbExeUtil.h
index 884a7d9..426622d 100644
--- a/core/sql/comexe/ComTdbExeUtil.h
+++ b/core/sql/comexe/ComTdbExeUtil.h
@@ -1691,7 +1691,7 @@ public:
     return hdfsPort_;
   }
 
-  Lng32 getModTS() const
+  Int64 getModTS() const
   {
     return modTS_;
   }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbFastTransport.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbFastTransport.cpp b/core/sql/comexe/ComTdbFastTransport.cpp
index bca4d32..49d830e 100644
--- a/core/sql/comexe/ComTdbFastTransport.cpp
+++ b/core/sql/comexe/ComTdbFastTransport.cpp
@@ -160,7 +160,7 @@ void ComTdbFastExtract::displayContents(Space *space, ULng32 flag)
 
     Lng32 lowFlags = (Lng32) (flags_ % 65536);
     Lng32 highFlags = (Lng32) ((flags_ - lowFlags) / 65536);
-    str_sprintf(buf, "flags = %b%b", highFlags, lowFlags);
+    str_sprintf(buf, "flags = %x%x", highFlags, lowFlags);
     space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz);
 
     str_sprintf(buf, "requestRowLength = %d ", requestRowLen_);
@@ -220,7 +220,7 @@ void ComTdbFastExtract::displayContents(Space *space, ULng32 flag)
    str_sprintf(buf,"numIOBuffers = %d", numIOBuffers_);
    space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(UInt16));
 
-   str_sprintf(buf, "modTSforDir_ = %Ld", modTSforDir_);
+   str_sprintf(buf, "modTSforDir_ = %ld", modTSforDir_);
    space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
    
   } // if (flag & 0x00000008)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbFirstN.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbFirstN.cpp b/core/sql/comexe/ComTdbFirstN.cpp
index 2d752cd..a6050a4 100644
--- a/core/sql/comexe/ComTdbFirstN.cpp
+++ b/core/sql/comexe/ComTdbFirstN.cpp
@@ -113,7 +113,7 @@ void ComTdbFirstN::displayContents(Space * space,ULng32 flag)
       str_sprintf(buf, "\nFor ComTdbFirstN :");
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
       
-      str_sprintf(buf,"firstNRows = %d", firstNRows_);
+      str_sprintf(buf,"firstNRows = %ld", firstNRows_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     }
   

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbHashj.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbHashj.cpp b/core/sql/comexe/ComTdbHashj.cpp
index 2c8e2b8..2d3ba8a 100644
--- a/core/sql/comexe/ComTdbHashj.cpp
+++ b/core/sql/comexe/ComTdbHashj.cpp
@@ -329,7 +329,7 @@ void ComTdbHashj::displayContents(Space * space,ULng32 flag)
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
       str_sprintf(buf,
-		  "hjFlags = %b, isSemiJoin = %d, isLeftJoin = %d, isRightJoin = %d",
+		  "hjFlags = %x, isSemiJoin = %d, isLeftJoin = %d, isRightJoin = %d",
 		  hjFlags_,isSemiJoin(),isLeftJoin(),isRightJoin());
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbHbaseAccess.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbHbaseAccess.cpp b/core/sql/comexe/ComTdbHbaseAccess.cpp
index 1e81d86..272fba6 100644
--- a/core/sql/comexe/ComTdbHbaseAccess.cpp
+++ b/core/sql/comexe/ComTdbHbaseAccess.cpp
@@ -680,7 +680,7 @@ static void showColNames(Queue * listOfColNames, Space * space)
       else
 	v = 0;
       
-      str_sprintf(buf, "  Entry #%d: %s%s%Ld",
+      str_sprintf(buf, "  Entry #%d: %s%s%ld",
 		  j+1, 
 		  colFam, 
 		  (withAt ? "@" : ""),
@@ -964,7 +964,7 @@ void ComTdbHbaseAccess::displayContents(Space * space,ULng32 flag)
 		  mergeInsertRowLen_, keyLen_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-      str_sprintf(buf, "Flag = %b",flags_);
+      str_sprintf(buf, "Flag = %x",flags_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
       str_sprintf(buf, "server_ = %s, zkPort_ = %s", server(), zkPort());
@@ -1060,7 +1060,7 @@ void ComTdbHbaseAccess::displayContents(Space * space,ULng32 flag)
 		    } // for
 		} // if colNames
 
-	      str_sprintf(buf, "\n    colTS_=%Ld",
+	      str_sprintf(buf, "\n    colTS_=%ld",
 			  hsr->colTS_);
 	      space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
@@ -1124,7 +1124,7 @@ void ComTdbHbaseAccess::displayContents(Space * space,ULng32 flag)
 		    } // for
 		} // if
 
-	      str_sprintf(buf, "\n    colTS_=%Ld",
+	      str_sprintf(buf, "\n    colTS_=%ld",
 			  hgr->colTS_);
 	      space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbHdfsScan.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbHdfsScan.cpp b/core/sql/comexe/ComTdbHdfsScan.cpp
index 6e559fe..a0bf5c1 100755
--- a/core/sql/comexe/ComTdbHdfsScan.cpp
+++ b/core/sql/comexe/ComTdbHdfsScan.cpp
@@ -228,8 +228,8 @@ void ComTdbHdfsScan::displayContents(Space * space,ULng32 flag)
                          recordDelimiter_ ,  columnDelimiter_ );
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-      str_sprintf(buf, "hdfsBufSize_ = %d, rangeTailIOSize_ = %d, "
-                       "hdfsSqlMaxRecLen_ = %d",
+      str_sprintf(buf, "hdfsBufSize_ = %ld, rangeTailIOSize_ = %d, "
+                       "hdfsSqlMaxRecLen_ = %ld",
                         hdfsBufSize_ ,  rangeTailIOSize_, hdfsSqlMaxRecLen_ );
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
@@ -237,11 +237,11 @@ void ComTdbHdfsScan::displayContents(Space * space,ULng32 flag)
                           tuppIndex_ ,      workAtpIndex_ );
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-      str_sprintf(buf, "asciiTuppIndex_ = %d, asciiRowLen_ = %d",
+      str_sprintf(buf, "asciiTuppIndex_ = %d, asciiRowLen_ = %ld",
                           asciiTuppIndex_ ,      asciiRowLen_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-      str_sprintf(buf, "moveExprColsTuppIndex_ = %d, moveExprColsRowLength_ = %d",
+      str_sprintf(buf, "moveExprColsTuppIndex_ = %d, moveExprColsRowLength_ = %ld",
                           moveExprColsTuppIndex_ ,      moveExprColsRowLength_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
@@ -253,10 +253,10 @@ void ComTdbHdfsScan::displayContents(Space * space,ULng32 flag)
           space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
         }
 
-      str_sprintf(buf, "outputRowLength_ = %d", outputRowLength_);
+      str_sprintf(buf, "outputRowLength_ = %ld", outputRowLength_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-      str_sprintf(buf, "Flag = %b",flags_);
+      str_sprintf(buf, "Flag = %x",flags_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
       Queue *hdfsFileInfoList = hdfsFileInfoList_;
@@ -411,7 +411,7 @@ void ComTdbHdfsScan::displayContents(Space * space,ULng32 flag)
 
               str_sprintf(
                    buf, 
-		   "%6d %6d %12Ld %12Ld  %s %s",
+		   "%6d %6d %12ld %12ld  %s %s",
                    currInstNum,
                    currEntryNum,
                    hdfo->getStartOffset(),
@@ -426,7 +426,7 @@ void ComTdbHdfsScan::displayContents(Space * space,ULng32 flag)
               currEntryNum++;
             }
 
-          str_sprintf(buf, "\nSummary of bytes read per ESP (%Ld = 100 percent):\n",
+          str_sprintf(buf, "\nSummary of bytes read per ESP (%ld = 100 percent):\n",
                       totalBytes);
           space->allocateAndCopyToAlignedSpace(buf, str_len(buf),
                                                sizeof(short));
@@ -438,7 +438,7 @@ void ComTdbHdfsScan::displayContents(Space * space,ULng32 flag)
 
           for (Int32 e=0; e<numESPs; e++)
             {
-              str_sprintf(buf,"ESP %4d reads %18Ld bytes (%4d percent of avg)",
+              str_sprintf(buf,"ESP %4d reads %18ld bytes (%4ld percent of avg)",
                           e,
                           bytesPerESP[e],
                           (Int32) 100 * bytesPerESP[e] * numESPs / totalBytes);
@@ -449,10 +449,10 @@ void ComTdbHdfsScan::displayContents(Space * space,ULng32 flag)
 
       if (hdfsRootDir_)
         {
-          str_sprintf(buf, "hdfsRootDir: %s", hdfsRootDir_);
+          str_sprintf(buf, "hdfsRootDir: %s", hdfsRootDir());
           space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-          str_sprintf(buf, "modTSforDir_ = %Ld, numOfPartCols_ = %d",
+          str_sprintf(buf, "modTSforDir_ = %ld, numOfPartCols_ = %d",
                       modTSforDir_, numOfPartCols_);
           space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbHdfsScan.h
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbHdfsScan.h b/core/sql/comexe/ComTdbHdfsScan.h
index 9628d06..1d65bca 100755
--- a/core/sql/comexe/ComTdbHdfsScan.h
+++ b/core/sql/comexe/ComTdbHdfsScan.h
@@ -349,6 +349,8 @@ public:
   }
 
   Queue * hdfsDirsToCheck() { return hdfsDirsToCheck_; }
+ 
+  char *hdfsRootDir() { return hdfsRootDir_; }
 };
 
 inline ComTdb * ComTdbHdfsScan::getChildTdb()

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbMj.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbMj.cpp b/core/sql/comexe/ComTdbMj.cpp
index 81f93b8..6be4d5d 100644
--- a/core/sql/comexe/ComTdbMj.cpp
+++ b/core/sql/comexe/ComTdbMj.cpp
@@ -189,7 +189,7 @@ void ComTdbMj::displayContents(Space * space,ULng32 flag)
   if (flag & 0x00000008)
     {
       char buf[100];
-      str_sprintf(buf, "\nFor ComTdbMj :\nFlags = %b, ljRecLen = %d, rightDupRecLen = %d ",
+      str_sprintf(buf, "\nFor ComTdbMj :\nFlags = %x, ljRecLen = %d, rightDupRecLen = %d ",
 		  flags_, ljRecLen_, rightDupRecLen_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbOnlj.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbOnlj.cpp b/core/sql/comexe/ComTdbOnlj.cpp
index 9fa2d44..d747f6a 100644
--- a/core/sql/comexe/ComTdbOnlj.cpp
+++ b/core/sql/comexe/ComTdbOnlj.cpp
@@ -220,7 +220,7 @@ void ComTdbOnlj::displayContents(Space * space,ULng32 flag)
       if(flag & 0x00000008)
         {
 		      char buf[100];
-	   		str_sprintf(buf, "\nFor ComTdbOnlj :\nFlags = %b, ljRecLen = %d, instantiatedRowAtpIndex = %d ",
+	   		str_sprintf(buf, "\nFor ComTdbOnlj :\nFlags = %x, ljRecLen = %d, instantiatedRowAtpIndex = %d ",
       						flags_, ljRecLen_, instantiatedRowAtpIndex_);
 		      space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
         }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbProbeCache.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbProbeCache.cpp b/core/sql/comexe/ComTdbProbeCache.cpp
index e9bee80..2bc0e41 100644
--- a/core/sql/comexe/ComTdbProbeCache.cpp
+++ b/core/sql/comexe/ComTdbProbeCache.cpp
@@ -118,7 +118,7 @@ void ComTdbProbeCache::displayContents(Space * space,ULng32 flag)
         probeLen_,      cacheSize_,      recLen_,      tuppIndex_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
       str_sprintf(buf, 
-       "probeCacheFlags_ = %b, numInnerTuples_ =%d", 
+       "probeCacheFlags_ = %x, numInnerTuples_ =%d", 
         probeCacheFlags_,      numInnerTuples_ );
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbRoot.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbRoot.cpp b/core/sql/comexe/ComTdbRoot.cpp
index c77471e..6c0d6cf 100644
--- a/core/sql/comexe/ComTdbRoot.cpp
+++ b/core/sql/comexe/ComTdbRoot.cpp
@@ -442,7 +442,7 @@ void ComTdbRoot::displayContents(Space * space,ULng32 flag)
   if(flag & 0x00000008)
     {
       char buf[1000];
-      str_sprintf(buf, "\nFor ComTdbRoot :\nFirstNRows = %d, baseTablenamePosition = %d ",
+      str_sprintf(buf, "\nFor ComTdbRoot :\nFirstNRows = %ld, baseTablenamePosition = %d ",
 		  firstNRows_,baseTablenamePosition_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
       str_sprintf(buf, "queryType_ = %d, planVersion_ = %d ",
@@ -451,25 +451,25 @@ void ComTdbRoot::displayContents(Space * space,ULng32 flag)
       
       UInt32 lFlags = rtFlags1_%65536;
       UInt32 hFlags = (rtFlags1_- lFlags)/65536;
-      str_sprintf(buf,"rtFlags1_ = %b%b ",hFlags,lFlags);
+      str_sprintf(buf,"rtFlags1_ = %x%x ",hFlags,lFlags);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
       lFlags = rtFlags2_%65536;
       hFlags = (rtFlags2_- lFlags)/65536;
-      str_sprintf(buf,"rtFlags2_ = %b%b ",hFlags,lFlags);
+      str_sprintf(buf,"rtFlags2_ = %x%x ",hFlags,lFlags);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-      str_sprintf(buf,"rtFlags3_ = %b ", rtFlags3_);
+      str_sprintf(buf,"rtFlags3_ = %x ", rtFlags3_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
       lFlags = rtFlags4_%65536;
       hFlags = (rtFlags4_- lFlags)/65536;
-      str_sprintf(buf,"rtFlags4_ = %b%b ",hFlags,lFlags);
+      str_sprintf(buf,"rtFlags4_ = %x%x ",hFlags,lFlags);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
       lFlags = rtFlags5_%65536;
       hFlags = (rtFlags5_- lFlags)/65536;
-      str_sprintf(buf,"rtFlags5_ = %b%b ",hFlags,lFlags);
+      str_sprintf(buf,"rtFlags5_ = %x%x ",hFlags,lFlags);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
       str_sprintf(buf, "queryType_ = %d", (Int32) queryType_);
@@ -486,7 +486,7 @@ void ComTdbRoot::displayContents(Space * space,ULng32 flag)
 
       if (compoundStmtsInfo_ != 0)
 	{
-	  str_sprintf(buf,"compoundStmtsInfo_ = %b ",compoundStmtsInfo_);
+	  str_sprintf(buf,"compoundStmtsInfo_ = %x ",compoundStmtsInfo_);
 	  space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 	}
 
@@ -540,7 +540,7 @@ void ComTdbRoot::displayContents(Space * space,ULng32 flag)
 		      getRWRSInfo()->rwrsMaxInternalRowlen_);
 	  space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 	  
-	  str_sprintf(buf,"flags_ = %b ", getRWRSInfo()->flags_);
+	  str_sprintf(buf,"flags_ = %x ", getRWRSInfo()->flags_);
 	  space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbSendBottom.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbSendBottom.cpp b/core/sql/comexe/ComTdbSendBottom.cpp
index f63ef85..1e2ebbd 100644
--- a/core/sql/comexe/ComTdbSendBottom.cpp
+++ b/core/sql/comexe/ComTdbSendBottom.cpp
@@ -152,7 +152,7 @@ void ComTdbSendBottom::displayContents(Space *space, ULng32 flag)
     str_sprintf(buf, "\nFor ComTdbSendBottom :");
     space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     
-    str_sprintf(buf, "sendBottomFlags_ = %b", (Lng32) sendBottomFlags_);
+    str_sprintf(buf, "sendBottomFlags_ = %x", (Lng32) sendBottomFlags_);
     space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
     str_sprintf(buf, "downRecordLength_ = %d, upRecordLength_ = %d",

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbSendTop.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbSendTop.cpp b/core/sql/comexe/ComTdbSendTop.cpp
index 67f3b94..5508832 100644
--- a/core/sql/comexe/ComTdbSendTop.cpp
+++ b/core/sql/comexe/ComTdbSendTop.cpp
@@ -206,7 +206,7 @@ void ComTdbSendTop::displayContents(Space *space, ULng32 flag)
     str_sprintf(buf, "\nFor ComTdbSendTop :");
     space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     
-    str_sprintf(buf, "childFragId_ = %d, sendTopFlags_ = %b",
+    str_sprintf(buf, "childFragId_ = %d, sendTopFlags_ = %x",
                 (Lng32) childFragId_, (Lng32) sendTopFlags_);
     space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbSequence.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbSequence.cpp b/core/sql/comexe/ComTdbSequence.cpp
index 37b4d89..7f727a1 100644
--- a/core/sql/comexe/ComTdbSequence.cpp
+++ b/core/sql/comexe/ComTdbSequence.cpp
@@ -146,7 +146,7 @@ void ComTdbSequence::displayContents(Space * space,ULng32 flag)
       str_sprintf(buf, "\nFor ComTdbSequence :");
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
       
-      str_sprintf(buf,"recLen_ = %d, maxHistoryRows_ = %d, OLAPFlags_ = %b %s",
+      str_sprintf(buf,"recLen_ = %d, maxHistoryRows_ = %d, OLAPFlags_ = %x %s",
 		  recLen_, maxHistoryRows_, OLAPFlags_,
 		  isUnboundedFollowing() ? ", UNBOUNDED_FOLLOWING" : "");
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbSort.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbSort.cpp b/core/sql/comexe/ComTdbSort.cpp
index 4ca4e45..72763b2 100644
--- a/core/sql/comexe/ComTdbSort.cpp
+++ b/core/sql/comexe/ComTdbSort.cpp
@@ -136,7 +136,7 @@ void ComTdbSort::displayContents(Space * space,ULng32 flag)
             space->allocateAndCopyToAlignedSpace(buf, str_len(buf),
                                                     sizeof(short));
 
-            str_sprintf(buf,"Flags = %b, sortRecLen = %d, sortKeyLen = %d",
+            str_sprintf(buf,"Flags = %x, sortRecLen = %d, sortKeyLen = %d",
 		      	  flags_,sortRecLen_,sortKeyLen_);
             space->allocateAndCopyToAlignedSpace(buf, str_len(buf),
                                                     sizeof(short));
@@ -180,7 +180,7 @@ void SortOptions::displayContents(Space *space)
    							sortNRows_,sortType_,internalSort_);
    space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-   str_sprintf(buf,"Sort Option Flags = %b", flags_);
+   str_sprintf(buf,"Sort Option Flags = %x", flags_);
    space->allocateAndCopyToAlignedSpace(buf, str_len(buf),sizeof(short));
    
    str_sprintf(buf, "sortMaxHeapSizeMB = %d, scratchFreeSpaceThreshold = %d",

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbSortGrby.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbSortGrby.cpp b/core/sql/comexe/ComTdbSortGrby.cpp
index f3932d1..aa6204d 100644
--- a/core/sql/comexe/ComTdbSortGrby.cpp
+++ b/core/sql/comexe/ComTdbSortGrby.cpp
@@ -126,7 +126,7 @@ void ComTdbSortGrby::displayContents(Space * space,ULng32 flag)
       if(flag & 0x00000008)
         {
 	  			char buf[100];
-			   str_sprintf(buf, "\nFor ComTdbSortGrby :\nFlags = %b, recLen = %d ",flags_,recLen_ );
+			   str_sprintf(buf, "\nFor ComTdbSortGrby :\nFlags = %x, recLen = %d ",flags_,recLen_ );
       		space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbSplitBottom.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbSplitBottom.cpp b/core/sql/comexe/ComTdbSplitBottom.cpp
index a7ed2b1..1123360 100644
--- a/core/sql/comexe/ComTdbSplitBottom.cpp
+++ b/core/sql/comexe/ComTdbSplitBottom.cpp
@@ -176,7 +176,7 @@ void ComTdbSplitBottom::displayContents(Space * space,ULng32 flag)
     str_sprintf(buf, "\nFor ComTdbSplitBottom :");
     space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     
-    str_sprintf(buf, "splitBottomFlags_ = %b", (Lng32) splitBottomFlags_);
+    str_sprintf(buf, "splitBottomFlags_ = %x", (Lng32) splitBottomFlags_);
     space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     
     str_sprintf(buf, "topNumESPs = %d, bottomNumESPs = %d", 
@@ -222,7 +222,7 @@ void ComTdbSplitBottom::displayContents(Space * space,ULng32 flag)
       
       while (numTriads > 0)
       {
-        str_sprintf(buf, "%23Ld %23Ld %23Ld", 
+        str_sprintf(buf, "%23ld %23ld %23ld", 
                     skewInfo_->getSkewHashValues()[i],
                     skewInfo_->getSkewHashValues()[i+1],
                     skewInfo_->getSkewHashValues()[i+2]);
@@ -235,7 +235,7 @@ void ComTdbSplitBottom::displayContents(Space * space,ULng32 flag)
       // Now do the final line: 1 or 2 values.
       if (numLeftovers == 2)
       {
-        str_sprintf(buf, "%23Ld %23Ld", 
+        str_sprintf(buf, "%23ld %23ld", 
                     skewInfo_->getSkewHashValues()[i],
                     skewInfo_->getSkewHashValues()[i+1]);
         space->allocateAndCopyToAlignedSpace(buf, str_len(buf), 
@@ -243,7 +243,7 @@ void ComTdbSplitBottom::displayContents(Space * space,ULng32 flag)
       }
       else if (numLeftovers == 1)
       {
-        str_sprintf(buf, "%23Ld", 
+        str_sprintf(buf, "%23ld", 
                     skewInfo_->getSkewHashValues()[i]);
         space->allocateAndCopyToAlignedSpace(buf, str_len(buf), 
                                              sizeof(short));

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbSplitTop.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbSplitTop.cpp b/core/sql/comexe/ComTdbSplitTop.cpp
index 730b67a..b29433f 100644
--- a/core/sql/comexe/ComTdbSplitTop.cpp
+++ b/core/sql/comexe/ComTdbSplitTop.cpp
@@ -177,10 +177,10 @@ void ComTdbSplitTop::displayContents(Space *space, ULng32 flag)
   {
     char buf[256];
     
-    str_sprintf(buf, "\nFor ComTdbSplitTop :\nFlags = %b ",flags_);
+    str_sprintf(buf, "\nFor ComTdbSplitTop :\nFlags = %x ",flags_);
     space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     
-    str_sprintf(buf, "splitTopFlags_ = %b", (Lng32) splitTopFlags_);
+    str_sprintf(buf, "splitTopFlags_ = %x", (Lng32) splitTopFlags_);
     space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
     str_sprintf(buf, "bottomNumParts_ = %d", (Int32) bottomNumParts_);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbTupleFlow.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbTupleFlow.cpp b/core/sql/comexe/ComTdbTupleFlow.cpp
index 42641f9..d0120f5 100644
--- a/core/sql/comexe/ComTdbTupleFlow.cpp
+++ b/core/sql/comexe/ComTdbTupleFlow.cpp
@@ -141,7 +141,7 @@ void ComTdbTupleFlow::displayContents(Space * space,ULng32 flag)
 #pragma nowarn(1506)   // warning elimination 
 		      Lng32 hFlags = (flags_- lFlags)/65536;
 #pragma warn(1506)  // warning elimination 
- 	   		str_sprintf(buf, "\nFor ComTdbTupleFlow :\nFlags = %b%b ",hFlags,lFlags );
+ 	   		str_sprintf(buf, "\nFor ComTdbTupleFlow :\nFlags = %x%x ",hFlags,lFlags );
 		      space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbUdr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbUdr.cpp b/core/sql/comexe/ComTdbUdr.cpp
index d602de0..e3b79f0 100644
--- a/core/sql/comexe/ComTdbUdr.cpp
+++ b/core/sql/comexe/ComTdbUdr.cpp
@@ -269,7 +269,7 @@ void ComTdbUdr::displayContents(Space *space, ULng32 flag)
 
     Lng32 lowFlags = (Lng32) (flags_ % 65536);
     Lng32 highFlags = (Lng32) ((flags_ - lowFlags) / 65536);
-    str_sprintf(buf, "flags = %b%b", highFlags, lowFlags);
+    str_sprintf(buf, "flags = %x%x", highFlags, lowFlags);
     space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz);
 
     if (sqlName_)
@@ -393,7 +393,7 @@ void ComTdbUdr::displayContents(Space *space, ULng32 flag)
       str_sprintf(buf, "  name [%s]", p->getParamName());
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz);
 
-      str_sprintf(buf, "  flags %b, type %d", p->getFlags(),
+      str_sprintf(buf, "  flags %x, type %d", p->getFlags(),
                   (Int32) p->getType());
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sz);
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbUnPackRows.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbUnPackRows.cpp b/core/sql/comexe/ComTdbUnPackRows.cpp
index c2218fe..fe49efa 100644
--- a/core/sql/comexe/ComTdbUnPackRows.cpp
+++ b/core/sql/comexe/ComTdbUnPackRows.cpp
@@ -298,7 +298,7 @@ void ComTdbUnPackRows::displayContents(Space * space,ULng32 flag)
 	  space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 	}
 
-      str_sprintf(buf,"flags_ = %b", flags_);
+      str_sprintf(buf,"flags_ = %x", flags_);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     }
   

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/comexe/ComTdbUnion.cpp
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdbUnion.cpp b/core/sql/comexe/ComTdbUnion.cpp
index 8b123c8..490afb6 100644
--- a/core/sql/comexe/ComTdbUnion.cpp
+++ b/core/sql/comexe/ComTdbUnion.cpp
@@ -232,7 +232,7 @@ void ComTdbUnion::displayContents(Space * space,ULng32 flag)
       if(flag & 0x00000008)
         {
 		      char buf[100];
-	   		str_sprintf(buf, "\nFor ComTdbUnion :\nFlags = %b, unionReclen = %d ",
+	   		str_sprintf(buf, "\nFor ComTdbUnion :\nFlags = %x, unionReclen = %d ",
       						flags_,unionReclen_);
 		      space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
         }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/common/ComSqlId.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/ComSqlId.cpp b/core/sql/common/ComSqlId.cpp
index 9be694b..881a2bc 100644
--- a/core/sql/common/ComSqlId.cpp
+++ b/core/sql/common/ComSqlId.cpp
@@ -65,7 +65,7 @@ Lng32 ComSqlId::createSqlSessionId
   // The format of current session id is:
   //  MXID<version><segment><cpu><pin><processStartTS><sessNum><unLen><userName><snLen><sessionName>
   str_sprintf
-    (sessionId, "%s%02d%03d%06d%018Ld%010d%02d%s%02d%s",
+    (sessionId, "%s%02d%03d%06d%018ld%010d%02d%s%02d%s",
      COM_SESSION_ID_PREFIX,
      SQ_SQL_ID_VERSION,
      nodeNumber,                      // 3 digits
@@ -105,7 +105,7 @@ Lng32 ComSqlId::createSqlQueryId
   // number of digits delimited by underscores. 
   // Ex, queryNum of 12 will be store as _12_
   //
-  str_sprintf(queryId, "%s_%Ld_",
+  str_sprintf(queryId, "%s_%ld_",
 	      sessionId,
 	      queryUniqueNum
 	      );

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/common/ComViewColUsage.h
----------------------------------------------------------------------
diff --git a/core/sql/common/ComViewColUsage.h b/core/sql/common/ComViewColUsage.h
index 1ec12c6..0f62e9e 100644
--- a/core/sql/common/ComViewColUsage.h
+++ b/core/sql/common/ComViewColUsage.h
@@ -91,7 +91,7 @@ public:
       // usage contains 2 int64 and 3 int32, 200 chars is big enough to hold 
       // the string representation
       char buf[200];
-      str_sprintf(buf, "viewUID: %Ld viewCol: %d refUID: %Ld refCol: %d refType: %d;",
+      str_sprintf(buf, "viewUID: %ld viewCol: %d refUID: %ld refCol: %d refType: %d;",
                   viewUID_, viewColNumber_,
                   refdUID_, refdColNumber_, refdObjectType_);
       viewColUsageStr = buf;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/common/IpcGuardian.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/IpcGuardian.cpp b/core/sql/common/IpcGuardian.cpp
index 89e968f..9cb4284 100644
--- a/core/sql/common/IpcGuardian.cpp
+++ b/core/sql/common/IpcGuardian.cpp
@@ -965,7 +965,7 @@ void GuaConnectionToServer::openRetryCleanup()
        , seqNum
        );
     str_sprintf(msgBuf,
-      "GuaConnectionToServer: BFILE_OPEN %d,%d,%Ld "
+      "GuaConnectionToServer: BFILE_OPEN %d,%d,%ld "
       "error 14 retry count = %d\n", cpu, pin, seqNum, getOpenRetries());
     SQLMXLoggingArea::logExecRtInfo(__FILE__, __LINE__, msgBuf, 0);
      setOpenRetries(0);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/common/str.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/str.cpp b/core/sql/common/str.cpp
index bcb9d36..41a5a0b 100644
--- a/core/sql/common/str.cpp
+++ b/core/sql/common/str.cpp
@@ -517,297 +517,6 @@ void str_complement(const ULng32 length, char * s)
 #pragma warn(1506)  // warning elimination
 }
 
-Int32 str_sprintf(char * buffer, const char * format, ...)
-{
-  va_list ap;
-  va_start(ap, format);
-
-  enum State {INITIAL, PERC_SEEN, NUMBER_SEEN,
-//NA_LINUX	      PERC_PERC, PERC_D, PERC_D64, PERC_S, PERC_F, PERC_B, ERROR};
-	      PERC_PERC, PERC_D, PERC_D64, PERC_S, PERC_F, PERC_B, PERC_ERROR};
-
-  State state = INITIAL;
-
-  Lng32 formatLen = str_len(format);
-  Int32 i = 0;
-  Int32 j = 0;
-  Lng32 width = -1;
-  NABoolean zeroPad = FALSE;
-  NABoolean leadingMinusSeen = FALSE;
-  Int64 d = 0; // used for "f" and "Ld" formats
-
-  while (i < formatLen)
-    {
-      switch (state)
-	{
-	case INITIAL:
-	  {
-	    if (format[i] == '%')
-	      state = PERC_SEEN;
-	    else
-	      {
-		buffer[j] = format[i];
-		j++;
-	      }
-	    i++;
-	  }
-	break;
-
-	case NUMBER_SEEN:
-	  {
-	    if ((format[i] >= '0') && (format[i] <= '9'))
-	      {
-		width = width*10 + format[i] - '0';
-		i++;
-	      }
-	    else
-	      state = PERC_SEEN;
-	  }
-	break;
-
-	case PERC_SEEN:
-	  {
-	    if (format[i] == '%')
-	      state = PERC_PERC;
-	    else if ((format[i] == 'd') || (format[i] == 'u'))
-	      state = PERC_D;
-	    else if ((format[i] == 'L') && (format[i+1] == 'd'))
-	      state = PERC_D64;
-	    else if (format[i] == 's')
-	      state = PERC_S;
-	    else if (format[i] == 'b')
-	      state = PERC_B;
-	    else if (format[i] == 'f')
-	      state = PERC_F;
-	    else if (format[i] == '-')
-	      {
-		leadingMinusSeen = TRUE;
-		state = PERC_SEEN;
-		i++;
-	      }
-	    else if (format[i] >= '0' && format[i] <= '9')
-	      {
-		state = NUMBER_SEEN;
-		width = 0;
-
-		if (format[i] == '0')
-		  zeroPad = TRUE;
-		else
-		  zeroPad = FALSE;
-	      }
-	    else
-	      state = PERC_ERROR;
-	  }
-	break;
-
-	case PERC_PERC:
-	  {
-	    buffer[j] = format[i];
-	    j++;
-	    i++;
-	    state = INITIAL;
-	  }
-	break;
-
-	case PERC_D:
-	  {
-	    Lng32 d = va_arg(ap, Lng32);
-            NABoolean maxNegative = (d == 0x80000000); // i.e. -2147483648
-	    if (d < 0)
-	      {
-		buffer[j] = '-';
-		j++;
-                if (!maxNegative) // guard against trap on negation
-		  d = -d;
-                width--;
-	      }
-
-	    if (width > 0)
-	      {
-		char temp[20];
-                if (maxNegative)
-                  {
-                    strcpy(temp,"2147483648");
-                  }
-                else
-                  {
-	            str_itoa(d, temp);
-                  }
-		if (zeroPad)
-		  str_pad(&buffer[j], width, '0');
-		else
-		  str_pad(&buffer[j], width, ' ');
-	 Int32 l = str_len(temp);
-
-		// truncate string if l is greater than width
-                if (l > width)
-		  { l = width; }
-		if ((leadingMinusSeen) && (NOT zeroPad))// left align
-		  str_cpy_all(&buffer[j], temp, l);
-		else
-		  str_cpy_all(&buffer[j+(width-l)], temp, l);
-		buffer[j+width] = 0;
-		width = 0;
-		zeroPad = FALSE;
-	      }
-	    else
-              {
-              if (maxNegative)
-                {
-                  strcpy(&buffer[j],"2147483648");
-                }
-              else
-                {
-	          str_itoa(d, &buffer[j]);
-                }
-              }
-	    j = str_len(buffer);
-	    i++;
-	    state = INITIAL;
-	  }
-	break;
-
-	case PERC_F:
-	  {
-	    double dd = va_arg(ap, double);
-
-	    if (dd > LLONG_MAX)
-	      d = LLONG_MAX;
-	    else if (dd < LLONG_MIN)
-	      d = LLONG_MIN;
-	    else
-	      d = (Int64) dd;
-	  }
-	// fall through to the next case
-
-	case PERC_D64:
-	  {
-	    if (state == PERC_D64)
-              {
-	        d = va_arg(ap, Int64);
-                i++; // 2 format characters, "Ld"
-              }
-	    const Int32 tempStrW = 20;
-	    char      temp[tempStrW];
-	    Int32       numDigits=0;
-	    if (d < 0)
-	      {
-		buffer[j] = '-';
-		j++;
-		d = -d;
-                width--;
-	      }
-
-	    // convert argument to a string, right-aligned in temp array
-	    do
-	      {
-#pragma nowarn(1506)   // warning elimination
-		temp[tempStrW - 1 - numDigits] = (char) (d % 10) + '0';
-#pragma warn(1506)  // warning elimination
-		d = d / 10;
-		numDigits++;
-	      }
-	    while (d != 0);
-
-	    // handle limited width strings (unlike printf which treats
-	    // the width argument as a minimum length we treat it as
-	    // the exact length here)
-	    if (width > 0)
-	      {
-		if (numDigits > width)
-		  {
-		    // print overflow characters (unlike printf)
-		    str_pad(&buffer[j], width, '*');
-		    numDigits = 0;
-		  }
-		else
-		  {
-		    if (zeroPad)
-		      str_pad(&buffer[j], width-numDigits, '0');
-		    else
-		      str_pad(&buffer[j], width-numDigits, ' ');
-		    j += width-numDigits;
-		  }
-		width = 0;
-		zeroPad = FALSE;
-	      }
-
-	    str_cpy_all(&buffer[j], &temp[tempStrW-numDigits], numDigits);
-	    j += numDigits;
-	    buffer[j] = 0;
-	    i++;
-	    state = INITIAL;
-	  }
-	break;
-
-	case PERC_S:
-	  {
-	    char * s = va_arg(ap, char *);
-	    Lng32 len = str_len(s);
-
-	    if ((leadingMinusSeen) && 
-		(width > len)) // means blankpad to the left
-	      {
-		str_pad(&buffer[j], width-len, ' ');
-		j += (width - len);
-	      }
-	    str_cpy_all(&buffer[j], s, len);
-	    j = j + len;
-	    if ((NOT leadingMinusSeen) && (width > len))
-	      {
-		str_pad(&buffer[j], width-len, ' ');
-		j += (width - len);
-	      }
-
-	    buffer[j] = 0;
-	    i++;
-	    state = INITIAL;
-	  }
-	break;
-
-	case PERC_B:
-	  {
-	    Lng32 d = va_arg(ap, Lng32);
-	    char tempbuf[17];
-	    for(Int32 k=16;k>0;k--)
-	      {
-		if(d == 0)
-		  {
-		    tempbuf[k-1] = '0';
-		    continue;
-		  }
-		if(d%2)
-		  tempbuf[k-1] = '1';
-		else
-		  tempbuf[k-1] = '0';
-		d = d/2;
-	      }
-	    tempbuf[16] = '\0';
-	    str_cpy_all(&buffer[j],tempbuf,str_len(tempbuf));
-	    j = j + str_len(tempbuf);
-	    i++;
-	    state = INITIAL;
-	  }
-	break;
-
-	case PERC_ERROR:
-	  {
-	    //LCOV_EXCL_START :rfi
-	    assert(0);
-	    return -1;
-	    //LCOV_EXCL_STOP
-	  }
-	break;
-
-	} // switch
-
-    }
-
-  buffer[j] = 0;
-
-  return 0;
-}
-
 // ----------------------------------------------------------------------
 // How many bytes are needed to encode byteLen bytes in ASCII?
 // -----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/common/str.h
----------------------------------------------------------------------
diff --git a/core/sql/common/str.h b/core/sql/common/str.h
index ce8db9a..d6bfab0 100644
--- a/core/sql/common/str.h
+++ b/core/sql/common/str.h
@@ -310,6 +310,7 @@ void str_complement(const ULng32 length, char * s);
 // of sprintf as we cannot call C runtime from the SQL executor.
 //------------------------------------------------------------------------
 
+#define str_sprintf sprintf
 Int32 str_sprintf(char *, const char *, ...);
 
 // -----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/executor/ExExeUtilExplain.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilExplain.cpp b/core/sql/executor/ExExeUtilExplain.cpp
index f9ccf73..12107e5 100644
--- a/core/sql/executor/ExExeUtilExplain.cpp
+++ b/core/sql/executor/ExExeUtilExplain.cpp
@@ -1882,7 +1882,7 @@ void ExExeUtilDisplayExplainTcb::DoHeader()
   FormatLongLine("STATEMENT_NAME", statementName_, 14, valSize);
   
   //convert the Int64 to string
-  str_sprintf(outStr, "%Ld", planId_);
+  str_sprintf(outStr, "%ld", planId_);
   FormatLine("PLAN_ID", outStr, 7, (Lng32)str_len(outStr));
   
   // rework cardinality as rows out.  Assume probe count is always 1

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/executor/ExExeUtilGet.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilGet.cpp b/core/sql/executor/ExExeUtilGet.cpp
index b32a35a..f0a8e1c 100644
--- a/core/sql/executor/ExExeUtilGet.cpp
+++ b/core/sql/executor/ExExeUtilGet.cpp
@@ -1721,11 +1721,11 @@ short ExExeUtilGetMetadataInfoTcb::work()
             NAString userQuery;
 
 	    char ausStr[1000];
-	    str_sprintf(ausStr, "");
+            ausStr[0] = '\0';
 	    char catSchValue[ComMAX_2_PART_EXTERNAL_UTF8_NAME_LEN_IN_BYTES+50];
-	    str_sprintf(catSchValue, "");
+            catSchValue[0] = '\0';
 	    char endQuote[10];
-	    str_sprintf(endQuote, "");
+            endQuote[0] = '\0';
 
 	    if (getMItdb().returnFullyQualNames())
 	      {
@@ -3013,7 +3013,7 @@ short ExExeUtilGetMetadataInfoComplexTcb::work()
 
 	case SETUP_QUERY_:
 	  {
-	    str_sprintf(patternStr_, "");
+	    patternStr_[0] = '\0';
 	    if (getMItdb().getPattern())
 	      {
 		str_sprintf(patternStr_, ", match '%s' ",
@@ -3844,9 +3844,8 @@ short ExExeUtilGetMetadataInfoVersionTcb::work()
 	    Int32 sizeOfqs = 0;
 
 	    char predStr[2000];
-	    str_sprintf(predStr, "");
-
-	    str_sprintf(patternStr_, "");
+            predStr[0] = '\0';
+            patternStr_[0] = '\0';
 	    if (getMItdb().getPattern())
 	      {
 		str_sprintf(patternStr_, ", match '%s' ",
@@ -6664,23 +6663,23 @@ short ExExeUtilRegionStatsFormatTcb::work()
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
-            str_sprintf(buf, "  TotalUncompressedSize:   %Ld", statsTotals_->storeFileUncompSize);
+            str_sprintf(buf, "  TotalUncompressedSize:   %ld", statsTotals_->storeFileUncompSize);
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
-           str_sprintf(buf, "  TotalStoreFileSize:      %Ld", statsTotals_->storeFileSize);
+           str_sprintf(buf, "  TotalStoreFileSize:      %ld", statsTotals_->storeFileSize);
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
-            str_sprintf(buf, "  TotalMemStoreSize:       %Ld", statsTotals_->memStoreSize);
+            str_sprintf(buf, "  TotalMemStoreSize:       %ld", statsTotals_->memStoreSize);
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
-            str_sprintf(buf, "  TotalReadRequestsCount:  %Ld", statsTotals_->readRequestsCount);
+            str_sprintf(buf, "  TotalReadRequestsCount:  %ld", statsTotals_->readRequestsCount);
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
-            str_sprintf(buf, "  TotalWriteRequestsCount: %Ld", statsTotals_->writeRequestsCount);
+            str_sprintf(buf, "  TotalWriteRequestsCount: %ld", statsTotals_->writeRequestsCount);
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
@@ -6773,7 +6772,7 @@ short ExExeUtilRegionStatsFormatTcb::work()
 	    short rc = 0;
 
             str_sprintf(buf, "  RegionServer:       %s", 
-                        removeTrailingBlanks(stats_->regionServer, STATS_NAME_MAX_LEN).data(), TRUE);
+                        removeTrailingBlanks(stats_->regionServer, STATS_NAME_MAX_LEN).data());
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
   
@@ -6782,7 +6781,7 @@ short ExExeUtilRegionStatsFormatTcb::work()
 	      return rc;
 
             str_sprintf(buf, "  RegionName:         %s", 
-                        removeTrailingBlanks(stats_->regionName, STATS_REGION_NAME_MAX_LEN).data(), TRUE);
+                        removeTrailingBlanks(stats_->regionName, STATS_REGION_NAME_MAX_LEN).data());
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
             
@@ -6795,31 +6794,31 @@ short ExExeUtilRegionStatsFormatTcb::work()
 	      return rc;
 
             if (stats_->storeFileUncompSize == 0)
-              str_sprintf(buf, "  UncompressedSize:   %Ld (less than 1MB)", stats_->storeFileUncompSize);
+              str_sprintf(buf, "  UncompressedSize:   %ld (less than 1MB)", stats_->storeFileUncompSize);
             else
-              str_sprintf(buf, "  UncompressedSize:   %Ld Bytes", stats_->storeFileUncompSize);
+              str_sprintf(buf, "  UncompressedSize:   %ld Bytes", stats_->storeFileUncompSize);
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
             if (stats_->storeFileSize == 0)
-              str_sprintf(buf, "  StoreFileSize:      %Ld (less than 1MB)", stats_->storeFileSize);
+              str_sprintf(buf, "  StoreFileSize:      %ld (less than 1MB)", stats_->storeFileSize);
             else
-              str_sprintf(buf, "  StoreFileSize:      %Ld Bytes", stats_->storeFileSize);
+              str_sprintf(buf, "  StoreFileSize:      %ld Bytes", stats_->storeFileSize);
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
             if (stats_->memStoreSize == 0)
-              str_sprintf(buf, "  MemStoreSize:       %Ld (less than 1MB)", stats_->memStoreSize);
+              str_sprintf(buf, "  MemStoreSize:       %ld (less than 1MB)", stats_->memStoreSize);
             else
-              str_sprintf(buf, "  MemStoreSize:       %Ld Bytes", stats_->memStoreSize);              
+              str_sprintf(buf, "  MemStoreSize:       %ld Bytes", stats_->memStoreSize);              
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
-            str_sprintf(buf, "  ReadRequestsCount:  %Ld", stats_->readRequestsCount);
+            str_sprintf(buf, "  ReadRequestsCount:  %ld", stats_->readRequestsCount);
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
-            str_sprintf(buf, "  WriteRequestsCount: %Ld", stats_->writeRequestsCount);
+            str_sprintf(buf, "  WriteRequestsCount: %ld", stats_->writeRequestsCount);
 	    if (moveRowToUpQueue(buf, strlen(buf), &rc))
 	      return rc;
 
@@ -7331,7 +7330,7 @@ else
   else
     lobEOD = 0;
   
-  str_sprintf(buf, "  LOB EOD :  %Ld", lobEOD);
+  str_sprintf(buf, "  LOB EOD :  %ld", lobEOD);
   if (moveRowToUpQueue(buf, strlen(buf), &rc))
     return rc;
 
@@ -7354,7 +7353,7 @@ else
       return cliRC;
     }
 
-  str_sprintf(buf, "  LOB Used Len :  %Ld", outlen);
+  str_sprintf(buf, "  LOB Used Len :  %ld", outlen);
   if (moveRowToUpQueue(buf, strlen(buf), &rc))
     return rc;
   return 0;
@@ -7452,7 +7451,7 @@ short ExExeUtilLobInfoTcb::work()
           {
             if (getLItdb().getNumLobs() == 0)
               {
-                str_sprintf(buf, "  Num Lob Columns = 0", tableName_);
+                strcpy(buf, "  Num Lob Columns = 0");
                 if (moveRowToUpQueue(buf, strlen(buf), &rc))
                   return rc;
                 step_ = DONE_;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/executor/ExExeUtilLoad.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilLoad.cpp b/core/sql/executor/ExExeUtilLoad.cpp
index 614adde..57345bf 100644
--- a/core/sql/executor/ExExeUtilLoad.cpp
+++ b/core/sql/executor/ExExeUtilLoad.cpp
@@ -3128,7 +3128,7 @@ short ExExeUtilLobExtractTcb::work()
               {
                 if ((lobTdb().getBufAddr() != -1) && (lobTdb().getBufAddr() != 0))
                   str_cpy_all((char *)lobTdb().getBufAddr(), (char *)&lobDataLen_,sizeof(Int64));
-                str_sprintf(statusString_," LOB Length : %d", lobDataLen_);
+                str_sprintf(statusString_," LOB Length : %ld", lobDataLen_);
                 step_ = RETURN_STATUS_;
                 break;	
               }
@@ -3207,7 +3207,7 @@ short ExExeUtilLobExtractTcb::work()
 		    step_ = HANDLE_ERROR_;
 		    break;
 		  }
-		str_sprintf(statusString_, "Success. Targetfile :%s  Length : %Ld", lobTdb().getFileName(), lobDataOutputLen);
+		str_sprintf(statusString_, "Success. Targetfile :%s  Length : %ld", lobTdb().getFileName(), lobDataOutputLen);
 		step_ = RETURN_STATUS_;
 	      }
 	    else if (lobTdb().getToType() == ComTdbExeUtilLobExtract::TO_BUFFER_)
@@ -3323,7 +3323,7 @@ short ExExeUtilLobExtractTcb::work()
             
             if (lobTdb().getToType() == ComTdbExeUtilLobExtract::TO_BUFFER_)
 	      {
-		str_sprintf(statusString_," Success: LOB data length returned : %d", lobDataOutputLen);
+		str_sprintf(statusString_," Success: LOB data length returned : %ld", lobDataOutputLen);
 	       
 		//lobTdb().setExtractSizeIOAddr((Int64)(&lobDataOutputLen));
 		memcpy((char *)lobTdb().dataExtractSizeIOAddr(), (char *)&lobDataOutputLen,sizeof(Int64));
@@ -3687,7 +3687,7 @@ short ExExeUtilLobUpdateTcb::work()
 	      }  
             if (so == Lob_Buffer)
 	      {
-		str_sprintf(statusString_," Updated/Replaced %d bytes of LOB data ", lobLen);
+		str_sprintf(statusString_," Updated/Replaced %ld bytes of LOB data ", lobLen);
 		step_ = RETURN_STATUS_;
 	      }
             
@@ -3783,7 +3783,7 @@ short ExExeUtilLobUpdateTcb::work()
 	      }  
             if (so == Lob_Buffer)
 	      {
-		str_sprintf(statusString_," Updated/Appended %d bytes of LOB data ", lobLen);
+		str_sprintf(statusString_," Updated/Appended %ld bytes of LOB data ", lobLen);
 		step_ = RETURN_STATUS_;
 	      }
             

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/executor/ExExeUtilMisc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilMisc.cpp b/core/sql/executor/ExExeUtilMisc.cpp
index 7f4ba7a..aed6301 100644
--- a/core/sql/executor/ExExeUtilMisc.cpp
+++ b/core/sql/executor/ExExeUtilMisc.cpp
@@ -1818,14 +1818,14 @@ ExExeUtilPopulateInMemStatsTcb::~ExExeUtilPopulateInMemStatsTcb()
 static const QueryString deleteStatsQuery[] =
 {
   {" delete from %s "},
-  {"  where table_uid = %Ld"}
+  {"  where table_uid = %ld"}
 };
 
 static const QueryString populateHistogramsStatsQuery[] =
 {
   {" insert into %s "},
   {" select  "},
-  {"   %Ld, "},
+  {"   %ld, "},
   {"   histogram_id, "},
   {"   col_position, column_number, colcount, interval_count, rowcount, "},
   {"   total_uec, stats_time, low_value, high_value, read_time, read_count, "},
@@ -1852,7 +1852,7 @@ static const QueryString populateHistintsStatsQuery[] =
 {
   {" insert into %s "},
   {" select  "},
-  {"   %Ld, "},
+  {"   %ld, "},
   {"   histogram_id, "},
   {"   interval_number, interval_rowcount, interval_uec, interval_boundary, "},
   {"   std_dev_of_freq, "},
@@ -2360,7 +2360,7 @@ short ExExeUtilHiveTruncateTcb::work()
         if (cliRC == 1) // data mod check failed
         {
           char errStr[200];
-          str_sprintf(errStr, "genModTS = %Ld, failedModTS = %Ld", 
+          str_sprintf(errStr, "genModTS = %ld, failedModTS = %ld", 
                       htTdb().getModTS(), failedModTS);
           
           ComDiagsArea * diagsArea = NULL;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/executor/ExExplain.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExplain.cpp b/core/sql/executor/ExExplain.cpp
index fb7d4f0..51c3002 100644
--- a/core/sql/executor/ExExplain.cpp
+++ b/core/sql/executor/ExExplain.cpp
@@ -1810,7 +1810,7 @@ short ExExplainTcb::storeExplainInRepos(
     }
 
   queryBuf = new(heap) char[4000];
-  str_sprintf(queryBuf, "update %s.\"%s\".%s set explain_plan = cast(? as varchar(%d) not null) where exec_start_utc_ts = CONVERTTIMESTAMP(%Ld)  and query_id = '%s' ",
+  str_sprintf(queryBuf, "update %s.\"%s\".%s set explain_plan = cast(? as varchar(%d) not null) where exec_start_utc_ts = CONVERTTIMESTAMP(%ld)  and query_id = '%s' ",
               TRAFODION_SYSCAT_LIT, SEABASE_REPOS_SCHEMA, REPOS_METRIC_QUERY_TABLE, 
               REPOS_MAX_EXPLAIN_PLAN_LEN,
               *execStartUtcTs, qid);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/executor/ExFastTransport.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExFastTransport.cpp b/core/sql/executor/ExFastTransport.cpp
index c97104d..4219702 100644
--- a/core/sql/executor/ExFastTransport.cpp
+++ b/core/sql/executor/ExFastTransport.cpp
@@ -681,7 +681,7 @@ ExWorkProcRetcode ExHdfsFastExtractTcb::work()
       if (retcode == 1) // check failed
       {
         char errStr[200];
-        str_sprintf(errStr, "genModTS = %Ld, failedModTS = %Ld", 
+        str_sprintf(errStr, "genModTS = %ld, failedModTS = %ld", 
                     myTdb().getModTSforDir(), failedModTS);
         
         ComDiagsArea * diagsArea = NULL;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/executor/ExHbaseAccess.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExHbaseAccess.cpp b/core/sql/executor/ExHbaseAccess.cpp
index 02f8223..c9faba3 100644
--- a/core/sql/executor/ExHbaseAccess.cpp
+++ b/core/sql/executor/ExHbaseAccess.cpp
@@ -1346,7 +1346,7 @@ Lng32 ExHbaseAccessTcb::createSQRowFromHbaseFormat(Int64 *latestRowTimestamp)
                       else if (colName.length() == sizeof(ULng32))
                         v = *(ULng32*)colName.data();
                       
-                      str_sprintf(buf, "%Ld", v);
+                      str_sprintf(buf, "%ld", v);
                     }
                   
                   ComDiagsArea * diagsArea = NULL;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/executor/ExHdfsScan.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExHdfsScan.cpp b/core/sql/executor/ExHdfsScan.cpp
index af5c56b..3b9baa5 100644
--- a/core/sql/executor/ExHdfsScan.cpp
+++ b/core/sql/executor/ExHdfsScan.cpp
@@ -498,7 +498,7 @@ ExWorkProcRetcode ExHdfsScanTcb::work()
                 if (retcode == 1) // check failed
                   {
                     char errStr[200];
-                    str_sprintf(errStr, "genModTS = %Ld, failedModTS = %Ld", 
+                    str_sprintf(errStr, "genModTS = %ld, failedModTS = %ld", 
                                 modTS, failedModTS);
 
                     ComDiagsArea * diagsArea = NULL;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/executor/ExSMGlobals.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExSMGlobals.cpp b/core/sql/executor/ExSMGlobals.cpp
index 54fc606..45dda94 100644
--- a/core/sql/executor/ExSMGlobals.cpp
+++ b/core/sql/executor/ExSMGlobals.cpp
@@ -220,7 +220,7 @@ const char *ExSMGlobals::createSessionID(ExExeStmtGlobals *stmtGlob)
     return NULL;
   }
 
-  str_sprintf(smIDStr, "%d_%d_%Ld", (Int32) sqNodeNumber, (Int32) masterPID,
+  str_sprintf(smIDStr, "%d_%d_%ld", (Int32) sqNodeNumber, (Int32) masterPID,
               (Int64) masterStart);
 
   return smIDStr;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/executor/ex_hashj.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ex_hashj.cpp b/core/sql/executor/ex_hashj.cpp
index bc032c4..a7c98ff 100644
--- a/core/sql/executor/ex_hashj.cpp
+++ b/core/sql/executor/ex_hashj.cpp
@@ -2023,7 +2023,7 @@ void ex_hashj_tcb::workEndPhase1() {
       char msg[1024];
       
       str_sprintf(msg, 
-		  "HJ End Phase 1 (%d). #inner rows: %Ld, #buckets: %d, #clusters: %d, #flushed: %d, total size %d MB, cluster size max- %d MB min- %d, variable size records: %s",
+		  "HJ End Phase 1 (%d). #inner rows: %ld, #buckets: %d, #clusters: %d, #flushed: %d, total size %d MB, cluster size max- %d MB min- %d, variable size records: %s",
 		  0,
 		  totalRightRowsRead_,
 		  bucketCount_ , numClusters, numFlushed, 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/exp/ExpLOB.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOB.cpp b/core/sql/exp/ExpLOB.cpp
index 2338850..8557c83 100644
--- a/core/sql/exp/ExpLOB.cpp
+++ b/core/sql/exp/ExpLOB.cpp
@@ -69,7 +69,7 @@ char * ExpLOBoper::ExpGetLOBname(Int64 uid, Lng32 num, char * outBuf, Lng32 outB
   if (outBufLen < 31)
     return NULL;
 
-  str_sprintf(outBuf, "LOBP_%020Ld_%04d",
+  str_sprintf(outBuf, "LOBP_%020ld_%04d",
 	      uid, num);
 
   return outBuf;
@@ -82,7 +82,7 @@ char * ExpLOBoper::ExpGetLOBDescName(Lng32 schNameLen, char * schName,
   if (outBufLen < 512)
     return NULL;
 
-  str_sprintf(outBuf, "%s.\"LOBDsc_%020Ld_%04d\"",
+  str_sprintf(outBuf, "%s.\"LOBDsc_%020ld_%04d\"",
 	      schName, uid, num);
 
   return outBuf;
@@ -94,7 +94,7 @@ char * ExpLOBoper::ExpGetLOBDescHandleObjNamePrefix(Int64 uid,
   if (outBufLen < 512)
     return NULL;
   
-  str_sprintf(outBuf, "%s_%020Ld", LOB_DESC_HANDLE_PREFIX,uid);
+  str_sprintf(outBuf, "%s_%020ld", LOB_DESC_HANDLE_PREFIX,uid);
   
   return outBuf;
 }
@@ -107,7 +107,7 @@ char * ExpLOBoper::ExpGetLOBDescHandleName(Lng32 schNameLen, char * schName,
       (schName == NULL))
     return NULL;
   
-  str_sprintf(outBuf, "%s.\"%s_%020Ld_%04d\"",
+  str_sprintf(outBuf, "%s.\"%s_%020ld_%04d\"",
 	      schName, LOB_DESC_HANDLE_PREFIX,uid, num);
   
   return outBuf;
@@ -115,7 +115,7 @@ char * ExpLOBoper::ExpGetLOBDescHandleName(Lng32 schNameLen, char * schName,
 
 Lng32 ExpLOBoper::ExpGetLOBnumFromDescName(char * descName, Lng32 descNameLen)
 {
-  // Desc Name Format: LOBDescHandle_%020Ld_%04d
+  // Desc Name Format: LOBDescHandle_%020ld_%04d
   char * lobNumPtr = &descName[sizeof(LOB_DESC_HANDLE_PREFIX) + 20 + 1];
   Lng32 lobNum = str_atoi(lobNumPtr, 4);
   
@@ -131,7 +131,7 @@ char * ExpLOBoper::ExpGetLOBDescChunksName(Lng32 schNameLen, char * schName,
       (schName == NULL))
     return NULL;
   
-  str_sprintf(outBuf, "%s.\"%s_%020Ld_%04d\"",
+  str_sprintf(outBuf, "%s.\"%s_%020ld_%04d\"",
 	      schName, LOB_DESC_CHUNK_PREFIX,uid, num);
 
   return outBuf;
@@ -146,7 +146,7 @@ char * ExpLOBoper::ExpGetLOBMDName(Lng32 schNameLen, char * schName,
   if (outBufLen < 512)
     return NULL;
 
-  str_sprintf(outBuf, "%s.\"%s_%020Ld\"",
+  str_sprintf(outBuf, "%s.\"%s_%020ld\"",
 	      schName, LOB_MD_PREFIX,uid);
 
   return outBuf;
@@ -471,7 +471,7 @@ void ExpLOBoper::createLOBhandleString(Int16 flags,
 				       char * schName,
 				       char * lobHandleBuf)
 {
-  str_sprintf(lobHandleBuf, "LOBH%04d%04d%04d%020Ld%02d%Ld%02d%Ld%03d%s",
+  str_sprintf(lobHandleBuf, "LOBH%04d%04d%04d%020ld%02d%ld%02d%ld%03d%s",
 	      flags, lobType, lobNum, uid,
 	      findNumDigits(descKey), descKey, 
 	      findNumDigits(descTS), descTS,
@@ -493,7 +493,7 @@ Lng32 ExpLOBoper::extractFromLOBstring(Int64 &uid,
 				       Lng32 handleLen)
 {
   // opp of:
-  //  str_sprintf(lobHandleBuf, "LOBH%04d%04d%04d%020Ld%02d%Ld%02d%Ld%03d%s",
+  //  str_sprintf(lobHandleBuf, "LOBH%04d%04d%04d%020ld%02d%ld%02d%ld%03d%s",
   //	      flags, lobType, lobNum, uid,
   //	      findNumDigits(descKey), descKey, 
   //	      findNumDigits(descTS), descTS,


[12/13] incubator-trafodion git commit: [TRAFODION-2754] Changing Trafodion code to use sprintf instead of str_sprintf

Posted by se...@apache.org.
[TRAFODION-2754] Changing Trafodion code to use sprintf instead
of str_sprintf

Fixed the buffer overrun problem with compilerId at many places. This prevented
embedded compiler to be used when the pid of the process is more than 4 digits.


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

Branch: refs/heads/master
Commit: 9d9d124dc70668f4917486c1a63d100beadb6b8b
Parents: d93e1d4
Author: selvaganesang <se...@esgyn.com>
Authored: Fri Sep 29 18:51:30 2017 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Fri Sep 29 18:51:30 2017 +0000

----------------------------------------------------------------------
 core/sql/arkcmp/CmpContext.cpp          |  2 +-
 core/sql/optimizer/CmpProcess.cpp       | 14 ++++++--------
 core/sql/optimizer/CmpProcess.h         |  2 +-
 core/sql/optimizer/CompilationStats.cpp |  6 +++---
 core/sql/optimizer/CompilationStats.h   |  2 +-
 core/sql/optimizer/CompilerTracking.cpp |  4 ++--
 6 files changed, 14 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9d9d124d/core/sql/arkcmp/CmpContext.cpp
----------------------------------------------------------------------
diff --git a/core/sql/arkcmp/CmpContext.cpp b/core/sql/arkcmp/CmpContext.cpp
index 842ac7e..3a8a9f9 100644
--- a/core/sql/arkcmp/CmpContext.cpp
+++ b/core/sql/arkcmp/CmpContext.cpp
@@ -242,7 +242,7 @@ CmpContext::CmpContext(UInt32 f, CollHeap * h)
   gmtDiff_ = timezone / 60;
 
   CmpProcess p;
-  p.getCompilerId(compilerId_);
+  p.getCompilerId(compilerId_, COMPILER_ID_LEN);
 
 
   //  CmpSeabaseDDL cmpSBD;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9d9d124d/core/sql/optimizer/CmpProcess.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/CmpProcess.cpp b/core/sql/optimizer/CmpProcess.cpp
index d11fa08..1c4e7db 100644
--- a/core/sql/optimizer/CmpProcess.cpp
+++ b/core/sql/optimizer/CmpProcess.cpp
@@ -98,21 +98,19 @@ parameter:
  the compiler id is made up of:
 
  process start timestamp - 18 digits
- node (cpu) #            - 2 digits
- pin #                   - 4 digits
- segment #               - 3 digits
+ node (cpu) #            - 3 digits
+ pin #                   - 5 digits
 
 
 ************************************************************************/
 void
-CmpProcess::getCompilerId(char *id)
+CmpProcess::getCompilerId(char *id, int len)
 {    
   CMPASSERT( NULL != id );
 
-  str_sprintf
-    (id, "%018ld%02d%04d%03d",
+  snprintf
+    (id, len, "%018ld%03d%05d",
      getProcessStartTime(),        
      getNodeNum(),                      
-     getPin(),                         
-     getSegmentNum());                     
+     getPin());                       
 }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9d9d124d/core/sql/optimizer/CmpProcess.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/CmpProcess.h b/core/sql/optimizer/CmpProcess.h
index c709763..7443353 100644
--- a/core/sql/optimizer/CmpProcess.h
+++ b/core/sql/optimizer/CmpProcess.h
@@ -48,7 +48,7 @@ public:
   Lng32 getCurrentSystemHeapSize(); 
 
   // generate the compiler id out of cpu#, pin, node#, and process start timestamp 
-  void getCompilerId( char *id );
+  void getCompilerId( char *id, int len);
 
 private:  
   short       nodeNum_;  // cpu num

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9d9d124d/core/sql/optimizer/CompilationStats.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/CompilationStats.cpp b/core/sql/optimizer/CompilationStats.cpp
index 8c97186..fd9c236 100644
--- a/core/sql/optimizer/CompilationStats.cpp
+++ b/core/sql/optimizer/CompilationStats.cpp
@@ -70,10 +70,10 @@ method CompilationStats::getCompilerId
 
 ************************************************************************/
 void
-CompilationStats::getCompilerId(char *cmpId)
+CompilationStats::getCompilerId(char *cmpId, int len)
 {
   CmpProcess p;
-  p.getCompilerId(cmpId);
+  p.getCompilerId(cmpId, len);
 }
 /************************************************************************
 method CompilationStats::enterCmpPhase
@@ -303,7 +303,7 @@ void CompilationStats::dumpToFile()
   fprintf(myf, "  Compilation End Time: %s\n", endTime); 
 
   char cmpId[COMPILER_ID_LEN];
-  getCompilerId(cmpId);
+  getCompilerId(cmpId, COMPILER_ID_LEN);
   fprintf(myf, "  Compiler Id: %s\n", cmpId);
   fprintf(myf, "  All Cmp Phases Execution length: \n");
   fprintf(myf, "    Binder: %d\n", cmpPhaseLength(CompilationStats::CMP_PHASE_BINDER));

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9d9d124d/core/sql/optimizer/CompilationStats.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/CompilationStats.h b/core/sql/optimizer/CompilationStats.h
index 6941b9e..f5afcf8 100644
--- a/core/sql/optimizer/CompilationStats.h
+++ b/core/sql/optimizer/CompilationStats.h
@@ -64,7 +64,7 @@ public:
   Int64 compileEndTime();
 
   // pass in a buffer of size COMPILER_ID_LEN
-  void getCompilerId(char *cmpId); 
+  void getCompilerId(char *cmpId, int len); 
   //
   // metadata cache counters
   ULng32 metadataCacheHits();

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9d9d124d/core/sql/optimizer/CompilerTracking.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/CompilerTracking.cpp b/core/sql/optimizer/CompilerTracking.cpp
index 86cb619..2a8cc60 100644
--- a/core/sql/optimizer/CompilerTracking.cpp
+++ b/core/sql/optimizer/CompilerTracking.cpp
@@ -632,7 +632,7 @@ CompilerTrackingInfo::logIntervalInPrivateTable()
 
   getTimestampAsBuffer(beginIntervalTime(), beginTime);
   getTimestampAsBuffer(endIntervalTime(), endTime);  
-  p->getCompilerId(compilerId);
+  p->getCompilerId(compilerId, COMPILER_ID_LEN);
   NAString tableName = ActiveSchemaDB()->getDefaultSchema().getSchemaNameAsAnsiString() + "." + COMPILER_TRACKING_TABLE_NAME_PRIVATE;
   //
   // update the fields
@@ -733,7 +733,7 @@ CompilerTrackingInfo::printToFile()
   fileout << endl;
      
   char compilerId[COMPILER_ID_LEN];
-  p->getCompilerId(compilerId);
+  p->getCompilerId(compilerId, COMPILER_ID_LEN);
   fileout << "Compiler ID\t\t: " << compilerId << endl; 
   fileout << "Process ID\t\t: " << p->getPin() << endl;  
   fileout << "Compiler Age\t\t: " << compilerAge() << " minutes\n";


[08/13] incubator-trafodion git commit: [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/exp/ExpLOBaccess.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBaccess.cpp b/core/sql/exp/ExpLOBaccess.cpp
index af2846c..455fec1 100644
--- a/core/sql/exp/ExpLOBaccess.cpp
+++ b/core/sql/exp/ExpLOBaccess.cpp
@@ -254,7 +254,7 @@ Ex_Lob_Error ExLob::fetchCursor(char *handleIn, Int32 handleLenIn, Int64 &outOff
         
       }
 
-    str_sprintf(logBuf, " Returned after ::fetchCursor %Ld,%Ld",outOffset,outSize);
+    str_sprintf(logBuf, " Returned after ::fetchCursor %ld,%ld",outOffset,outSize);
     lobDebugInfo(logBuf,0,__LINE__,lobTrace_);
 
     return err;
@@ -287,7 +287,7 @@ Ex_Lob_Error ExLob::getDesc(ExLobDesc &desc,char * handleIn, Int32 handleInLen,
     desc.setOffset(offset);
     desc.setSize(size);
    
-    str_sprintf(logBuf,"After Cli LOB_CLI_SELECT_UNIQUE:descOffset:%Ld, descSize: %Ld",offset,size);
+    str_sprintf(logBuf,"After Cli LOB_CLI_SELECT_UNIQUE:descOffset:%ld, descSize: %ld",offset,size);
     lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
     return err;
 }
@@ -602,7 +602,7 @@ Ex_Lob_Error ExLob::statSourceFile(char *srcfile, Int64 &sourceEOF)
        else
 	 return LOB_SOURCE_FILE_OPEN_ERROR;
        
-       str_sprintf(logBuf,"Returning EOF of %Ld for file %s", sourceEOF,srcfile);
+       str_sprintf(logBuf,"Returning EOF of %ld for file %s", sourceEOF,srcfile);
        lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
      }
 
@@ -629,7 +629,7 @@ Ex_Lob_Error ExLob::statSourceFile(char *srcfile, Int64 &sourceEOF)
 
        flock(fdSrcFile, LOCK_UN);
        close(fdSrcFile);
-       str_sprintf(logBuf,"Returning EOF of %Ld for file %s", sourceEOF,srcfile);
+       str_sprintf(logBuf,"Returning EOF of %ld for file %s", sourceEOF,srcfile);
        lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
        
      }
@@ -704,7 +704,7 @@ Ex_Lob_Error ExLob::readSourceFile(char *srcfile, char *&fileData, Int32 &size,
 Ex_Lob_Error ExLob::readHdfsSourceFile(char *srcfile, char *&fileData, Int32 &size, Int64 offset)
  {
      char logBuf[4096];
-     str_sprintf(logBuf,"Calling ::readHdfsSourceFile: %s Offset:%Ld, Size: %Ld",srcfile, offset,size);
+     str_sprintf(logBuf,"Calling ::readHdfsSourceFile: %s Offset:%ld, Size: %d",srcfile, offset,size);
      lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
   
    
@@ -733,7 +733,7 @@ Ex_Lob_Error ExLob::readHdfsSourceFile(char *srcfile, char *&fileData, Int32 &si
 Ex_Lob_Error ExLob::readLocalSourceFile(char *srcfile, char *&fileData, Int32 &size, Int64 offset)
    {  
      char logBuf[4096];
-     str_sprintf(logBuf,"Calling ::readLocalSourceFile: %s Offset:%Ld, Size: %Ld",srcfile, offset,size);
+     str_sprintf(logBuf,"Calling ::readLocalSourceFile: %s Offset:%ld, Size: %d",srcfile, offset,size);
      lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
   
      int openFlags = O_RDONLY;
@@ -926,7 +926,7 @@ Ex_Lob_Error ExLob::insertDesc(Int64 offset, Int64 size,  char *handleIn, Int32
    NABoolean foundUnused = FALSE;
    char logBuf[4096];
    lobDebugInfo("In ExLob::InsertDesc",0,__LINE__,lobTrace_);
-   str_sprintf(logBuf,"Calling Cli LOB_CLI_INSERT: Offset:%Ld, Size: %Ld",
+   str_sprintf(logBuf,"Calling Cli LOB_CLI_INSERT: Offset:%ld, Size: %ld",
                offset,size);
    lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
    clierr = SQL_EXEC_LOBcliInterface(handleIn, 
@@ -938,7 +938,7 @@ Ex_Lob_Error ExLob::insertDesc(Int64 offset, Int64 size,  char *handleIn, Int32
                                      &outDescPartnKey, &outDescSyskey, 
 				     0,
 				     xnId,lobTrace_);
-   str_sprintf(logBuf,"After LOB_CLI_INSERT: ChunkNum: OutSyskey:%Ld",
+   str_sprintf(logBuf,"After LOB_CLI_INSERT: ChunkNum:%d OutSyskey:%ld",
                chunkNum,outDescSyskey);
    lobDebugInfo(logBuf,0,__LINE__,lobTrace_);
    lobDebugInfo("Leaving ExLob::InsertDesc",0,__LINE__,lobTrace_);
@@ -967,7 +967,7 @@ Ex_Lob_Error ExLob::writeLobData(char *source, Int64 sourceLen, LobsSubOper subO
         allocMemSize = MINOF(lobMaxChunkMemSize, inputSize);
 	if (subOperation == Lob_File) 
 	  {
-            str_sprintf(logBuf,"reading source file %s allocMemSize : %Ld, readOffset:%Ld", source,allocMemSize,readOffset);
+            str_sprintf(logBuf,"reading source file %s allocMemSize : %d, readOffset:%ld", source,allocMemSize,readOffset);
             lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
 	    err = readSourceFile(source, inputAddr, allocMemSize, readOffset);
 	    if (err != LOB_OPER_OK)
@@ -983,7 +983,7 @@ Ex_Lob_Error ExLob::writeLobData(char *source, Int64 sourceLen, LobsSubOper subO
 	err = writeData(writeOffset, inputAddr, allocMemSize, operLen);
 	if (err != LOB_OPER_OK)
 	  {
-            str_sprintf(logBuf,"::writeData returned error .writeOffset:%Ld, allocMemSize:%Ld, operLen %Ld ", writeOffset,allocMemSize,operLen);
+            str_sprintf(logBuf,"::writeData returned error .writeOffset:%ld, allocMemSize:%d, operLen %ld ", writeOffset,allocMemSize,operLen);
             lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
 	    //handle errors that happen in one of the chunks.
 	   return err;
@@ -993,7 +993,7 @@ Ex_Lob_Error ExLob::writeLobData(char *source, Int64 sourceLen, LobsSubOper subO
 	  readOffset = readOffset+allocMemSize;
 	  inputSize = inputSize-lobMaxChunkMemSize;
 	  getLobGlobalHeap()->deallocateMemory(inputAddr);
-          str_sprintf(logBuf,"Bookkeeping for Lob_File source.writeOffset:%Ld, readOffset:%Ld, inputSize: %Ld ", writeOffset,readOffset, inputSize);
+          str_sprintf(logBuf,"Bookkeeping for Lob_File source.writeOffset:%ld, readOffset:%ld, inputSize: %ld ", writeOffset,readOffset, inputSize);
           lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
 	}
 	else
@@ -1001,7 +1001,7 @@ Ex_Lob_Error ExLob::writeLobData(char *source, Int64 sourceLen, LobsSubOper subO
 	    writeOffset = writeOffset+allocMemSize;
 	    inputSize = inputSize-lobMaxChunkMemSize;
 	    inputAddr = inputAddr+allocMemSize;
-            str_sprintf(logBuf,"Bookkeeping for Lob_Memory source. writeOffset:%Ld,  inputSize: %Ld ", writeOffset, inputSize);
+            str_sprintf(logBuf,"Bookkeeping for Lob_Memory source. writeOffset:%ld,  inputSize: %ld ", writeOffset, inputSize);
             lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
 	  }
       }
@@ -1045,7 +1045,7 @@ Ex_Lob_Error ExLob::readToMem(char *memAddr, Int64 size,  Int64 &operLen,char *
        sizeToRead = size;
        multipleChunks = TRUE;
      }
-   str_sprintf(logBuf,"sizeToRead:%Ld, desc.size :%Ld", sizeToRead, desc.getSize());
+   str_sprintf(logBuf,"sizeToRead:%ld, desc.size :%d", sizeToRead, desc.getSize());
    lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
    err = readDataToMem(memAddr, desc.getOffset(),sizeToRead, operLen, handleIn,handleInLen, multipleChunks,transId);
 
@@ -1290,7 +1290,7 @@ Ex_Lob_Error ExLob::append(char *data, Int64 size, LobsSubOper so, Int64 headDes
 
     char *inputAddr = data;
    
-     str_sprintf(logBuf,"Calling writeLobData: inputAddr: %Ld, InputSize%Ld, tgtOffset:%Ld",(long)inputAddr,sourceLen,dataOffset);
+     str_sprintf(logBuf,"Calling writeLobData: inputAddr: %ld, InputSize%ld, tgtOffset:%ld",(long)inputAddr,sourceLen,dataOffset);
     err = writeLobData(inputAddr, sourceLen,so,dataOffset,operLen,lobMaxChunkMemSize);
     if (err != LOB_OPER_OK)
       {
@@ -1307,7 +1307,7 @@ Ex_Lob_Error ExLob::insertData(char *data, Int64 size, LobsSubOper so,Int64 head
    operLen = 0;
    char logBuf[4096];
    lobDebugInfo("In ExLob::InsertData",0,__LINE__,lobTrace_);
-   str_sprintf(logBuf,"data:%Ld, size %Ld, lobMaxSize:%Ld, lobMaxChunkMemSize:%Ld", (long)data, size,lobMaxSize,lobMaxChunkMemSize);
+   str_sprintf(logBuf,"data:%ld, size %ld, lobMaxSize:%ld, lobMaxChunkMemSize:%ld", (long)data, size,lobMaxSize,lobMaxChunkMemSize);
   
    // get offset and input size from desc (the one that was just  
    // inserted into the descriptor handle table)
@@ -1327,7 +1327,7 @@ Ex_Lob_Error ExLob::insertData(char *data, Int64 size, LobsSubOper so,Int64 head
    
     Int64 inputSize = desc.getSize();
     Int64 tgtOffset = desc.getOffset();
-    str_sprintf(logBuf,"Calling writeLobData: inputAddr: %Ld, InputSize%Ld, tgtOffset:%Ld",(long)inputAddr,inputSize,tgtOffset);
+    str_sprintf(logBuf,"Calling writeLobData: inputAddr: %ld, InputSize%ld, tgtOffset:%ld",(long)inputAddr,inputSize,tgtOffset);
 
     lobDebugInfo(logBuf,0,__LINE__,lobTrace_);
     err = writeLobData(inputAddr, inputSize,so, tgtOffset, 
@@ -1359,7 +1359,7 @@ Ex_Lob_Error ExLob::update(char *data, Int64 size, LobsSubOper so,Int64 headDesc
     lobDebugInfo("In ExLob::update",0,__LINE__,lobTrace_);
     if ((so == Lob_File) || (so == Lob_External_File))
       {
-        str_sprintf(logBuf,"Calling statSourceFile: source:%s, sourceLen: %Ld",
+        str_sprintf(logBuf,"Calling statSourceFile: source:%s, sourceLen: %ld",
                data,sourceLen);
         lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
 	err = statSourceFile(data, sourceLen); 
@@ -1399,11 +1399,11 @@ Ex_Lob_Error ExLob::update(char *data, Int64 size, LobsSubOper so,Int64 headDesc
       }
     char *inputAddr = data;
    
-    str_sprintf(logBuf,"Calling writeLobData.sourceLen:%Ld, dataOffset:%Ld",sourceLen,dataOffset);
+    str_sprintf(logBuf,"Calling writeLobData.sourceLen:%ld, dataOffset:%ld",sourceLen,dataOffset);
     lobDebugInfo(logBuf,0,__LINE__,lobTrace_);
            
     err = writeLobData(inputAddr, sourceLen,so,dataOffset,operLen,lobMaxChunkMemSize);
-    str_sprintf(logBuf,"writeLobData returned. operLen:%Ld",operLen);
+    str_sprintf(logBuf,"writeLobData returned. operLen:%ld",operLen);
     lobDebugInfo(logBuf,0,__LINE__,lobTrace_);
     if (err != LOB_OPER_OK){
        lobDebugInfo("writeLobData Failed",0,__LINE__,lobTrace_); 
@@ -1610,7 +1610,7 @@ Ex_Lob_Error ExLob::readCursor(char *tgt, Int64 tgtSize, char *handleIn, Int32 h
     {
        cursor = it->second; 
     } 
-    str_sprintf(logBuf,"ExLob::readCursor:: cliInterface:%Ld,bytesRead_:%Ld,descOffset_:%LddescSize_:%Ld,eod_:%d,eor_:%d,eol_:%d,",(long)cursor.cliInterface_,cursor.bytesRead_,cursor.descOffset_,cursor.descSize_,cursor.eod_,cursor.eor_,cursor.eol_);
+    str_sprintf(logBuf,"ExLob::readCursor:: cliInterface:%ld,bytesRead_:%ld,descOffset_:%lddescSize_:%ld,eod_:%d,eor_:%d,eol_:%d,",(long)cursor.cliInterface_,cursor.bytesRead_,cursor.descOffset_,cursor.descSize_,cursor.eod_,cursor.eor_,cursor.eol_);
     lobDebugInfo(logBuf,0,__LINE__,lobTrace_);
     if (cursor.eod_) {
        // remove cursor from the map.
@@ -1746,7 +1746,7 @@ Ex_Lob_Error ExLob::allocateDesc(ULng32 size, Int64 &descNum, Int64 &dataOffset,
 
     if ((lobGCLimit != 0) && (dataOffset > lobGCLimit)) // 5 GB default
       {
-        str_sprintf(logBuf,"Starting GC. Current Offset : %Ld",dataOffset);
+        str_sprintf(logBuf,"Starting GC. Current Offset : %ld",dataOffset);
         lobDebugInfo(logBuf,0,__LINE__,lobTrace_);
            
          
@@ -1781,10 +1781,10 @@ Ex_Lob_Error ExLob::allocateDesc(ULng32 size, Int64 &descNum, Int64 &dataOffset,
       lobDataFileSubstr[len] = '\0';
 
       if (GCDone)
-        str_sprintf(logBuf,"Done GC. Allocating new Offset %Ld in %s",
+        str_sprintf(logBuf,"Done GC. Allocating new Offset %ld in %s",
                     dataOffset,lobDataFileSubstr);
       else
-        str_sprintf(logBuf,"Allocating new Offset %Ld in %s ",
+        str_sprintf(logBuf,"Allocating new Offset %ld in %s ",
                     dataOffset,lobDataFileSubstr);
       lobDebugInfo(logBuf,0,__LINE__,lobTrace_);
       //Find the last offset in the file
@@ -2075,7 +2075,7 @@ Ex_Lob_Error ExLob::readCursorData(char *tgt, Int64 tgtSize, cursor_t &cursor, I
       clock_gettime(CLOCK_MONOTONIC, &startTime);
 
       bytesRead = hdfsPread(fs_, fdData_, offset, tgt, bytesToCopy);
-      str_sprintf(logBuf,"After hdfsPread: BytesToCopy:%Ld, Offset:%Ld, tgt:%Ld, BytesRead :%Ld",
+      str_sprintf(logBuf,"After hdfsPread: BytesToCopy:%ld, Offset:%ld, tgt:%ld, BytesRead :%ld",
                   bytesToCopy,offset,(long)tgt,bytesRead);
       lobDebugInfo(logBuf,0,__LINE__,lobTrace_);
       clock_gettime(CLOCK_MONOTONIC, &endTime);
@@ -2177,8 +2177,10 @@ Ex_Lob_Error ExLob::readDataToMem(char *memAddr,
       strncpy(lobDataFileSubstr,lobDataFile_.data(),len);
       lobDataFileSubstr[len] = '\0';
 
-      str_sprintf(logBuf,"After hdfsPread: File:%s, Offset:%Ld, Size:%Ld,Target Mem Addr:%Ld",
-                  lobDataFileSubstr,offset,size,memAddr);
+      //str_sprintf(logBuf,"After hdfsPread: File:%s, Offset:%ld, Size:%ld,Target Mem Addr:%d",
+       //           lobDataFileSubstr,offset,size,memAddr);
+      str_sprintf(logBuf,"After hdfsPread: File:%s, Offset:%ld, Size:%ld",
+                  lobDataFileSubstr,offset,size);
       lobDebugInfo(logBuf,0,__LINE__,lobTrace_);
       operLen = bytesRead;
       return LOB_OPER_OK;
@@ -2580,7 +2582,7 @@ Ex_Lob_Error ExLobsOper (
 	  if (err != LOB_OPER_OK)
             {
               char buf[5000];
-              str_sprintf(buf,"Lob initialization failed;filename:%s;location:%s;hdfsserver:%s;hdfsPort:%d;lobMaxSize:%Ld",fileName,lobStorageLocation,hdfsServer,lobMaxSize);
+              str_sprintf(buf,"Lob initialization failed;filename:%s;location:%s;hdfsserver:%s;lobMaxSize:%ld",fileName,lobStorageLocation,hdfsServer,lobMaxSize);
               lobDebugInfo(buf,err,__LINE__,lobGlobals->lobTrace_);
               return err;
             }
@@ -2673,7 +2675,7 @@ Ex_Lob_Error ExLobsOper (
 	  if (err != LOB_OPER_OK)
             {
               char buf[5000];
-              str_sprintf(buf,"Lob initialization failed;filename:%s;location:%s;hdfsserver:%s;hdfsPort:%d;lobMaxSize:%Ld",srcLobName,lobStorageLocation,hdfsServer,lobMaxSize);
+              str_sprintf(buf,"Lob initialization failed;filename:%s;location:%s;hdfsserver:%s;lobMaxSize:%ld",srcLobName,lobStorageLocation,hdfsServer,lobMaxSize);
               lobDebugInfo(buf,err,__LINE__,lobGlobals->lobTrace_);
               return err;
             }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/exp/ExpPCode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCode.cpp b/core/sql/exp/ExpPCode.cpp
index f3f2096..8be3829 100644
--- a/core/sql/exp/ExpPCode.cpp
+++ b/core/sql/exp/ExpPCode.cpp
@@ -1373,9 +1373,9 @@ void PCode::displayContents(PCIList code, Space *space) {
   PCI * pci = iter.first();
 
   while (pci != NULL) {
-
     char tbuf[256];
-    str_sprintf(buf, "    PCI(%09d)[%3d,%d] %s(", pci, pci->getCodePosition(),
+// TODO: Need to check pci casting is correct
+    str_sprintf(buf, "    PCI(%09ld)[%3d,%d] %s(", (Int64)pci, pci->getCodePosition(),
 	    pci->getGeneratedCodeSize(),
 	    PCIT::operationString(pci->getOperation()));
 
@@ -1458,9 +1458,9 @@ Int32 PCode::dumpContents(PCIList code, char * buf, Int32 bufLen) {
 
   buf[0] = 0;
   while (pci != NULL) {
-
+// TODO: Need to check pci casting is correct
     char tbuf[256];
-    str_sprintf(tbuf, "PCI(%09d)[%3d,%d] %s(", pci, pci->getCodePosition(),
+    str_sprintf(tbuf, "PCI(%09ld)[%3d,%d] %s(", (Int64)pci, pci->getCodePosition(),
 	    pci->getGeneratedCodeSize(),
 	    PCIT::operationString(pci->getOperation()));
     len += str_len(tbuf);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/exp/exp_attrs.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_attrs.cpp b/core/sql/exp/exp_attrs.cpp
index a1f3c88..43e92d6 100644
--- a/core/sql/exp/exp_attrs.cpp
+++ b/core/sql/exp/exp_attrs.cpp
@@ -340,11 +340,11 @@ void Attributes::displayContents(Space * space, Int32 operandNum,
       
       Int64 ll = (Int64)lobLen;
       //      Int64 ll = (Int64)getPrecision() * 1000 + (Int64)getScale();
-      str_sprintf(buf, "      LobLength = %Ld Mb", ll);
+      str_sprintf(buf, "      LobLength = %ld Mb", ll);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     }
 
-  str_sprintf(buf, "      Precision = %d, Scale = %d, Collation = %d, flags_ = %b",
+  str_sprintf(buf, "      Precision = %d, Scale = %d, Collation = %d, flags_ = %x",
               getPrecision(), getScale(), getCollation(), flags_);
 
   space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
@@ -437,7 +437,7 @@ void Attributes::displayContents(Space * space, Int32 operandNum,
   if ((getRowsetSize() > 0) ||
       (getRowsetInfo()))
     {
-      str_sprintf(buf, "      rowsetSize_ = %d, rowsetInfo_ = %b",
+      str_sprintf(buf, "      rowsetSize_ = %d, rowsetInfo_ = %x",
 		  getRowsetSize(), getRowsetInfo());
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/exp/exp_clause.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_clause.cpp b/core/sql/exp/exp_clause.cpp
index 8050450..b66fd60 100644
--- a/core/sql/exp/exp_clause.cpp
+++ b/core/sql/exp/exp_clause.cpp
@@ -1590,12 +1590,12 @@ void ex_clause::displayContents(Space * space, const char * displayStr,
 	  getOperTypeEnumAsString(operType_), operType_, numOperands_);
   space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-  str_sprintf(buf, "    ex_clause::flags_ = %b ",flags_ );
+  str_sprintf(buf, "    ex_clause::flags_ = %x ",flags_ );
   space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
   if (displayStr)
     {
-      str_sprintf(buf, "    %s::flags_ = %b ", displayStr, clauseFlags);
+      str_sprintf(buf, "    %s::flags_ = %x ", displayStr, clauseFlags);
       space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
     }
 
@@ -1966,7 +1966,7 @@ void ex_branch_clause::displayContents(Space * space, const char * /*displayStr*
                                   getNumOperands());
   space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-  str_sprintf(buf, "    flags_ = %b ", getAllFlags());
+  str_sprintf(buf, "    flags_ = %x ", getAllFlags());
   space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
   if (noPCodeAvailable())
@@ -2015,7 +2015,7 @@ void ex_comp_clause::displayContents(Space * space, const char * /*displayStr*/,
   str_sprintf(buf, "    ex_comp_clause::rollupColumnNum_ = %d", rollupColumnNum_);
   space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
-  str_sprintf(buf, "    ex_comp_clause::flags_ = %b", flags_);
+  str_sprintf(buf, "    ex_comp_clause::flags_ = %x", flags_);
   space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
   ex_clause::displayContents(space, (const char *)NULL, clauseNum, constsArea, 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/exp/exp_datetime.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_datetime.cpp b/core/sql/exp/exp_datetime.cpp
index 0d3f55e..42f266f 100644
--- a/core/sql/exp/exp_datetime.cpp
+++ b/core/sql/exp/exp_datetime.cpp
@@ -113,7 +113,7 @@ raiseDateConvErrorWithSrcDataNumeric(ComDiagsArea** diagsArea, long srcData, Col
 {
    char errstr[MAX_OFFENDING_SOURCE_DATA_DISPLAY_LEN];
    str_pad(errstr, sizeof(errstr), 0 );
-   str_sprintf(errstr,"%Ld",srcData);
+   str_sprintf(errstr,"%ld",srcData);
    ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR,NULL,NULL,NULL,NULL,errstr);
 }
 //////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/exp/exp_expr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_expr.cpp b/core/sql/exp/exp_expr.cpp
index 97d7ce0..b922504 100644
--- a/core/sql/exp/exp_expr.cpp
+++ b/core/sql/exp/exp_expr.cpp
@@ -257,7 +257,7 @@ void ex_expr::displayContents(Space * space, short mode, const char * displayStr
   space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
   str_sprintf(buf, "Expr Len: %d, Consts Len: %d", exprLen, getConstsLength());
   space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
-  str_sprintf(buf, "flags_ = %b ",flags_ );
+  str_sprintf(buf, "flags_ = %x ",flags_ );
   space->allocateAndCopyToAlignedSpace(buf, str_len(buf), sizeof(short));
 
   if (flag & 0x00000004)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/generator/GenExplain.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenExplain.cpp b/core/sql/generator/GenExplain.cpp
index 77d9c9f..aa2d3ed 100644
--- a/core/sql/generator/GenExplain.cpp
+++ b/core/sql/generator/GenExplain.cpp
@@ -708,12 +708,12 @@ static void appendListOfColumns(Queue* listOfColNames,ComTdb *tdb, NAString& out
           else
         v = 0;
           if (j==0)
-              str_sprintf(buf, "%s%s%Ld",
+              str_sprintf(buf, "%s%s%ld",
                   colFam,
                   (withAt ? "@" : ""),
                   v);
           else
-              str_sprintf(buf, ",%s%s%Ld",
+              str_sprintf(buf, ",%s%s%ld",
                   colFam,
                   (withAt ? "@" : ""),
                   v);
@@ -804,7 +804,7 @@ static void appendPushedDownExpression(ComTdb *tdb, NAString& outNAString){
                 v = *(ULng32*)colName;
                   else
                 v = 0;
-                  str_sprintf(buf2, "%s%s%Ld",
+                  str_sprintf(buf2, "%s%s%ld",
                       colFam,
                       (withAt ? "@" : ""),
                       v);
@@ -1724,7 +1724,7 @@ RelRoot::addSpecificExplainInfo(ExplainTupleMaster *explainTuple,
        ComQIActionTypeEnumToLiteral(sikValue[i].getSecurityKeyType(),
                                     sikOperationLit);
        sikOperationLit[2] = '\0';
-       str_sprintf(buf, "{%Ld,%Ld,%s}",
+       str_sprintf(buf, "{%ld,%ld,%s}",
                   (Int64)sikValue[i].getSubjectHashValue(),
                   (Int64)sikValue[i].getObjectHashValue(),
                   sikOperationLit);
@@ -1737,12 +1737,12 @@ RelRoot::addSpecificExplainInfo(ExplainTupleMaster *explainTuple,
   if (objectUIDs)
   {
     char buf[64];
-    str_sprintf(buf, "ObjectUIDs: %Ld", objectUIDs[0]);
+    str_sprintf(buf, "ObjectUIDs: %ld", objectUIDs[0]);
     statement += buf; 
     Int32 numO = rootTdb->getNumObjectUIDs();
     for (Int32 i = 1; i < numO; i++)
     {
-      str_sprintf(buf, ", %Ld", objectUIDs[i]);
+      str_sprintf(buf, ", %ld", objectUIDs[i]);
       statement += buf;
     }
     statement += " ";

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/generator/GenRelEnforcer.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenRelEnforcer.cpp b/core/sql/generator/GenRelEnforcer.cpp
index cd28ed0..ae4cf22 100644
--- a/core/sql/generator/GenRelEnforcer.cpp
+++ b/core/sql/generator/GenRelEnforcer.cpp
@@ -343,7 +343,7 @@ short Exchange::codeGenForESP(Generator * generator)
     ComUID uid;
     uid.make_UID();
     Int64 i64 = uid.get_value();
-    str_sprintf(extractSecurityKey, "%Ld", i64);
+    str_sprintf(extractSecurityKey, "%ld", i64);
   }
   else
   {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/optimizer/BindItemExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/BindItemExpr.cpp b/core/sql/optimizer/BindItemExpr.cpp
index de5cc78..8990db3 100644
--- a/core/sql/optimizer/BindItemExpr.cpp
+++ b/core/sql/optimizer/BindItemExpr.cpp
@@ -11797,7 +11797,7 @@ ItemExpr *ZZZBinderFunction::bindNode(BindWA *bindWA)
 		    i--;
 		  }
 		
-		str_sprintf(buf, "@A1 / %Ld", denom);
+		str_sprintf(buf, "@A1 / %ld", denom);
 	      }
 	    
 	    if (strlen(buf) > 0)
@@ -11818,7 +11818,7 @@ ItemExpr *ZZZBinderFunction::bindNode(BindWA *bindWA)
 		
 		// multiply by 10 ** (number of digits rounded off) to
 		// get back to the original scale.
-		str_sprintf(buf, "cast(@A1 * %Ld as numeric(%d,%d))", 
+		str_sprintf(buf, "cast(@A1 * %ld as numeric(%d,%d))", 
                   denom, MAX_NUMERIC_PRECISION, MAXOF(type_op1.getScale(), roundTo));
 		parseTree = parser.getItemExprTree(buf, strlen(buf), BINDITEMEXPR_STMTCHARSET, 2, divExpr, child(1));
 		if (! parseTree)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/optimizer/CmpProcess.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/CmpProcess.cpp b/core/sql/optimizer/CmpProcess.cpp
index b3e2eae..73a274c 100644
--- a/core/sql/optimizer/CmpProcess.cpp
+++ b/core/sql/optimizer/CmpProcess.cpp
@@ -112,7 +112,7 @@ CmpProcess::getCompilerId(char *id)
   CMPASSERT( NULL != id );
 
   str_sprintf
-    (id, "%018Ld%02d%04d%03d",
+    (id, "%018ld%02d%04d%03d",
      getProcessStartTime(),        
      getNodeNum(),                      
      getPin(),                         

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sort/Qsort.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sort/Qsort.cpp b/core/sql/sort/Qsort.cpp
index 5198394..4699f30 100644
--- a/core/sql/sort/Qsort.cpp
+++ b/core/sql/sort/Qsort.cpp
@@ -232,7 +232,7 @@ Lng32 Qsort::sortSend(void *rec, ULng32 len, void* tupp)
 			{
 			  char msg[500];
 			  str_sprintf(msg,
-						  "QSort::SortSend, Sort has overflowed due to unavailable memory request of size %d MB",
+						  "QSort::SortSend, Sort has overflowed due to unavailable memory request of size %ld MB",
 						   (sizeof(Record) * allocRunSize_ * 2)/ ONE_MB);
 			  SQLMXLoggingArea::logExecRtInfo(NULL,0,msg,explainNodeId_);
 		  sortUtil_->config()->setLogInfoEventDone();

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sort/SortUtil.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sort/SortUtil.cpp b/core/sql/sort/SortUtil.cpp
index 722c60b..f8294e8 100644
--- a/core/sql/sort/SortUtil.cpp
+++ b/core/sql/sort/SortUtil.cpp
@@ -337,7 +337,7 @@ Lng32 SortUtil::sortSendEnd(NABoolean& internalSort)
   {
     char msg[500];
     str_sprintf(msg,
-    "Sort is performing %s sort: NumRecs:%d",
+    "Sort is performing %s sort: NumRecs:%ld",
         internalSort? "internal":"external", stats_.numRecs_);
     SQLMXLoggingArea::logExecRtInfo(NULL, 0,msg, explainNodeId_);
   }
@@ -428,7 +428,7 @@ Lng32 SortUtil::sortReceivePrepare(void)
       {
         char msg[500];
         str_sprintf(msg,
-        "Sort Merge Phase encountered memory pressure: NumRuns:%d, MergeOrder:%d, NumRecs:%d, ScratchBlocks:%d",
+        "Sort Merge Phase encountered memory pressure: NumRuns:%d, MergeOrder:%d, NumRecs:%ld, ScratchBlocks:%d",
         stats_.numRuns_, config_->mergeOrder_, stats_.numRecs_,stats_.scrNumBlocks_);
         
         SQLMXLoggingArea::logExecRtInfo(NULL, 0,msg, explainNodeId_);
@@ -522,7 +522,7 @@ Lng32 SortUtil::sortReceivePrepare(void)
     {
       char msg[500];
       str_sprintf(msg,
-      "Sort is performing intermediate merges, NumRuns:%d, MergeOrder:%d, NumRecs:%d, ScratchBlocks:%d",
+      "Sort is performing intermediate merges, NumRuns:%d, MergeOrder:%d, NumRecs:%ld, ScratchBlocks:%d",
       stats_.numRuns_,config_->mergeOrder_,stats_.numRecs_,stats_.scrNumBlocks_); 
     
       SQLMXLoggingArea::logExecRtInfo(NULL, 0,msg, explainNodeId_);
@@ -678,7 +678,7 @@ Lng32 SortUtil::sortReceivePrepare(void)
     {
       char msg[500];
       str_sprintf(msg,
-      "Sort is not performing intermediate merges, NumRuns:%d, MergeOrder:%d, NumRecs:%d, ScratchBlocks:%d",
+      "Sort is not performing intermediate merges, NumRuns:%d, MergeOrder:%d, NumRecs:%ld, ScratchBlocks:%d",
       stats_.numRuns_,config_->mergeOrder_,stats_.numRecs_,stats_.scrNumBlocks_); 
       
       SQLMXLoggingArea::logExecRtInfo(NULL, 0,msg, explainNodeId_);
@@ -767,7 +767,7 @@ Lng32 SortUtil::sortReceive(void* record, ULng32& len)
     stats_.elapsedTime_ = currentTimeJ - stats_.beginSortTime_;
     if (config_->logInfoEvent()) {
       char msg[500];
-      str_sprintf(msg, "Sort elapsed time : %Ld; Num runs : %d; runsize :%d",
+      str_sprintf(msg, "Sort elapsed time : %ld; Num runs : %d; runsize :%d",
 		stats_.elapsedTime_,stats_.numInitRuns_,sortAlgo_->getRunSize());
       SQLMXLoggingArea::logExecRtInfo(NULL, 0,msg, explainNodeId_);
     }
@@ -801,7 +801,7 @@ Lng32 SortUtil::sortReceive(void*& record,ULng32& len,void*& tupp)
     stats_.elapsedTime_ = currentTimeJ - stats_.beginSortTime_; 
     if (config_->logInfoEvent()) {
       char msg[500];
-      str_sprintf(msg, "Internal sort performed. Sort elapsed time : %Ld; Num runs : %d; runsize :%d",
+      str_sprintf(msg, "Internal sort performed. Sort elapsed time : %ld; Num runs : %d; runsize :%d",
 		stats_.elapsedTime_,stats_.numInitRuns_,sortAlgo_->getRunSize());
       SQLMXLoggingArea::logExecRtInfo(NULL, 0,msg, explainNodeId_);
     }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sqlci/SqlCmd.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlci/SqlCmd.cpp b/core/sql/sqlci/SqlCmd.cpp
index 3972c4f..30a273c 100644
--- a/core/sql/sqlci/SqlCmd.cpp
+++ b/core/sql/sqlci/SqlCmd.cpp
@@ -741,7 +741,7 @@ short SqlCmd::updateRepos(SqlciEnv * sqlci_env, SQLSTMT_ID * stmt, char * queryI
   char * queryBuf = new char[4000];
 
   Int64 ts = NA_JulianTimestamp();
-  str_sprintf(queryBuf, "insert into %s.\"%s\".%s (instance_id, tenant_id, host_id, exec_start_utc_ts, query_id, explain_plan) values (0,0,0, CONVERTTIMESTAMP(%Ld), '%s', '' ) ",
+  str_sprintf(queryBuf, "insert into %s.\"%s\".%s (instance_id, tenant_id, host_id, exec_start_utc_ts, query_id, explain_plan) values (0,0,0, CONVERTTIMESTAMP(%ld), '%s', '' ) ",
               TRAFODION_SYSCAT_LIT, SEABASE_REPOS_SCHEMA, REPOS_METRIC_QUERY_TABLE,
               ts, queryId);
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sqlcomp/CmpDescribe.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpDescribe.cpp b/core/sql/sqlcomp/CmpDescribe.cpp
index cccdf6c..5ba8fa7 100644
--- a/core/sql/sqlcomp/CmpDescribe.cpp
+++ b/core/sql/sqlcomp/CmpDescribe.cpp
@@ -2321,7 +2321,7 @@ short CmpDescribeHiveTable (
           NAString bufnas(buf);
           outputLongLine(space, bufnas, 0);
 
-          str_sprintf(buf, "/* ObjectUID = %Ld */", objectUID);
+          str_sprintf(buf, "/* ObjectUID = %ld */", objectUID);
           outputShortLine(space, buf);
         }
 
@@ -2448,7 +2448,7 @@ short CmpDescribeHiveTable (
       NAString bufnas(buf);
       outputLongLine(space, bufnas, 0);
 
-      str_sprintf(buf, "/* ObjectUID = %Ld */", objectUID);
+      str_sprintf(buf, "/* ObjectUID = %ld */", objectUID);
       outputShortLine(space, buf);
     }
 
@@ -3780,7 +3780,7 @@ short CmpDescribeSeabaseTable (
           NAString bufnas(buf);
           outputLongLine(*space, bufnas, 0);
 
-          str_sprintf(buf, "/* ObjectUID = %Ld */", objectUID);
+          str_sprintf(buf, "/* ObjectUID = %ld */", objectUID);
           outputShortLine(*space, buf);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sqlcomp/CmpSeabaseDDLauth.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLauth.cpp b/core/sql/sqlcomp/CmpSeabaseDDLauth.cpp
index ea2d3f2..b3750e9 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLauth.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLauth.cpp
@@ -503,7 +503,7 @@ void CmpSeabaseDDLauth::insertRow()
   NAString authValid = isAuthValid() ? "Y" : "N";
 
   NAString sysCat = CmpSeabaseDDL::getSystemCatalogStatic();
-  str_sprintf(buf, "insert into %s.\"%s\".%s values (%d, '%s', '%s', '%s', %d, '%s', %Ld, %Ld, 0)",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values (%d, '%s', '%s', '%s', %d, '%s', %ld, %ld, 0)",
               sysCat.data(), SEABASE_MD_SCHEMA, SEABASE_AUTHS,
               getAuthID(),
               getAuthDbName().data(),

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sqlcomp/CmpSeabaseDDLcleanup.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLcleanup.cpp b/core/sql/sqlcomp/CmpSeabaseDDLcleanup.cpp
index 9788b25..3d98d66 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLcleanup.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLcleanup.cpp
@@ -353,7 +353,7 @@ short CmpSeabaseMDcleanup::gatherDependentObjects(ExeCliInterface *cliInterface)
   if (objType_ == COM_BASE_TABLE_OBJECT_LIT)
     {
       // generate dependent index uid list
-      str_sprintf(query, "select index_uid from %s.\"%s\".%s where base_table_uid = %Ld",
+      str_sprintf(query, "select index_uid from %s.\"%s\".%s where base_table_uid = %ld",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_INDEXES,
                   objUID_);
       
@@ -366,7 +366,7 @@ short CmpSeabaseMDcleanup::gatherDependentObjects(ExeCliInterface *cliInterface)
         }
   
       // generate unique constr list
-     str_sprintf(query, "select constraint_uid from %s.\"%s\".%s where table_uid = %Ld and constraint_type = 'U' ",
+     str_sprintf(query, "select constraint_uid from %s.\"%s\".%s where table_uid = %ld and constraint_type = 'U' ",
                  getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
                   objUID_);
       
@@ -379,7 +379,7 @@ short CmpSeabaseMDcleanup::gatherDependentObjects(ExeCliInterface *cliInterface)
         }
 
       // generate ref constr list
-     str_sprintf(query, "select constraint_uid from %s.\"%s\".%s where table_uid = %Ld and constraint_type = 'F' ",
+     str_sprintf(query, "select constraint_uid from %s.\"%s\".%s where table_uid = %ld and constraint_type = 'F' ",
                  getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
                   objUID_);
       
@@ -505,7 +505,7 @@ short CmpSeabaseMDcleanup::deleteMDentries(ExeCliInterface *cliInterface)
 
   // Now delete from OBJECTS (but not its index)
 
-  str_sprintf(query, "delete from %s.\"%s\".%s where object_uid = %Ld",
+  str_sprintf(query, "delete from %s.\"%s\".%s where object_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               objUID_);
   cliRC = cliInterface->executeImmediate(query);
@@ -525,7 +525,7 @@ short CmpSeabaseMDcleanup::deleteMDentries(ExeCliInterface *cliInterface)
     } 
   
   // OBJECTS index
-  str_sprintf(query, "delete from table(index_table %s.\"%s\".%s) where \"OBJECT_UID@\" = %Ld",
+  str_sprintf(query, "delete from table(index_table %s.\"%s\".%s) where \"OBJECT_UID@\" = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS_UNIQ_IDX,
               objUID_);
   cliRC = cliInterface->executeImmediate(query);
@@ -536,7 +536,7 @@ short CmpSeabaseMDcleanup::deleteMDentries(ExeCliInterface *cliInterface)
     }
   
   // COLUMNS table
-  str_sprintf(query, "delete from %s.\"%s\".%s where object_uid = %Ld",
+  str_sprintf(query, "delete from %s.\"%s\".%s where object_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               objUID_);
   cliRC = cliInterface->executeImmediate(query);
@@ -547,7 +547,7 @@ short CmpSeabaseMDcleanup::deleteMDentries(ExeCliInterface *cliInterface)
     }
 
   // KEYS table
-  str_sprintf(query, "delete from %s.\"%s\".%s where object_uid = %Ld",
+  str_sprintf(query, "delete from %s.\"%s\".%s where object_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
               objUID_);
   cliRC = cliInterface->executeImmediate(query);
@@ -558,7 +558,7 @@ short CmpSeabaseMDcleanup::deleteMDentries(ExeCliInterface *cliInterface)
     }
 
   // TABLES table
-  str_sprintf(query, "delete from %s.\"%s\".%s where table_uid = %Ld",
+  str_sprintf(query, "delete from %s.\"%s\".%s where table_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLES,
               objUID_);
   cliRC = cliInterface->executeImmediate(query);
@@ -569,7 +569,7 @@ short CmpSeabaseMDcleanup::deleteMDentries(ExeCliInterface *cliInterface)
     }
   
   // delete index entries
-  str_sprintf(query, "delete from %s.\"%s\".%s where base_table_uid = %Ld",
+  str_sprintf(query, "delete from %s.\"%s\".%s where base_table_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_INDEXES,
               objUID_);
   cliRC = cliInterface->executeImmediate(query);
@@ -580,7 +580,7 @@ short CmpSeabaseMDcleanup::deleteMDentries(ExeCliInterface *cliInterface)
     }
 
   // TEXT entries
-  str_sprintf(query, "delete from %s.\"%s\".%s where text_uid = %Ld",
+  str_sprintf(query, "delete from %s.\"%s\".%s where text_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TEXT,
               objUID_);
   cliRC = cliInterface->executeImmediate(query);
@@ -611,7 +611,7 @@ short CmpSeabaseMDcleanup::deleteMDConstrEntries(ExeCliInterface *cliInterface)
           OutputInfo * oi = (OutputInfo*)uniqueConstrUIDlist_->getCurr(); 
           ucUID = *(Int64*)oi->get(0);
           
-          str_sprintf(query, "delete from %s.\"%s\".%s where unique_constraint_uid = %Ld",
+          str_sprintf(query, "delete from %s.\"%s\".%s where unique_constraint_uid = %ld",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_REF_CONSTRAINTS,
                       ucUID);
           cliRC = cliInterface->executeImmediate(query);
@@ -621,7 +621,7 @@ short CmpSeabaseMDcleanup::deleteMDConstrEntries(ExeCliInterface *cliInterface)
               return -1;
             }
           
-          str_sprintf(query, "delete from %s.\"%s\".%s where unique_constraint_uid = %Ld",
+          str_sprintf(query, "delete from %s.\"%s\".%s where unique_constraint_uid = %ld",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_UNIQUE_REF_CONSTR_USAGE,
                       ucUID);
           cliRC = cliInterface->executeImmediate(query);
@@ -644,7 +644,7 @@ short CmpSeabaseMDcleanup::deleteMDConstrEntries(ExeCliInterface *cliInterface)
           
           OutputInfo * oi = (OutputInfo*)refConstrUIDlist_->getCurr(); 
           rcUID = *(Int64*)oi->get(0);
-          str_sprintf(query, "delete from %s.\"%s\".%s where ref_constraint_uid = %Ld",
+          str_sprintf(query, "delete from %s.\"%s\".%s where ref_constraint_uid = %ld",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_REF_CONSTRAINTS,
                       rcUID);
           cliRC = cliInterface->executeImmediate(query);
@@ -654,7 +654,7 @@ short CmpSeabaseMDcleanup::deleteMDConstrEntries(ExeCliInterface *cliInterface)
               return -1;
             }
           
-          str_sprintf(query, "delete from %s.\"%s\".%s where foreign_constraint_uid = %Ld",
+          str_sprintf(query, "delete from %s.\"%s\".%s where foreign_constraint_uid = %ld",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_UNIQUE_REF_CONSTR_USAGE,
                       rcUID);
           cliRC = cliInterface->executeImmediate(query);
@@ -668,7 +668,7 @@ short CmpSeabaseMDcleanup::deleteMDConstrEntries(ExeCliInterface *cliInterface)
         } // for
     }
       
-  str_sprintf(query, "delete from %s.\"%s\".%s where object_uid in (select constraint_uid from %s.\"%s\".%s where table_uid = %Ld)",
+  str_sprintf(query, "delete from %s.\"%s\".%s where object_uid in (select constraint_uid from %s.\"%s\".%s where table_uid = %ld)",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
               objUID_);
@@ -679,7 +679,7 @@ short CmpSeabaseMDcleanup::deleteMDConstrEntries(ExeCliInterface *cliInterface)
       return -1;
     }
   
-  str_sprintf(query, "delete from %s.\"%s\".%s where table_uid = %Ld",
+  str_sprintf(query, "delete from %s.\"%s\".%s where table_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
               objUID_);
   cliRC = cliInterface->executeImmediate(query);
@@ -697,7 +697,7 @@ short CmpSeabaseMDcleanup::deleteMDViewEntries(ExeCliInterface *cliInterface)
   Lng32 cliRC = 0;
   char query[1000];
 
-  str_sprintf(query, "delete from %s.\"%s\".%s where view_uid = %Ld",
+  str_sprintf(query, "delete from %s.\"%s\".%s where view_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS,
               objUID_);
   cliRC = cliInterface->executeImmediate(query);
@@ -707,7 +707,7 @@ short CmpSeabaseMDcleanup::deleteMDViewEntries(ExeCliInterface *cliInterface)
       return -1;
     }
 
-  str_sprintf(query, "delete from %s.\"%s\".%s where used_object_uid = %Ld and used_object_type = '%s' ",
+  str_sprintf(query, "delete from %s.\"%s\".%s where used_object_uid = %ld and used_object_type = '%s' ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS_USAGE,
               objUID_,
               objType_.data());
@@ -756,7 +756,7 @@ short CmpSeabaseMDcleanup::dropIndexes(ExeCliInterface *cliInterface)
       OutputInfo * oi = (OutputInfo*)indexesUIDlist_->getCurr(); 
       iUID = *(Int64*)oi->get(0);
 
-      str_sprintf(query, "cleanup uid %Ld",
+      str_sprintf(query, "cleanup uid %ld",
                   iUID);
       cliRC = cliInterface->executeImmediate(query);
       if (cliRC < 0)
@@ -788,7 +788,7 @@ short CmpSeabaseMDcleanup::dropSequences(ExeCliInterface *cliInterface)
       OutputInfo * oi = (OutputInfo*)seqUIDlist_->getCurr(); 
       iUID = *(Int64*)oi->get(0);
 
-      str_sprintf(query, "cleanup uid %Ld",
+      str_sprintf(query, "cleanup uid %ld",
                   iUID);
       cliRC = cliInterface->executeImmediate(query);
       if (cliRC < 0)
@@ -875,7 +875,7 @@ short CmpSeabaseMDcleanup::deletePrivs(ExeCliInterface *cliInterface)
   if (NOT isAuthorizationEnabled())
     return 0;
 
-  str_sprintf(query, "delete from %s.\"%s\".%s where object_uid = %Ld",
+  str_sprintf(query, "delete from %s.\"%s\".%s where object_uid = %ld",
               getSystemCatalog(), SEABASE_PRIVMGR_SCHEMA, "OBJECT_PRIVILEGES",
               objUID_);
   cliRC = cliInterface->executeImmediate(query);
@@ -929,7 +929,7 @@ void CmpSeabaseMDcleanup::cleanupSchemaObjects(ExeCliInterface *cliInterface)
       NAString obj_name((char*)oi->get(2));
       if (isHistogramTable(obj_name))
       {
-        str_sprintf(query, "cleanup uid %Ld", uid);
+        str_sprintf(query, "cleanup uid %ld", uid);
         cliRC = cliInterface->executeImmediate(query);
         if (cliRC < 0)
           {
@@ -975,7 +975,7 @@ void CmpSeabaseMDcleanup::cleanupSchemaObjects(ExeCliInterface *cliInterface)
           continue;
         }
 
-      str_sprintf(query, "cleanup uid %Ld", uid);
+      str_sprintf(query, "cleanup uid %ld", uid);
       cliRC = cliInterface->executeImmediate(query);
       if (cliRC < 0)
         {
@@ -1020,7 +1020,7 @@ short CmpSeabaseMDcleanup::cleanupUIDs(ExeCliInterface *cliInterface,
       OutputInfo * oi = (OutputInfo*)entriesList->getCurr(); 
       Int64 objUID = *(Int64*)oi->get(0);
       
-      str_sprintf(query, "cleanup uid %Ld", objUID);
+      str_sprintf(query, "cleanup uid %ld", objUID);
       cliRC = cliInterface->executeImmediate(query);
       if (cliRC < 0)
         {
@@ -1121,9 +1121,7 @@ void CmpSeabaseMDcleanup::cleanupHBaseObject(const StmtDDLCleanupObjects * stmtC
 
   // drop external table
   str_sprintf(query, "drop external table if exists %s;",
-              objName.data(),
-              stmtCleanupNode->getTableNameAsQualifiedName()->
-              getQualifiedNameAsString().data());
+              objName.data());
   cliRC = cliInterface->executeImmediate(query);
   if (cliRC < 0)
     {
@@ -1466,8 +1464,7 @@ short CmpSeabaseMDcleanup::cleanupInconsistentObjectsEntries(ExeCliInterface *cl
 
   str_sprintf(query, "select distinct object_uid, cast(object_uid as varchar(30) not null) from %s.\"%s\".%s where object_uid not in (select object_uid from %s.\"%s\".%s) ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
-              getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
-              getSystemCatalog());
+              getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS);
   
   cliRC = cliInterface->fetchAllRows(obsoleteEntriesList_, query, 0, FALSE, FALSE, TRUE);
   if (cliRC < 0)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
index e7a9f5b..c0a74b7 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
@@ -3529,12 +3529,12 @@ short CmpSeabaseDDL::getObjectName(
   ExeCliInterface cqdCliInterface(STMTHEAP);
 
   if (lookInObjectsIdx)
-    str_sprintf(buf, "select catalog_name, schema_name, object_name, object_type from table(index_table %s.\"%s\".%s) where \"OBJECT_UID@\" = %Ld ",
+    str_sprintf(buf, "select catalog_name, schema_name, object_name, object_type from table(index_table %s.\"%s\".%s) where \"OBJECT_UID@\" = %ld ",
                 getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS_UNIQ_IDX,
                 objUID);
   else
     {
-      str_sprintf(buf, "select catalog_name, schema_name, object_name, object_type from %s.\"%s\".%s where object_uid = %Ld ",
+      str_sprintf(buf, "select catalog_name, schema_name, object_name, object_type from %s.\"%s\".%s where object_uid = %ld ",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
                   objUID);
     }
@@ -3922,7 +3922,7 @@ Int64 CmpSeabaseDDL::getConstraintOnIndex(
 
   char buf[4000];
 
-  str_sprintf(buf, "select C.constraint_uid, O.catalog_name, O.schema_name, O.object_name from %s.\"%s\".%s C, %s.\"%s\".%s O where C.table_uid = %Ld and C.index_uid = %Ld and C.constraint_type = '%s' and C.constraint_uid = O.object_uid",
+  str_sprintf(buf, "select C.constraint_uid, O.catalog_name, O.schema_name, O.object_name from %s.\"%s\".%s C, %s.\"%s\".%s O where C.table_uid = %ld and C.index_uid = %ld and C.constraint_type = '%s' and C.constraint_uid = O.object_uid",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               btUID, indexUID, constrType);
@@ -3957,7 +3957,7 @@ short CmpSeabaseDDL::getUsingObject(ExeCliInterface *cliInterface,
   Lng32 cliRC = 0;
   
   char buf[4000];
-  str_sprintf(buf, "select trim(catalog_name) || '.' || trim(schema_name) || '.' || trim(object_name) from %s.\"%s\".%s T, %s.\"%s\".%s VU where VU.used_object_uid = %Ld and T.object_uid = VU.using_view_uid  and T.valid_def = 'Y' ",
+  str_sprintf(buf, "select trim(catalog_name) || '.' || trim(schema_name) || '.' || trim(object_name) from %s.\"%s\".%s T, %s.\"%s\".%s VU where VU.used_object_uid = %ld and T.object_uid = VU.using_view_uid  and T.valid_def = 'Y' ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS_USAGE,
               objUID);
@@ -4067,7 +4067,7 @@ short CmpSeabaseDDL::getUsingViews(ExeCliInterface *cliInterface,
   str_sprintf(buf, "select '\"' || trim(catalog_name) || '\"' || '.' || '\"' || trim(schema_name) || '\"' || '.' || '\"' || trim(object_name) || '\"' "
                    "from %s.\"%s\".%s T, %s.\"%s\".%s VU "
                    "where T.object_uid = VU.using_view_uid  and "
-                   "T.valid_def = 'Y' and VU.used_object_uid = %Ld ",
+                   "T.valid_def = 'Y' and VU.used_object_uid = %ld ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS_USAGE,
               objectUID);
@@ -4202,7 +4202,7 @@ short CmpSeabaseDDL::getAllIndexes(ExeCliInterface *cliInterface,
   Lng32 cliRC = 0;
 
   char query[4000];
-  str_sprintf(query, "select O.catalog_name, O.schema_name, O.object_name, O.object_uid from %s.\"%s\".%s I, %s.\"%s\".%s O ,  %s.\"%s\".%s T where I.base_table_uid = %Ld and I.index_uid = O.object_uid %s and I.index_uid = T.table_uid and I.keytag != 0 for read committed access ",
+  str_sprintf(query, "select O.catalog_name, O.schema_name, O.object_name, O.object_uid from %s.\"%s\".%s I, %s.\"%s\".%s O ,  %s.\"%s\".%s T where I.base_table_uid = %ld and I.index_uid = O.object_uid %s and I.index_uid = T.table_uid and I.keytag != 0 for read committed access ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_INDEXES,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLES,
@@ -4563,7 +4563,7 @@ short CmpSeabaseDDL::updateSeabaseMDObjectsTable(
   NAString quotedObjName;
   ToQuotedString(quotedObjName, NAString(objName), FALSE);
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %Ld, %Ld, %Ld, '%s', '%s', %d, %d, %Ld )",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %ld, %ld, %ld, '%s', '%s', %d, %d, %ld )",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               catName, quotedSchName.data(), quotedObjName.data(),
               objectTypeLit,
@@ -4712,7 +4712,7 @@ short CmpSeabaseDDL::updateSeabaseMDTable(
   Lng32 rowTotalLength = 0;
   for (Lng32 i = 0; i < numKeys; i++)
     {
-      str_sprintf(buf, "upsert into %s.\"%s\".%s values (%Ld, '%s', %d, %d, %d, %d, 0)",
+      str_sprintf(buf, "upsert into %s.\"%s\".%s values (%ld, '%s', %d, %d, %d, %d, 0)",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
                   objUID,
                   keyInfo->colName, 
@@ -4898,7 +4898,7 @@ short CmpSeabaseDDL::updateSeabaseMDTable(
         }
       else
         {
-          str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, '%s', %d, '%s', %d, '%s', %d, %d, %d, %d, %d, '%s', %d, %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', %Ld)",
+          str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, '%s', %d, '%s', %d, '%s', %d, %d, %d, %d, %d, '%s', %d, %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', %ld)",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
                       objUID,
                       colInfo->colName, 
@@ -5006,7 +5006,7 @@ short CmpSeabaseDDL::updateSeabaseMDTable(
           hbaseCreateOptions = tableInfo->hbaseCreateOptions;
         }
 
-      str_sprintf(buf, "upsert into %s.\"%s\".%s values (%Ld, '%s', '%s', %d, %d, %d, %d, %Ld) ",
+      str_sprintf(buf, "upsert into %s.\"%s\".%s values (%ld, '%s', '%s', %d, %d, %d, %d, %ld) ",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLES,
                   objUID, 
                   rowFormat,
@@ -5049,7 +5049,7 @@ short CmpSeabaseDDL::updateSeabaseMDTable(
                      catalogNamePart.data(), schemaNamePart.data(), objectNamePart.data(),
                      COM_BASE_TABLE_OBJECT_LIT);
                         
-      str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, %d, %d, %d, %d, %d, %Ld, 0) ",
+      str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, %d, %d, %d, %d, %d, %ld, 0) ",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_INDEXES,
                   baseTableUID,
                   indexInfo->keytag,
@@ -5121,7 +5121,7 @@ short CmpSeabaseDDL::updateSeabaseMDSPJ(
   NAString quotedLibObjName;
   ToQuotedString(quotedLibObjName, NAString(libName), FALSE);
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %Ld, %Ld, %Ld, '%s', '%s', %d, %d, 0 )",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %ld, %ld, %ld, '%s', '%s', %d, %d, 0 )",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               catName, quotedSchName.data(), quotedLibObjName.data(),
               COM_LIBRARY_OBJECT_LIT,
@@ -5140,7 +5140,7 @@ short CmpSeabaseDDL::updateSeabaseMDSPJ(
       return -1;
     }
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, '%s', %d, 0)",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, '%s', %d, 0)",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_LIBRARIES,
               libObjUID, libPath, routineInfo->library_version);
   
@@ -5193,7 +5193,7 @@ short CmpSeabaseDDL::updateSeabaseMDSPJ(
     return -1;
                                  
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', %Ld, '%s', 0 )",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', %ld, '%s', 0 )",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_ROUTINES,
               spjObjUID,
               routineInfo->UDR_type,
@@ -5221,7 +5221,7 @@ short CmpSeabaseDDL::updateSeabaseMDSPJ(
       return -1;
     }
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, %Ld, 0)",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, %ld, 0)",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_LIBRARIES_USAGE,
               libObjUID, spjObjUID);
 
@@ -5267,7 +5267,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
 
   if (objType == COM_LIBRARY_OBJECT) 
     {
-      str_sprintf(buf, "delete from %s.\"%s\".%s where library_uid = %Ld",
+      str_sprintf(buf, "delete from %s.\"%s\".%s where library_uid = %ld",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_LIBRARIES,
                   objUID);
       cliRC = cliInterface->executeImmediate(buf);
@@ -5281,7 +5281,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
   
   if (objType == COM_SEQUENCE_GENERATOR_OBJECT) 
     {
-      str_sprintf(buf, "delete from %s.\"%s\".%s where seq_uid = %Ld",
+      str_sprintf(buf, "delete from %s.\"%s\".%s where seq_uid = %ld",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_SEQ_GEN,
                   objUID);
       cliRC = cliInterface->executeImmediate(buf);
@@ -5292,7 +5292,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
         }
     }
   
-  str_sprintf(buf, "delete from %s.\"%s\".%s where object_uid = %Ld",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where object_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               objUID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -5304,7 +5304,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
     }
 
   // delete data from TEXT table
-  str_sprintf(buf, "delete from %s.\"%s\".%s where text_uid = %Ld",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where text_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TEXT,
               objUID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -5317,7 +5317,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
 
   if (objType == COM_USER_DEFINED_ROUTINE_OBJECT)
   {
-    str_sprintf(buf, "delete from %s.\"%s\".%s where udr_uid = %Ld",
+    str_sprintf(buf, "delete from %s.\"%s\".%s where udr_uid = %ld",
                 getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_ROUTINES,
                 objUID);
     cliRC = cliInterface->executeImmediate(buf);
@@ -5326,7 +5326,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
         cliInterface->retrieveSQLDiagnostics(CmpCommon::diags());
         return -1;
       }
-    str_sprintf(buf, "delete from %s.\"%s\".%s where used_udr_uid = %Ld",
+    str_sprintf(buf, "delete from %s.\"%s\".%s where used_udr_uid = %ld",
                 getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_LIBRARIES_USAGE,
                 objUID);
     cliRC = cliInterface->executeImmediate(buf);
@@ -5338,7 +5338,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
     return 0;  // nothing else to do for routines
   }
 
-  str_sprintf(buf, "delete from %s.\"%s\".%s where object_uid = %Ld ",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where object_uid = %ld ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
               objUID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -5349,7 +5349,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
       return -1;
     }
 
-  str_sprintf(buf, "delete from %s.\"%s\".%s where table_uid = %Ld ",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where table_uid = %ld ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLES,
               objUID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -5362,7 +5362,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
 
   if (objType == COM_INDEX_OBJECT)
     {
-      str_sprintf(buf, "delete from %s.\"%s\".%s where index_uid = %Ld ",
+      str_sprintf(buf, "delete from %s.\"%s\".%s where index_uid = %ld ",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_INDEXES,
                   objUID);
       cliRC = cliInterface->executeImmediate(buf);
@@ -5376,7 +5376,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
 
   if (objType == COM_VIEW_OBJECT)
     {
-      str_sprintf(buf, "delete from %s.\"%s\".%s where view_uid  = %Ld ",
+      str_sprintf(buf, "delete from %s.\"%s\".%s where view_uid  = %ld ",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS,
                   objUID);
       cliRC = cliInterface->executeImmediate(buf);
@@ -5387,7 +5387,7 @@ short CmpSeabaseDDL::deleteFromSeabaseMDTable(
           return -1;
         }
 
-      str_sprintf(buf, "delete from %s.\"%s\".%s where using_view_uid  = %Ld ",
+      str_sprintf(buf, "delete from %s.\"%s\".%s where using_view_uid  = %ld ",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS_USAGE,
                   objUID);
       cliRC = cliInterface->executeImmediate(buf);
@@ -5424,7 +5424,7 @@ short CmpSeabaseDDL::deleteConstraintInfoFromSeabaseMDTables(
     return -1;
   
   // delete data from table constraints MD
-  str_sprintf(buf, "delete from %s.\"%s\".%s where table_uid  = %Ld and constraint_uid = %Ld",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where table_uid  = %ld and constraint_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
               tableUID, constrUID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -5436,7 +5436,7 @@ short CmpSeabaseDDL::deleteConstraintInfoFromSeabaseMDTables(
     }
   
   // delete data from ref constraints MD
-  str_sprintf(buf, "delete from %s.\"%s\".%s where ref_constraint_uid  = %Ld and unique_constraint_uid = %Ld",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where ref_constraint_uid  = %ld and unique_constraint_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_REF_CONSTRAINTS,
               constrUID, otherConstrUID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -5448,7 +5448,7 @@ short CmpSeabaseDDL::deleteConstraintInfoFromSeabaseMDTables(
     }
 
   // delete data from unique ref constraints usage MD
-  str_sprintf(buf, "delete from %s.\"%s\".%s where unique_constraint_uid = %Ld and foreign_constraint_uid = %Ld",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where unique_constraint_uid = %ld and foreign_constraint_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_UNIQUE_REF_CONSTR_USAGE,
               otherConstrUID, constrUID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -5460,7 +5460,7 @@ short CmpSeabaseDDL::deleteConstraintInfoFromSeabaseMDTables(
     }
 
   // delete data from TEXT table
-  str_sprintf(buf, "delete from %s.\"%s\".%s where text_uid = %Ld",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where text_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TEXT,
               constrUID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -5599,13 +5599,13 @@ short CmpSeabaseDDL::updateObjectRedefTime(
   if ((flags & MD_OBJECTS_STORED_DESC) != 0)
     {
       if (rt == -2)
-        str_sprintf(buf, "update %s.\"%s\".%s set flags = bitor(flags, %Ld) where catalog_name = '%s' and schema_name = '%s' and object_name = '%s' and object_type = '%s' ", 
+        str_sprintf(buf, "update %s.\"%s\".%s set flags = bitor(flags, %ld) where catalog_name = '%s' and schema_name = '%s' and object_name = '%s' and object_type = '%s' ", 
                     getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
                     flags,
                     catName.data(), quotedSchName.data(), quotedObjName.data(),
                     objType);
       else
-        str_sprintf(buf, "update %s.\"%s\".%s set redef_time = %Ld, flags = bitor(flags, %Ld) where catalog_name = '%s' and schema_name = '%s' and object_name = '%s' and object_type = '%s' ",
+        str_sprintf(buf, "update %s.\"%s\".%s set redef_time = %ld, flags = bitor(flags, %ld) where catalog_name = '%s' and schema_name = '%s' and object_name = '%s' and object_type = '%s' ",
                     getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
                     redefTime,
                     flags,
@@ -5614,7 +5614,7 @@ short CmpSeabaseDDL::updateObjectRedefTime(
     }
   else if (rt != -2)
     {
-      str_sprintf(buf, "update %s.\"%s\".%s set redef_time = %Ld where catalog_name = '%s' and schema_name = '%s' and object_name = '%s' and object_type = '%s' ",
+      str_sprintf(buf, "update %s.\"%s\".%s set redef_time = %ld where catalog_name = '%s' and schema_name = '%s' and object_name = '%s' and object_type = '%s' ",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
                   redefTime,
                   catName.data(), quotedSchName.data(), quotedObjName.data(),
@@ -5686,7 +5686,7 @@ short CmpSeabaseDDL::updateObjectName(
   NAString quotedObjName;
   ToQuotedString(quotedObjName, NAString(objName), FALSE);
 
-  str_sprintf(buf, "update %s.\"%s\".%s set catalog_name = '%s', schema_name = '%s', object_name = '%s' where object_uid = %Ld ",
+  str_sprintf(buf, "update %s.\"%s\".%s set catalog_name = '%s', schema_name = '%s', object_name = '%s' where object_uid = %ld ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               catName, quotedSchName.data(), quotedObjName.data(),
               objUID);
@@ -5718,7 +5718,7 @@ short CmpSeabaseDDL::updateObjectAuditAttr(
   
   if (objectUID < 0)
      return -1;
-  str_sprintf(buf, "update %s.\"%s\".%s set is_audited = '%s' where  table_uid = %Ld ",
+  str_sprintf(buf, "update %s.\"%s\".%s set is_audited = '%s' where  table_uid = %ld ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLES,
               (audited ? "Y" : "N"),
               objectUID);
@@ -5749,11 +5749,11 @@ short CmpSeabaseDDL::updateObjectFlags(
     flags = ~inFlags;
 
   if (reset)
-    str_sprintf(buf, "update %s.\"%s\".%s set flags = bitand(flags, %Ld) where object_uid = %Ld",
+    str_sprintf(buf, "update %s.\"%s\".%s set flags = bitand(flags, %ld) where object_uid = %ld",
                 getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
                 flags, objUID);
   else
-    str_sprintf(buf, "update %s.\"%s\".%s set flags = bitor(flags, %Ld) where object_uid = %Ld",
+    str_sprintf(buf, "update %s.\"%s\".%s set flags = bitor(flags, %ld) where object_uid = %ld",
                 getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
                 flags, objUID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -6342,7 +6342,7 @@ short CmpSeabaseDDL::updateTextTable(ExeCliInterface *cliInterface,
       else
         currDataLen = dataLen - currPos;
 
-      str_sprintf(queryBuf, "insert into %s.\"%s\".%s values (%Ld, %d, %d, %d, 0, cast(? as char(%d bytes) not null))",
+      str_sprintf(queryBuf, "insert into %s.\"%s\".%s values (%ld, %d, %d, %d, 0, cast(? as char(%d bytes) not null))",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TEXT,
                   objUID,
                   textType,
@@ -6386,7 +6386,7 @@ short CmpSeabaseDDL::deleteFromTextTable(ExeCliInterface *cliInterface,
   Lng32 cliRC = 0;
 
   char buf[1000];
-  str_sprintf(buf, "delete from %s.\"%s\".%s where text_uid = %Ld and text_type = %d and sub_id = %d",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where text_uid = %ld and text_type = %d and sub_id = %d",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TEXT,
               objUID, static_cast<int>(textType), subID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -7043,7 +7043,7 @@ short CmpSeabaseDDL::dropSeabaseStats(ExeCliInterface *cliInterface,
 
   // delete any histogram statistics
   
-  str_sprintf(buf, "delete from %s.\"%s\".%s where table_uid = %Ld",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where table_uid = %ld",
               catName, schName, HBASE_HIST_NAME, tableUID);
 
   cliRC = cliInterface->executeImmediate(buf);
@@ -7064,7 +7064,7 @@ short CmpSeabaseDDL::dropSeabaseStats(ExeCliInterface *cliInterface,
           return -1;
         }
 
-      str_sprintf(buf, "delete from %s.\"%s\".%s where table_uid = %Ld",
+      str_sprintf(buf, "delete from %s.\"%s\".%s where table_uid = %ld",
                   catName, schName, HBASE_HISTINT_NAME, tableUID);
       cliRC = cliInterface->executeImmediate(buf);
 
@@ -7081,7 +7081,7 @@ short CmpSeabaseDDL::dropSeabaseStats(ExeCliInterface *cliInterface,
   // Delete the row in the persistent_samples table if one exists
 
   str_sprintf(buf, "select translate(sample_name using ucs2toutf8) from "
-                   " (delete from %s.\"%s\".%s where table_uid = %Ld) as t",
+                   " (delete from %s.\"%s\".%s where table_uid = %ld) as t",
               catName, schName, HBASE_PERS_SAMP_NAME, tableUID);
     
   Lng32 len = 0;
@@ -7131,7 +7131,7 @@ short CmpSeabaseDDL::updateSeabaseVersions(
 
   Int64 initTime = NA_JulianTimestamp();
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values ('METADATA', %d, %d, %Ld, 'initialize trafodion'), ('DATAFORMAT', %d, %d, %Ld, 'initialize trafodion'), ('SOFTWARE', %d, %d, %Ld, 'initialize trafodion') ",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values ('METADATA', %d, %d, %ld, 'initialize trafodion'), ('DATAFORMAT', %d, %d, %ld, 'initialize trafodion'), ('SOFTWARE', %d, %d, %ld, 'initialize trafodion') ",
               sysCat, SEABASE_MD_SCHEMA, SEABASE_VERSIONS,
               (majorVersion != -1 ? majorVersion : METADATA_MAJOR_VERSION),
               (METADATA_MINOR_VERSION * 10 + METADATA_UPDATE_VERSION), initTime,
@@ -7167,7 +7167,7 @@ short CmpSeabaseDDL::updateSeabaseAuths(
 
   Int64 initTime = NA_JulianTimestamp();
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values (%d, 'DB__ROOT', 'TRAFODION', 'U', %d, 'Y', %Ld,%Ld, 0) ",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values (%d, 'DB__ROOT', 'TRAFODION', 'U', %d, 'Y', %ld,%ld, 0) ",
               sysCat, SEABASE_MD_SCHEMA, SEABASE_AUTHS,
               SUPER_USER, SUPER_USER, initTime, initTime);
   cliRC = cliInterface->executeImmediate(buf);
@@ -7786,7 +7786,7 @@ void  CmpSeabaseDDL::createSeabaseSequence(StmtDDLCreateSequence  * createSequen
   ToQuotedString(quotedSeqObjName, seqNamePart, FALSE);
 
   Int32 objOwner = ComUser::getCurrentUser();
-  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %Ld, %Ld, %Ld, '%s', '%s', %d, %d, 0)",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %ld, %ld, %ld, '%s', '%s', %d, %d, 0)",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               catalogNamePart.data(), quotedSchName.data(), quotedSeqObjName.data(),
               COM_SEQUENCE_GENERATOR_OBJECT_LIT,
@@ -7805,7 +7805,7 @@ void  CmpSeabaseDDL::createSeabaseSequence(StmtDDLCreateSequence  * createSequen
       return;
     }
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', %Ld, %d, %Ld, %Ld, %Ld, %Ld, '%s', %Ld, %Ld, %Ld, %Ld, %Ld, 0)",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', %ld, %d, %ld, %ld, %ld, %ld, '%s', %ld, %ld, %ld, %ld, %ld, 0)",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_SEQ_GEN,
               (sgo->isExternalSG() ? COM_EXTERNAL_SG_LIT : COM_INTERNAL_SG_LIT),
               seqObjUID, 
@@ -7817,9 +7817,9 @@ void  CmpSeabaseDDL::createSeabaseSequence(StmtDDLCreateSequence  * createSequen
               (sgo->getCycle() ? COM_YES_LIT : COM_NO_LIT), 
               sgo->getCache(),
               sgo->getStartValue(),
-              0LL,
+              0L,
               createTime,
-              0LL);
+              0L);
 
   cliRC = cliInterface.executeImmediate(buf);
   if (cliRC < 0)
@@ -7930,25 +7930,25 @@ void  CmpSeabaseDDL::alterSeabaseSequence(StmtDDLCreateSequence  * alterSequence
   strcpy(setOptions, " set ");
   if (sgo->isIncrementSpecified())
     {
-      str_sprintf(tmpBuf, " increment = %Ld,", sgo->getIncrement());
+      str_sprintf(tmpBuf, " increment = %ld,", sgo->getIncrement());
       strcat(setOptions, tmpBuf);
     }
 
   if (sgo->isMaxValueSpecified())
     {
-      str_sprintf(tmpBuf, " max_value = %Ld,", sgo->getMaxValue());
+      str_sprintf(tmpBuf, " max_value = %ld,", sgo->getMaxValue());
       strcat(setOptions, tmpBuf);
     }
 
   if (sgo->isMinValueSpecified())
     {
-      str_sprintf(tmpBuf, " min_value = %Ld,", sgo->getMinValue());
+      str_sprintf(tmpBuf, " min_value = %ld,", sgo->getMinValue());
       strcat(setOptions, tmpBuf);
     }
 
   if (sgo->isCacheSpecified())
     {
-      str_sprintf(tmpBuf, " cache_size = %Ld,", sgo->getCache());
+      str_sprintf(tmpBuf, " cache_size = %ld,", sgo->getCache());
       strcat(setOptions, tmpBuf);
     }
 
@@ -7965,10 +7965,10 @@ void  CmpSeabaseDDL::alterSeabaseSequence(StmtDDLCreateSequence  * alterSequence
     }
   
   Int64 redefTime = NA_JulianTimestamp();
-  str_sprintf(tmpBuf, " redef_ts = %Ld", redefTime);
+  str_sprintf(tmpBuf, " redef_ts = %ld", redefTime);
   strcat(setOptions, tmpBuf);
 
-  str_sprintf(buf, "update %s.\"%s\".%s %s where seq_uid = %Ld",
+  str_sprintf(buf, "update %s.\"%s\".%s %s where seq_uid = %ld",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_SEQ_GEN,
               setOptions,
               seqUID);
@@ -8581,7 +8581,7 @@ void CmpSeabaseDDL::updateVersion()
   
   Int64 updateTime = NA_JulianTimestamp();
 
-  str_sprintf(queryBuf, "update %s.\"%s\".%s set major_version = %Ld, minor_version = %Ld, init_time = %Ld, comment = 'update version'  where version_type = 'SOFTWARE' ",
+  str_sprintf(queryBuf, "update %s.\"%s\".%s set major_version = %ld, minor_version = %ld, init_time = %ld, comment = 'update version'  where version_type = 'SOFTWARE' ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VERSIONS,
               softMajorVersion, softMinorVersion,
               updateTime);
@@ -10495,7 +10495,7 @@ std::string commandString;
      roleList += to_string((long long int)roleIDs[i]);
    }
 
-   str_sprintf(buf, "update %s.\"%s\".%s set auth_redef_time = %Ld "
+   str_sprintf(buf, "update %s.\"%s\".%s set auth_redef_time = %ld "
                     "where auth_id in (%s)",
               systemCatalog.c_str(), SEABASE_MD_SCHEMA, SEABASE_AUTHS,
               redefTime, roleList.c_str());

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sqlcomp/CmpSeabaseDDLroutine.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLroutine.cpp b/core/sql/sqlcomp/CmpSeabaseDDLroutine.cpp
index 4386d94..9a75d75 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLroutine.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLroutine.cpp
@@ -229,7 +229,7 @@ short CmpSeabaseDDL::getUsingRoutines(ExeCliInterface *cliInterface,
   char buf[4000];
   str_sprintf(buf, "select trim(catalog_name) || '.' || trim(schema_name) || '.' || trim(object_name), "
                    "object_type, object_uid from %s.\"%s\".%s T, %s.\"%s\".%s LU "
-                   "where LU.using_library_uid = %Ld and "
+                   "where LU.using_library_uid = %ld and "
                    "T.object_uid = LU.used_udr_uid  and T.valid_def = 'Y' ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_LIBRARIES_USAGE,
@@ -389,7 +389,7 @@ void CmpSeabaseDDL::createSeabaseLibrary(
     }
  
   char * query = new(STMTHEAP) char[1000];
-  str_sprintf(query, "insert into %s.\"%s\".%s values (%Ld, '%s', %d, 0)",
+  str_sprintf(query, "insert into %s.\"%s\".%s values (%ld, '%s', %d, 0)",
 	      getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_LIBRARIES,
 	      objUID,
               libFileName.data(),
@@ -643,7 +643,7 @@ void  CmpSeabaseDDL::alterSeabaseLibrary(StmtDDLAlterLibrary  *alterLibraryNode,
   
   char buf[2048]; // filename max length is 512. Additional bytes for long
   // library names.
-  str_sprintf(buf, "update %s.\"%s\".%s set library_filename = '%s' where library_uid = %Ld",
+  str_sprintf(buf, "update %s.\"%s\".%s set library_filename = '%s' where library_uid = %ld",
 	      getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_LIBRARIES,
 	      libFileName.data(),
 	      libUID);
@@ -808,7 +808,7 @@ void CmpSeabaseDDL::createSeabaseRoutine(
 
   char * buf = new(STMTHEAP) char[200];
   str_sprintf(buf, "select library_filename from %s.\"%s\".%s"
-              " where library_uid = %Ld for read uncommitted access",
+              " where library_uid = %ld for read uncommitted access",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_LIBRARIES, libUID);
 
   cliRC = cliInterface.fetchRowsPrologue(buf, TRUE/*no exec*/);
@@ -1236,7 +1236,7 @@ void CmpSeabaseDDL::createSeabaseRoutine(
   
 
   char * query = new(STMTHEAP) char[2000+MAX_SIGNATURE_LENGTH];
-  str_sprintf(query, "insert into %s.\"%s\".%s values (%Ld, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', %Ld, '%s', 0)",
+  str_sprintf(query, "insert into %s.\"%s\".%s values (%ld, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', %ld, '%s', 0)",
 	      getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_ROUTINES,
 	      objUID,
               udrType.data(),
@@ -1267,7 +1267,7 @@ void CmpSeabaseDDL::createSeabaseRoutine(
     }
 
   char * query1 = new(STMTHEAP) char[1000];
-  str_sprintf(query1, "insert into %s.\"%s\".%s values (%Ld, %Ld, 0)",
+  str_sprintf(query1, "insert into %s.\"%s\".%s values (%ld, %ld, 0)",
 	      getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_LIBRARIES_USAGE,
 	      libUID, objUID);
   
@@ -1760,7 +1760,7 @@ short CmpSeabaseDDL::dropSeabaseLibmgr(ExeCliInterface *cliInterface)
   Set_SqlParser_Flags(INTERNAL_QUERY_FROM_EXEUTIL);
 
   str_sprintf(queryBuf, "drop schema if exists %s.\"%s\" cascade ",
-              getSystemCatalog(),SEABASE_LIBMGR_SCHEMA, DB__ROOT);
+              getSystemCatalog(),SEABASE_LIBMGR_SCHEMA);
 
   // Drop the SEABASE_LIBMGR_SCHEMA schema
   cliRC = cliInterface->executeImmediate(queryBuf);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
index d44139c..e295c7a 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
@@ -188,7 +188,7 @@ char schemaObjectLit[3] = {0};
       } 
    }
    
-   str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %Ld, %Ld, %Ld, '%s', '%s', %d, %d, 0)",
+   str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %ld, %ld, %ld, '%s', '%s', %d, %d, 0)",
                getSystemCatalog(),SEABASE_MD_SCHEMA,SEABASE_OBJECTS,
                catalogName.data(), quotedSchName.data(), quotedObjName.data(),
                schemaObjectLit,
@@ -1379,7 +1379,7 @@ char buf[4000];
    {
       str_sprintf(buf,"UPDATE %s.\"%s\".%s "
                       "SET object_owner = %d "
-                      "WHERE object_UID = %Ld",
+                      "WHERE object_UID = %ld",
                   getSystemCatalog(),SEABASE_MD_SCHEMA,SEABASE_OBJECTS,
                   newOwnerID,schemaUID);
       cliRC = cliInterface.executeImmediate(buf);


[04/13] incubator-trafodion git commit: [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/43c312df/core/sql/executor/ExExeUtilGetStats.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilGetStats.cpp b/core/sql/executor/ExExeUtilGetStats.cpp
index 81d94e8..7d86f8a 100644
--- a/core/sql/executor/ExExeUtilGetStats.cpp
+++ b/core/sql/executor/ExExeUtilGetStats.cpp
@@ -249,7 +249,7 @@ ExExeUtilGetStatisticsTcb::moveCompilationStatsToUpQueue(CompilationStatsData *c
     short timestamp[8];
 
     INTERPRETTIMESTAMP(cmpStats->compileStartTime(), timestamp);
-    str_sprintf(startTime, "%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",                        
+    sprintf(startTime, "%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",                        
 		                    timestamp[0], // year
                         timestamp[1], // month
                         timestamp[2], // day
@@ -259,13 +259,13 @@ ExExeUtilGetStatisticsTcb::moveCompilationStatsToUpQueue(CompilationStatsData *c
 			                  timestamp[6], // fraction
                         timestamp[7]);// fraction
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Compile Start Time\t: %s", 
 				  startTime);
 	  moveRowToUpQueue(statsBuf_);
 
     INTERPRETTIMESTAMP(cmpStats->compileEndTime(), timestamp);
-    str_sprintf(endTime, "%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",                        
+    sprintf(endTime, "%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",                        
 		                    timestamp[0], // year
                         timestamp[1], // month
                         timestamp[2], // day
@@ -275,52 +275,52 @@ ExExeUtilGetStatisticsTcb::moveCompilationStatsToUpQueue(CompilationStatsData *c
 			                  timestamp[6], // fraction
                         timestamp[7]);// fraction
 
-	  str_sprintf(statsBuf_,
+	  sprintf(statsBuf_,
 				  "Compile End Time\t: %s", 
 				  endTime);
 	  moveRowToUpQueue(statsBuf_);
 
-	  str_sprintf(statsBuf_,
+	  sprintf(statsBuf_,
 				  "Compiler ID\t\t: %s", 
 				  cmpStats->compilerId());
 	  moveRowToUpQueue(statsBuf_);
 
-	  str_sprintf(statsBuf_,
+	  sprintf(statsBuf_,
 				  "CPU Total\t\t: %d", 
 				  cmpStats->cmpCpuTotal());
 	  moveRowToUpQueue(statsBuf_);
 
-	  str_sprintf(statsBuf_,
+	  sprintf(statsBuf_,
 				  "CPU Binder\t\t: %d", 
 				  cmpStats->cmpCpuBinder());
 	  moveRowToUpQueue(statsBuf_);
 
-	  str_sprintf(statsBuf_,
+	  sprintf(statsBuf_,
 				  "CPU Normalizer\t\t: %d", 
 				  cmpStats->cmpCpuNormalizer());
 	  moveRowToUpQueue(statsBuf_);
 
-	  str_sprintf(statsBuf_,
+	  sprintf(statsBuf_,
 				  "CPU Analyzer\t\t: %d", 
 				  cmpStats->cmpCpuAnalyzer());
 	  moveRowToUpQueue(statsBuf_);
 
-	  str_sprintf(statsBuf_,
+	  sprintf(statsBuf_,
 				  "CPU Optimizer\t\t: %d", 
 				  cmpStats->cmpCpuOptimizer());
 	  moveRowToUpQueue(statsBuf_);
 
-	  str_sprintf(statsBuf_,
+	  sprintf(statsBuf_,
 				  "CPU Generator\t\t: %d", 
 				  cmpStats->cmpCpuGenerator());
 	  moveRowToUpQueue(statsBuf_);
 
-	  str_sprintf(statsBuf_,
+	  sprintf(statsBuf_,
 				  "Metadata Cache Hits\t: %d", 
 				  cmpStats->metadataCacheHits());
 	  moveRowToUpQueue(statsBuf_);
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Metadata Cache Lookups\t: %d", 
 				  cmpStats->metadataCacheLookups());
 	  moveRowToUpQueue(statsBuf_);
@@ -331,73 +331,73 @@ ExExeUtilGetStatisticsTcb::moveCompilationStatsToUpQueue(CompilationStatsData *c
     switch(cmpStats->queryCacheState())
     {
     case 0:
-      str_sprintf(queryCacheStateBuf,"TEXT");
+      sprintf(queryCacheStateBuf,"TEXT");
     break;
     case 1:
-      str_sprintf(queryCacheStateBuf,"TEMPLATE");
+      sprintf(queryCacheStateBuf,"TEMPLATE");
     break;
     case 2:
-      str_sprintf(queryCacheStateBuf,"MISS NON-CACHEABLE");
+      sprintf(queryCacheStateBuf,"MISS NON-CACHEABLE");
     break;
     case 3:
-      str_sprintf(queryCacheStateBuf,"MISS CACHEABLE");
+      sprintf(queryCacheStateBuf,"MISS CACHEABLE");
     break;
     default:
-      str_sprintf(queryCacheStateBuf,"UNKNOWN");
+      sprintf(queryCacheStateBuf,"UNKNOWN");
     break;
     };
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Query Cache State\t: %s", 
 				  queryCacheStateBuf);
     moveRowToUpQueue(statsBuf_);
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Histogram Cache Hits\t: %d", 
 				  cmpStats->histogramCacheHits());
 	  moveRowToUpQueue(statsBuf_);
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Histogram Cache Lookups\t: %d", 
 				  cmpStats->histogramCacheLookups());
 	  moveRowToUpQueue(statsBuf_);
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Statement Heap Size\t: %d", 
 				  cmpStats->stmtHeapSize());
 	  moveRowToUpQueue(statsBuf_);
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Context Heap Size\t: %d", 
 				  cmpStats->contextHeapSize());
 	  moveRowToUpQueue(statsBuf_);
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Optimization Tasks\t: %d", 
 				  cmpStats->optTasks());
 	  moveRowToUpQueue(statsBuf_);
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Optimization Contexts\t: %d", 
 				  cmpStats->optContexts());
 	  moveRowToUpQueue(statsBuf_);
 
     if( cmpStats->isRecompile() )
     {
-      str_sprintf(statsBuf_, "Is Recompile\t\t: YES");
+      sprintf(statsBuf_, "Is Recompile\t\t: YES");
     }
     else
     {
-      str_sprintf(statsBuf_, "Is Recompile\t\t: NO");
+      sprintf(statsBuf_, "Is Recompile\t\t: NO");
     }
 	  moveRowToUpQueue(statsBuf_);
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Compile Info\t\t: %s", 
 				  cmpStats->compileInfo());
 	  moveRowToUpQueue(statsBuf_);
 
-    str_sprintf(statsBuf_,
+    sprintf(statsBuf_,
 				  "Compile Info Length\t: %d", 
 				  cmpStats->compileInfoLen());
 	  moveRowToUpQueue(statsBuf_);
@@ -595,38 +595,38 @@ short ExExeUtilGetStatisticsTcb::work()
 	    strcat(statsBuf_, formattedFloatVal);
 	    moveRowToUpQueue(statsBuf_);
 
-	    str_sprintf(statsBuf_, "Fragment Size(Kb)      Total: %-4d  Master: %-4d  ESP: %-4d  DP2: %-4d",
+	    sprintf(statsBuf_, "Fragment Size(Kb)      Total: %-4d  Master: %-4d  ESP: %-4d  DP2: %-4d",
 			csi.totalFragmentSize(),
 			csi.masterFragmentSize(),
 			csi.espFragmentSize(),
 			csi.dp2FragmentSize());
 	    moveRowToUpQueue(statsBuf_);
 
-	    str_sprintf(statsBuf_, "Operators              Total: %-3d",
+	    sprintf(statsBuf_, "Operators              Total: %-3d",
 			csi.totalOps());
 	    moveRowToUpQueue(statsBuf_);
 	    
-            str_sprintf(statsBuf_, "  Joins                HJ: %-3d  MJ: %-3d  NJ: %-3d   Total: %-3d",
+            sprintf(statsBuf_, "  Joins                HJ: %-3d  MJ: %-3d  NJ: %-3d   Total: %-3d",
 			csi.hj(), csi.mj(), csi.nj(),  csi.totalJoins());
 	    moveRowToUpQueue(statsBuf_);
-            str_sprintf(statsBuf_, "  Others               ESPExchange: %-3d  DP2Oper: %-3d  UDR: %-3d  BMO: %-3d",  
+            sprintf(statsBuf_, "  Others               ESPExchange: %-3d  DP2Oper: %-3d  UDR: %-3d  BMO: %-3d",  
 			csi.exchangeOps(), csi.dp2Ops(), csi.udr(), csi.bmo());
 
 	    moveRowToUpQueue(statsBuf_);
             
 	    if (masterStats->numOfRootEsps() > 0)
 	      {
-		str_sprintf(statsBuf_, "Parallelism            Root(%d)  DOP(%d)",
+		sprintf(statsBuf_, "Parallelism            Root(%d)  DOP(%d)",
 			    masterStats->numOfRootEsps(), csi.dop());
 	      }
 	    else
 	      {
-		str_sprintf(statsBuf_, "Parallelism            Root(0)  DOP(%d)",
+		sprintf(statsBuf_, "Parallelism            Root(0)  DOP(%d)",
 			    csi.dop());
 	      }
 	    moveRowToUpQueue(statsBuf_);
 	      
-	    str_sprintf(statsBuf_,   "Query Characteristics  MandatoryXP: %s  MissingStats: %s  FullScanOnTable: %s ",
+	    sprintf(statsBuf_,   "Query Characteristics  MandatoryXP: %s  MissingStats: %s  FullScanOnTable: %s ",
 			(csi.mandatoryCrossProduct() ? "Yes" : "No"),
 			(csi.missingStats() ? "Yes" : "No"),
 			(csi.fullScanOnTable() ? "Yes" : "No"));
@@ -634,18 +634,18 @@ short ExExeUtilGetStatisticsTcb::work()
 
 	    if (csi.fullScanOnTable())
 	      {
-		str_sprintf(statsBuf_,"                       RowsAccessedByFullScan %f",
+		sprintf(statsBuf_,"                       RowsAccessedByFullScan %f",
 			    csi.dp2RowsAccessedForFullScan());
 		moveRowToUpQueue(statsBuf_);
 	      }
 
-	    str_sprintf(statsBuf_,   "Query Execution        DOP: %d  Affinity: %d  XnReqd: %s",
+	    sprintf(statsBuf_,   "Query Execution        DOP: %d  Affinity: %d  XnReqd: %s",
 			csi.dop(), csi.affinityNumber(), 
 			(masterStats->xnReqd() ? "Yes" : "No"));
 	    moveRowToUpQueue(statsBuf_);
             if (csi.bmo() > 0)
             {
-              str_sprintf(statsBuf_, "                       OverFlowMode: %s  OverFlowSize: %Ld",
+              sprintf(statsBuf_, "                       OverFlowMode: %s  OverFlowSize: %f",
 			ExBMOStats::getScratchOverflowMode(csi.ofMode()),
                         csi.ofSize());
 	      moveRowToUpQueue(statsBuf_);
@@ -695,7 +695,7 @@ short ExExeUtilGetStatisticsTcb::work()
 	      CONVERTTIMESTAMP(masterStats->getElapsedStartTime(),0,-1,0);
 	    
 	    INTERPRETTIMESTAMP(juliantimestamp, timestamp);
-	    str_sprintf(statsBuf_, "Start Time             %04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
+	    sprintf(statsBuf_, "Start Time             %04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
 			timestamp[0], timestamp[1], timestamp[2],
 			timestamp[3], timestamp[4], timestamp[5],
 			timestamp[6], timestamp[7]);
@@ -710,7 +710,7 @@ short ExExeUtilGetStatisticsTcb::work()
 		  CONVERTTIMESTAMP(masterStats->getFirstRowReturnTime(),0,-1,0);
 		
 		INTERPRETTIMESTAMP(juliantimestamp, timestamp);
-		str_sprintf(statsBuf_, "First Row Returned     %04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
+		sprintf(statsBuf_, "First Row Returned     %04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
 			    timestamp[0], timestamp[1], timestamp[2],
 			    timestamp[3], timestamp[4], timestamp[5],
 			    timestamp[6], timestamp[7]);
@@ -722,7 +722,7 @@ short ExExeUtilGetStatisticsTcb::work()
 	      CONVERTTIMESTAMP(masterStats->getElapsedEndTime(),0,-1,0);
 
 	    INTERPRETTIMESTAMP(juliantimestamp, timestamp);
-	    str_sprintf(statsBuf_, "End Time               %04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
+	    sprintf(statsBuf_, "End Time               %04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
 			timestamp[0], timestamp[1], timestamp[2],
 			timestamp[3], timestamp[4], timestamp[5],
 			timestamp[6], timestamp[7]);
@@ -739,7 +739,7 @@ short ExExeUtilGetStatisticsTcb::work()
 	    sec = sec % 60;
 	    ULng32 hour = min/60;
 	    min = min % 60;
-	    str_sprintf (statsBuf_,  "Elapsed Time                      %02u:%02u:%02u.%06u",
+	    sprintf (statsBuf_,  "Elapsed Time                      %02u:%02u:%02u.%06u",
 			 hour, min, sec, usec);
 	    moveRowToUpQueue(statsBuf_);
 	    
@@ -757,7 +757,7 @@ short ExExeUtilGetStatisticsTcb::work()
 	    sec = sec % 60;
 	    hour = min/60;
 	    min = min % 60;
-	    str_sprintf (statsBuf_,  "Compile Time                      %02u:%02u:%02u.%06u",
+	    sprintf (statsBuf_,  "Compile Time                      %02u:%02u:%02u.%06u",
 			 hour, min, sec, usec);
 	    moveRowToUpQueue(statsBuf_);
 
@@ -777,7 +777,7 @@ short ExExeUtilGetStatisticsTcb::work()
 		sec = sec % 60;
 		hour = min/60;
 		min = min % 60;
-		str_sprintf (statsBuf_,  "Fixup Time                        %02u:%02u:%02u.%06u",
+		sprintf (statsBuf_,  "Fixup Time                        %02u:%02u:%02u.%06u",
 			     hour, min, sec, usec);
 		moveRowToUpQueue(statsBuf_);
 		
@@ -792,7 +792,7 @@ short ExExeUtilGetStatisticsTcb::work()
 		sec = sec % 60;
 		hour = min/60;
 		min = min % 60;
-		str_sprintf (statsBuf_,  "Freeup Time                       %02u:%02u:%02u.%06u",
+		sprintf (statsBuf_,  "Freeup Time                       %02u:%02u:%02u.%06u",
 			     hour, min, sec, usec);
 		moveRowToUpQueue(statsBuf_);
 	      }
@@ -808,14 +808,14 @@ short ExExeUtilGetStatisticsTcb::work()
 	    sec = sec % 60;
 	    hour = min/60;
 	    min = min % 60;
-	    str_sprintf (statsBuf_,  "Execution Time                    %02u:%02u:%02u.%06u",
+	    sprintf (statsBuf_,  "Execution Time                    %02u:%02u:%02u.%06u",
 			 hour, min, sec, usec);
 	    moveRowToUpQueue(statsBuf_);
 
 	    if ((NOT getStatsTdb().oldFormat()) &&
 		(NOT getStatsTdb().shortFormat()))
 	      {
-		str_sprintf (statsBuf_,  "Rows Affected          %Ld",
+		sprintf (statsBuf_,  "Rows Affected          %ld",
 			     masterStats->getRowsAffected());
 		moveRowToUpQueue(statsBuf_);
 	      }
@@ -872,32 +872,32 @@ short ExExeUtilGetStatisticsTcb::work()
 
 		strcpy(line, "UniqueQueryId          ");
 		strncat(line, masterStats->getQueryId(), 43);
-		str_sprintf(statsBuf_, line);
+		sprintf(statsBuf_, line);
 		moveRowToUpQueue(statsBuf_);
 
 		strcpy(line, "                       ");
 		strcat(line, &masterStats->getQueryId()[43]);
-		str_sprintf(statsBuf_, line);
+		sprintf(statsBuf_, line);
 		moveRowToUpQueue(statsBuf_);
 
-		//str_sprintf (statsBuf_,    "UniqueQueryId          %s",
+		//sprintf (statsBuf_,    "UniqueQueryId          %s",
 		//	     masterStats->getQueryId());
 	      }
 	    else
 	      {
-		str_sprintf (statsBuf_,    "UniqueQueryId          NULL");
+		sprintf (statsBuf_,    "UniqueQueryId          NULL");
 		moveRowToUpQueue(statsBuf_);
 	      }
 
 	    if (masterStats->compilerCacheHit())
-	      str_sprintf (statsBuf_,  "Compiler Cache Hit     Yes");
+	      sprintf (statsBuf_,  "Compiler Cache Hit     Yes");
 	    else
-	      str_sprintf (statsBuf_,  "Compiler Cache Hit     No");
+	      sprintf (statsBuf_,  "Compiler Cache Hit     No");
 	    moveRowToUpQueue(statsBuf_);
-	    str_sprintf (statsBuf_,    "Executor Cache Hit     No");
+	    sprintf (statsBuf_,    "Executor Cache Hit     No");
 	    moveRowToUpQueue(statsBuf_);
 
-	    str_sprintf (statsBuf_,    "ESPs                   Total: %-4d  Reused: %-4d  New: %-4d",
+	    sprintf (statsBuf_,    "ESPs                   Total: %-4d  Reused: %-4d  New: %-4d",
 			 (masterStats->numOfTotalEspsUsed() > 0 ? masterStats->numOfTotalEspsUsed() : 0),
 			 (masterStats->numOfTotalEspsUsed() > 0 ? masterStats->numOfTotalEspsUsed() : 0) -
 			 (masterStats->numOfNewEspsStarted() > 0 ? masterStats->numOfNewEspsStarted() : 0),
@@ -957,10 +957,10 @@ short ExExeUtilGetStatisticsTcb::work()
                 // Needs to use the getStatsTdb.statsMergeType_ since MERGE can't take operator stats as MERGE token
                 // value and str_parse_stmt_name will convert it to the relevant stats type
                 if (s == NULL)
-		  str_sprintf(statsQuery_, "select variable_info from table(statistics(null, 'STMT=CURRENT,MERGE=%d'));",
+		  sprintf(statsQuery_, "select variable_info from table(statistics(null, 'STMT=CURRENT,MERGE=%d'));",
                               getStatsTdb().statsMergeType_);
 		else
-		  str_sprintf(statsQuery_, "select variable_info from table(statistics(null, 'STMT=%s,MERGE=%d'));",
+		  sprintf(statsQuery_, "select variable_info from table(statistics(null, 'STMT=%s,MERGE=%d'));",
 				s, getStatsTdb().statsMergeType_);
 	      }
 	    else
@@ -979,7 +979,7 @@ short ExExeUtilGetStatisticsTcb::work()
                 const char *s = getStatsTdb().stmtName_;
                 if (s == NULL)
                   s = "CURRENT";
-                str_sprintf(statsQuery_, gluedQuery, s, getStatsTdb().statsMergeType_);
+                sprintf(statsQuery_, gluedQuery, s, getStatsTdb().statsMergeType_);
                 NADELETEBASIC(gluedQuery, getMyHeap());
             }
 	    step_ = FETCH_PROLOGUE_;
@@ -1088,30 +1088,30 @@ short ExExeUtilGetStatisticsTcb::work()
 		  {
 		    if (hdfsAccess_)
 		      {
-			str_sprintf(statsBuf_, "%15s%-15s%-15s%-10s%-15s%-15s",
+			sprintf(statsBuf_, "%-15s%15s%15s%10s%15s%15s",
 				    "Table Name", "Records", "Records", "Hdfs",  "Hdfs I/O", "Hdfs Access");
 			moveRowToUpQueue(statsBuf_);
 			
-			str_sprintf(statsBuf_, "%15s%-15s%-15s%-10s%-15s%-15s",
+			sprintf(statsBuf_, "%15s%15s%15s%10s%15s%15s",
 				" ", "Accessed", "Used", "I/Os", "Bytes", "Time(usec)");
 
 		      }
 		    else if (getStatsTdb().oldFormat())
 		      {
-			str_sprintf(statsBuf_, "%15s%-15s%-12s%-8s%-10s%-13s%-6s",
+			sprintf(statsBuf_, "%-15s%15s%12s%8s%10s%13s%6s",
 				    "Table Name", "Records", "Records", "Disk", "Message", "Message", "Lock");
 			moveRowToUpQueue(statsBuf_);
 			
-			str_sprintf(statsBuf_, "%15s%-15s%-12s%-8s%-10s%-13s%-6s",
+			sprintf(statsBuf_, "%15s%15s%12s%8s%10s%13s%6s",
 				    " ", "Accessed", "Used", "I/Os", "Count", "Bytes", "");
 		      }
 		    else
 		      {
-			str_sprintf(statsBuf_, "%15s%-15s%-15s%-10s%-10s%-15s%-6s%-6s%-15s",
+			sprintf(statsBuf_, "%-15s%15s%15s%10s%10s%15s%6s%6s%15s",
 				    "Table Name", "Records", "Records", "Disk", "Message", "Message", "Lock", "Lock", "Disk Process");
 			moveRowToUpQueue(statsBuf_);
 			
-			str_sprintf(statsBuf_, "%15s%-15s%-15s%-10s%-10s%-15s%-6s%-6s%-15s",
+			sprintf(statsBuf_, "%15s%15s%15s%10s%10s%15s%6s%6s%15s",
 				" ", "Accessed", "Used", "I/Os", "Count", "Bytes", "Escl", "Wait", "Busy Time");
 		      }
 
@@ -1121,10 +1121,10 @@ short ExExeUtilGetStatisticsTcb::work()
 			 (statsMergeType_ == SQLCLIDEV_OPERATOR_STATS))
 		  {
 		    // Construct heading.
-		    str_sprintf(statsBuf_, "%4s%4s%4s%4s%19s%9s%9s%9s%20s%20s",
+		    sprintf(statsBuf_, "%4s%4s%4s%4s%19s%9s%9s%9s%20s%20s",
 				"OP", "LC", "RC", "EX", "TDB_NAME", "EstRows", "ActRows", "WC", "Oper Cpu Time", "Details");
 		    moveRowToUpQueue(statsBuf_);
-		    str_sprintf(statsBuf_, "%4s%4s%4s%4s%19s%9s%9s%9s%20s%20s",
+		    sprintf(statsBuf_, "%4s%4s%4s%4s%19s%9s%9s%9s%20s%20s",
 				"--", "--", "--", "--", "--------", "-------", "-------", "--", "-------------", "-------");
 		    moveRowToUpQueue(statsBuf_);
 		    moveRowToUpQueue(" ");
@@ -1197,74 +1197,74 @@ short ExExeUtilGetStatisticsTcb::work()
 	      return WORK_CALL_AGAIN;	//come back later
 
 	    getSubstrInfo(statsRow_, statsRowlen_, "AnsiName:", sstrbuf);
-	    str_sprintf(statsBuf_, "%15s", sstrbuf);
+	    sprintf(statsBuf_, "%15s", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 
 	    if (hdfsAccess_)
             {
-	      str_sprintf(statsBuf_, "%15s", " ");
+	      sprintf(statsBuf_, "%15s", " ");
 	      getSubstrInfo(statsRow_, statsRowlen_, "AccessedRows:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%15s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "UsedRows:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%15s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "HbaseSumIOCalls:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-10s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%10s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "MessagesBytes:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%15s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "HbaseSumIOTime:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%15s", sstrbuf);
 	    }
             else if (getStatsTdb().oldFormat())
             {
-              str_sprintf(statsBuf_, "%15s", " ");
+              sprintf(statsBuf_, "%15s", " ");
 	      getSubstrInfo(statsRow_, statsRowlen_, "AccessedRows:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%15s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "UsedRows:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-12s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%12s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "DiskIOs:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-8s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%8s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "NumMessages:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-10s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%10s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "MessagesBytes:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-13s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%13s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "Escalations:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-6s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%6s", sstrbuf);
             }
             else
             {
-	      str_sprintf(statsBuf_, "%15s", " ");
+	      sprintf(statsBuf_, "%15s", " ");
 	      getSubstrInfo(statsRow_, statsRowlen_, "AccessedRows:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%15s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "UsedRows:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%15s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "DiskIOs:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-10s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%10s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "NumMessages:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-10s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%10s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "MessagesBytes:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%15s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "Escalations:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-6s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%6s", sstrbuf);
 
 	      getSubstrInfo(statsRow_, statsRowlen_, "LockWaits:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-6s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%6s", sstrbuf);
   	    
 	      getSubstrInfo(statsRow_, statsRowlen_, "ProcessBusyTime:", sstrbuf);
-	      str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", sstrbuf);
+	      sprintf(&statsBuf_[strlen(statsBuf_)], "%15s", sstrbuf);
 	    }
 
 	    moveRowToUpQueue(statsBuf_);
@@ -1280,88 +1280,88 @@ short ExExeUtilGetStatisticsTcb::work()
 	      return WORK_CALL_AGAIN;	//come back later
 	   
 	    getSubstrInfo(statsRow_, statsRowlen_, "AccessedRows:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Accessed Rows", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Accessed Rows", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 	
 	    getSubstrInfo(statsRow_, statsRowlen_, "UsedRows:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Used Rows", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Used Rows", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 
 	    getSubstrInfo(statsRow_, statsRowlen_, "NumMessages:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Message Count", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Message Count", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 
 	    getSubstrInfo(statsRow_, statsRowlen_, "MessagesBytes:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Message Bytes", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Message Bytes", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 
 	    getSubstrInfo(statsRow_, statsRowlen_, "StatsBytes:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Stats Bytes", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Stats Bytes", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 
 	    getSubstrInfo(statsRow_, statsRowlen_, "DiskIOs:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Disk IOs", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Disk IOs", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 
 	    getSubstrInfo(statsRow_, statsRowlen_, "LockWaits:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Lock Waits", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Lock Waits", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 
 	    getSubstrInfo(statsRow_, statsRowlen_, "Escalations:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Lock Escalations", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Lock Escalations", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 		
 	
 	    getSubstrInfo(statsRow_, statsRowlen_, "CpuTime:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "SQL Process Busy Time", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "SQL Process Busy Time", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 	    
 	    getSubstrInfo(statsRow_, statsRowlen_, "SpaceTotal:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10sKB", "SQL Space Allocated", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10sKB", "SQL Space Allocated", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 	    
 	    getSubstrInfo(statsRow_, statsRowlen_, "SpaceUsed:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10sKB", "SQL Space Used", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10sKB", "SQL Space Used", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 	    
 	    getSubstrInfo(statsRow_, statsRowlen_, "HeapTotal:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10sKB", "SQL Heap Allocated", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10sKB", "SQL Heap Allocated", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 	    
 	    getSubstrInfo(statsRow_, statsRowlen_, "HeapUsed:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10sKB", "SQL Heap Used", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10sKB", "SQL Heap Used", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 	    
 	    getSubstrInfo(statsRow_, statsRowlen_, "Dp2SpaceTotal:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10sKB", "EID Space Allocated", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10sKB", "EID Space Allocated", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 	    
 	    getSubstrInfo(statsRow_, statsRowlen_, "Dp2SpaceUsed:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10sKB", "EID Space Used", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10sKB", "EID Space Used", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 	    
 	    getSubstrInfo(statsRow_, statsRowlen_, "Dp2HeapTotal:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10sKB", "EID Heap Allocated", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10sKB", "EID Heap Allocated", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 	    
 	    getSubstrInfo(statsRow_, statsRowlen_, "Dp2HeapUsed:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10sKB", "EID Heap Used", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10sKB", "EID Heap Used", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 	    
 	    getSubstrInfo(statsRow_, statsRowlen_, "Opens:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Opens", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Opens", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
     
 	    getSubstrInfo(statsRow_, statsRowlen_, "OpenTime:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Open Time", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Open Time", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 
 	    getSubstrInfo(statsRow_, statsRowlen_, "Newprocess:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Processes Created", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Processes Created", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 
 	    getSubstrInfo(statsRow_, statsRowlen_, "NewprocessTime:", sstrbuf);
-	    str_sprintf(statsBuf_, "%25s%10s", "Process Create Time", sstrbuf);
+	    sprintf(statsBuf_, "%-25s%10s", "Process Create Time", sstrbuf);
 	    moveRowToUpQueue(statsBuf_);
 
 	    step_ = FETCH_STATS_ROW_;
@@ -1584,7 +1584,7 @@ ExExeUtilGetRTSStatisticsTcb::~ExExeUtilGetRTSStatisticsTcb()
 void ExExeUtilGetRTSStatisticsTcb::formatInt64(SQLSTATS_ITEM stat, char* targetString)
 {
   Int64 value = stat.int64_value;
-  str_sprintf(targetString, "%Ld", value);
+  sprintf(targetString, "%ld", value);
   if (value >= 1000)
   {
     Lng32 intSize = str_len(targetString);
@@ -1600,7 +1600,7 @@ void ExExeUtilGetRTSStatisticsTcb::formatWInt64(SQLSTATS_ITEM stat, char* target
   else
   {
     Int64 value = stat.int64_value;
-    str_sprintf(targetString, "%Ld", value);
+    sprintf(targetString, "%ld", value);
     Lng32 intSize = str_len(targetString);
     AddCommas(targetString,intSize);
   }
@@ -1644,7 +1644,7 @@ void ExExeUtilGetRTSStatisticsTcb::formatOperStats(SQLSTATS_ITEM* operStatsItems
   {
     moveRowToUpQueue("");
     isHeadingDisplayed_ = TRUE;
-    str_sprintf(statsBuf_, "%5s%5s%5s%5s%5s%5s%25s%5s%-13s%-19s%-19s%-19s %10s", 
+    sprintf(statsBuf_, "%5s%5s%5s%5s%5s%5s %-25s%5s%13s%19s%19s%19s %10s", 
       "LC","RC","Id","PaId", "ExId","Frag","TDB Name","DOP", "Dispatches","Oper CPU Time","Est. Records Used", 
       "Act. Records Used","Details");
     moveRowToUpQueue(statsBuf_);
@@ -1656,70 +1656,70 @@ void ExExeUtilGetRTSStatisticsTcb::formatOperStats(SQLSTATS_ITEM* operStatsItems
     formatInt64(operStatsItems[1], valString);
   else
     strcpy(valString, "."); 
-  str_sprintf(statsBuf_, "%5s", valString);        
+  sprintf(statsBuf_, "%5s", valString);        
  
   // Right Child TdbId
   if(operStatsItems[2].int64_value > 0)
     formatInt64(operStatsItems[2], valString);
   else
     strcpy(valString, ".");       
-  str_sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);      
+  sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);      
 
   // Id
   formatInt64(operStatsItems[0], valString);
-  str_sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);        
+  sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);        
 
   // Parent Tdb Id
   if(operStatsItems[3].int64_value > 0)
     formatInt64(operStatsItems[3], valString);
   else
     strcpy(valString, ".");
-  str_sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);      
+  sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);      
 
   // Explain Node Id
   formatInt64(operStatsItems[4], valString);
-  str_sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);
+  sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);
   // Frag Num 
   formatInt64(operStatsItems[5], valString);
-  str_sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);
+  sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);
    
   // Tdb Name
   if (operStatsItems[6].error_code)
-    str_sprintf(&statsBuf_[strlen(statsBuf_)], "%25s", "");   
+    sprintf(&statsBuf_[strlen(statsBuf_)], " %-25s", "");   
   else
   {
     operStatsItems[6].str_value[operStatsItems[6].str_ret_len] = '\0'; 
-    str_sprintf(&statsBuf_[strlen(statsBuf_)], "%25s", operStatsItems[6].str_value);
+    sprintf(&statsBuf_[strlen(statsBuf_)], " %-25s", operStatsItems[6].str_value);
   }
 
   // dop 
   formatInt64(operStatsItems[12], valString);
-  str_sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);
+  sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", valString);
   
   // Number of Work Calls
   formatInt64(operStatsItems[7], valString);
-  str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-13s", valString);
+  sprintf(&statsBuf_[strlen(statsBuf_)], "%13s", valString);
   
   // CPU Time
   formatInt64(operStatsItems[8], valString);
-  str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-19s", valString);
+  sprintf(&statsBuf_[strlen(statsBuf_)], "%19s", valString);
   
   // Estimated Rows Used
   FormatFloat(valString, intSize, valSize, operStatsItems[9].double_value,
 			FALSE, TRUE);
-  str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-19s", valString); 
+  sprintf(&statsBuf_[strlen(statsBuf_)], "%19s", valString); 
   
   // Actual Rows Used 
   formatInt64(operStatsItems[10], valString);
-  str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-19s", valString);
+  sprintf(&statsBuf_[strlen(statsBuf_)], "%19s", valString);
 
   // Detail
   if (operStatsItems[11].error_code)
-    str_sprintf(&statsBuf_[strlen(statsBuf_)], "%s", "");   
+    sprintf(&statsBuf_[strlen(statsBuf_)], "%s", "");   
   else
   {
     operStatsItems[11].str_value[operStatsItems[11].str_ret_len] = '\0'; 
-    str_sprintf(&statsBuf_[strlen(statsBuf_)], " %s", operStatsItems[11].str_value);
+    sprintf(&statsBuf_[strlen(statsBuf_)], " %s", operStatsItems[11].str_value);
   }
 }
 
@@ -2065,24 +2065,24 @@ short ExExeUtilGetRTSStatisticsTcb::work()
           {
           case SQLSTATS_QUERY_ID:
             masterStatsItems_[i].str_value[masterStatsItems_[i].str_ret_len] = '\0';
-            str_sprintf(statsBuf_, "%25s%s", "Qid", masterStatsItems_[i].str_value);
+            sprintf(statsBuf_, "%-25s%s", "Qid", masterStatsItems_[i].str_value);
             break;
           case SQLSTATS_SOURCE_STR:
             masterStatsItems_[i].str_value[masterStatsItems_[i].str_ret_len] = '\0';
             masterStatsItems_[i].str_value[masterStatsItems_[i].str_ret_len+1] = '\0';
-            str_sprintf(statsBuf_, "%25s%s", "Source String ", masterStatsItems_[i].str_value);
+            sprintf(statsBuf_, "%-25s%s", "Source String ", masterStatsItems_[i].str_value);
             break;
           case SQLSTATS_SOURCE_STR_LEN:
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "SQL Source Length", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "SQL Source Length", Int64Val);
 
             break;
           case SQLSTATS_COMP_START_TIME:
 	    jtime = CONVERTTIMESTAMP(masterStatsItems_[i].int64_value,0,-1,NULL);
 	    INTERPRETTIMESTAMP(jtime, timestamp);
-	    str_sprintf(statsBuf_, "%25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
+	    sprintf(statsBuf_, "%-25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
                         "Compile Start Time",
 			timestamp[0], timestamp[1], timestamp[2],
 			timestamp[3], timestamp[4], timestamp[5],
@@ -2093,14 +2093,14 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             {
 	      jtime = CONVERTTIMESTAMP(masterStatsItems_[i].int64_value,0,-1,NULL);
 	      INTERPRETTIMESTAMP(jtime, timestamp);
-	      str_sprintf(statsBuf_, "%25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
+	      sprintf(statsBuf_, "%-25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
                           "Compile End Time",
 			  timestamp[0], timestamp[1], timestamp[2],
 			  timestamp[3], timestamp[4], timestamp[5],
 			  timestamp[6], timestamp[7]);
             }
             else
-              str_sprintf(statsBuf_, "%25s%s", "Compile End Time", "-1");
+              sprintf(statsBuf_, "%-25s%s", "Compile End Time", "-1");
 	    break;
           case SQLSTATS_COMP_TIME:
             sec = (ULng32) (masterStatsItems_[i].int64_value / 1000000);
@@ -2110,7 +2110,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             hour = min/60;
             min = min % 60;
 
-            str_sprintf (statsBuf_,  "%34s%4u:%02u:%02u.%06u", 
+            sprintf (statsBuf_,  "%-34s%4u:%02u:%02u.%06u", 
                           "Compile Elapsed Time",hour, min, sec,usec);   
             break;
           case SQLSTATS_EXECUTE_START_TIME:
@@ -2118,14 +2118,14 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             {
 	      jtime = CONVERTTIMESTAMP(masterStatsItems_[i].int64_value,0,-1,NULL);
 	      INTERPRETTIMESTAMP(jtime, timestamp);
-	      str_sprintf(statsBuf_, "%25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
+	      sprintf(statsBuf_, "%-25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
                           "Execute Start Time",
 			  timestamp[0], timestamp[1], timestamp[2],
 			  timestamp[3], timestamp[4], timestamp[5],
 			  timestamp[6], timestamp[7]);
             }
             else
-              str_sprintf(statsBuf_, "%25s%s", "Execute Start Time", "-1");
+              sprintf(statsBuf_, "%-25s%s", "Execute Start Time", "-1");
 	    break;
           case SQLSTATS_FIRST_ROW_RET_TIME:
             if (masterStatsItems_[i].int64_value != -1)
@@ -2133,7 +2133,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
 	      jtime =  CONVERTTIMESTAMP(masterStatsItems_[i].int64_value,0,-1,NULL);
     	    
               INTERPRETTIMESTAMP(jtime, timestamp);
-	      str_sprintf(statsBuf_, "%25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
+	      sprintf(statsBuf_, "%-25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
                           "First Row Returned Time",
 			  timestamp[0], timestamp[1], timestamp[2],
 			  timestamp[3], timestamp[4], timestamp[5],
@@ -2141,7 +2141,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             }
             else
             {
-              str_sprintf(statsBuf_, "%25s%s",
+              sprintf(statsBuf_, "%-25s%s",
                             "First Row Returned Time", "-1");
             }
             break;
@@ -2150,28 +2150,28 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             {
 	      jtime = CONVERTTIMESTAMP(masterStatsItems_[i].int64_value,0,-1,NULL);
 	      INTERPRETTIMESTAMP(jtime, timestamp);
-	      str_sprintf(statsBuf_, "%25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
+	      sprintf(statsBuf_, "%-25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
                           "Cancel Time",
 			  timestamp[0], timestamp[1], timestamp[2],
 			  timestamp[3], timestamp[4], timestamp[5],
 			  timestamp[6], timestamp[7]);
             }
             else
-              str_sprintf(statsBuf_, "%25s%s", "Cancel Time", "-1");
+              sprintf(statsBuf_, "%-25s%s", "Cancel Time", "-1");
             break;
          case SQLSTATS_EXECUTE_END_TIME:
             if (masterStatsItems_[i].int64_value != -1)
             {
 	      jtime = CONVERTTIMESTAMP(masterStatsItems_[i].int64_value,0,-1,NULL);
 	      INTERPRETTIMESTAMP(jtime, timestamp);
-	      str_sprintf(statsBuf_, "%25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
+	      sprintf(statsBuf_, "%-25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
                           "Execute End Time",
 			  timestamp[0], timestamp[1], timestamp[2],
 			  timestamp[3], timestamp[4], timestamp[5],
 			  timestamp[6], timestamp[7]);
             }
             else
-              str_sprintf(statsBuf_, "%25s%s", "Execute End Time", "-1");
+              sprintf(statsBuf_, "%-25s%s", "Execute End Time", "-1");
 	    break;
           case SQLSTATS_EXECUTE_TIME:
             sec = (ULng32) (masterStatsItems_[i].int64_value / 1000000);
@@ -2181,7 +2181,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             hour = min/60;
             min = min % 60;
 
-            str_sprintf (statsBuf_,  "%34s%4u:%02u:%02u.%06u", "Execute Elapsed Time",
+            sprintf (statsBuf_,  "%-34s%4u:%02u:%02u.%06u", "Execute Elapsed Time",
   	                  hour, min, sec,usec);   
             break;
           case SQLSTATS_FIXUP_TIME:
@@ -2191,85 +2191,85 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             sec = sec % 60;
             hour = min/60;
             min = min % 60;
-            str_sprintf (statsBuf_,  "%34s%4u:%02u:%02u.%06u", "Fixup Elapsed Time",
+            sprintf (statsBuf_,  "%34s%4u:%02u:%02u.%06u", "Fixup Elapsed Time",
   	                  hour, min, sec,usec);   
             break;
           case SQLSTATS_STMT_STATE:
             stmtState  = (short)masterStatsItems_[i].int64_value;
             if (stmtState >= SQLSTMT_STATE_UNKNOWN)
               stmtState = SQLSTMT_STATE_UNKNOWN;
-            str_sprintf(statsBuf_, "%25s%s", "State", 
+            sprintf(statsBuf_, "%-25s%s", "State", 
                   Statement::stmtState((Statement::State)stmtState));
             break;
           case SQLSTATS_ROWS_AFFECTED:
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Rows Affected", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Rows Affected", Int64Val);
             break;
           case SQLSTATS_ROWS_RETURNED:
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Rows Returned", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Rows Returned", Int64Val);
             break;
           case SQLSTATS_SQL_ERROR_CODE:
-            str_sprintf(statsBuf_, "%25s%-d", "SQL Error Code", 
+            sprintf(statsBuf_, "%-25s%-d", "SQL Error Code", 
                       (Lng32)masterStatsItems_[i].int64_value);
             break;
           case SQLSTATS_STATS_ERROR_CODE:
-            str_sprintf(statsBuf_, "%25s%-d", "Stats Error Code", 
+            sprintf(statsBuf_, "%-25s%-d", "Stats Error Code", 
                       (Lng32)masterStatsItems_[i].int64_value);
             break;
           case SQLSTATS_QUERY_TYPE:
             queryType = (short)masterStatsItems_[i].int64_value;
-            str_sprintf(statsBuf_, "%25s%s", "Query Type",
+            sprintf(statsBuf_, "%-25s%s", "Query Type",
                     ComTdbRoot::getQueryTypeText(queryType));
             break;
           case SQLSTATS_SUBQUERY_TYPE:
             subqueryType = (short)masterStatsItems_[i].int64_value;
-            str_sprintf(statsBuf_, "%25s%s", "Sub Query Type",
+            sprintf(statsBuf_, "%-25s%s", "Sub Query Type",
                     ComTdbRoot::getSubqueryTypeText(subqueryType));
             break;
           case SQLSTATS_EST_ROWS_ACCESSED:
             FormatFloat(formattedFloatVal, intSize, valSize, masterStatsItems_[i].double_value,
 			FALSE, TRUE);
-            str_sprintf(statsBuf_, "%25s%s", "Estimated Accessed Rows", 
+            sprintf(statsBuf_, "%-25s%s", "Estimated Accessed Rows", 
                       formattedFloatVal);
             break;
           case SQLSTATS_EST_ROWS_USED:
             FormatFloat(formattedFloatVal, intSize, valSize, masterStatsItems_[i].double_value,
 			FALSE, TRUE);
-            str_sprintf(statsBuf_, "%25s%s", "Estimated Used Rows", formattedFloatVal);
+            sprintf(statsBuf_, "%-25s%s", "Estimated Used Rows", formattedFloatVal);
             break;
           case SQLSTATS_PARENT_QUERY_ID:
             masterStatsItems_[i].str_value[masterStatsItems_[i].str_ret_len] = '\0';
-            str_sprintf(statsBuf_, "%25s%s", "Parent Qid", masterStatsItems_[i].str_value);
+            sprintf(statsBuf_, "%-25s%s", "Parent Qid", masterStatsItems_[i].str_value);
             break;
           case SQLSTATS_PARENT_QUERY_SYSTEM:
             masterStatsItems_[i].str_value[masterStatsItems_[i].str_ret_len] = '\0';
-            str_sprintf(statsBuf_, "%25s%s", "Parent Query System", masterStatsItems_[i].str_value);
+            sprintf(statsBuf_, "%-25s%s", "Parent Query System", masterStatsItems_[i].str_value);
             break;
           case SQLSTATS_CHILD_QUERY_ID:
             masterStatsItems_[i].str_value[masterStatsItems_[i].str_ret_len] = '\0';
-            str_sprintf(statsBuf_, "%25s%s", "Child Qid", masterStatsItems_[i].str_value);
+            sprintf(statsBuf_, "%-25s%s", "Child Qid", masterStatsItems_[i].str_value);
             break;
           case SQLSTATS_NUM_SQLPROCS:
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Number of SQL Processes", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Number of SQL Processes", Int64Val);
             break;
           case SQLSTATS_NUM_CPUS:
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Number of Cpus", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Number of Cpus", Int64Val);
             break;
           case SQLSTATS_TRANSID:
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
-            str_sprintf(statsBuf_, "%25s%s", "Transaction Id", 
+            sprintf(statsBuf_, "%-25s%s", "Transaction Id", 
                               Int64Val);
             break;
           case SQLSTATS_SUSPEND_TIME_ID:
@@ -2277,61 +2277,61 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             {
 	      jtime = CONVERTTIMESTAMP(masterStatsItems_[i].int64_value,0,-1,NULL);
 	      INTERPRETTIMESTAMP(jtime, timestamp);
-	      str_sprintf(statsBuf_, "%25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
+	      sprintf(statsBuf_, "%-25s%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
                           "Last Suspend Time",
 			  timestamp[0], timestamp[1], timestamp[2],
 			  timestamp[3], timestamp[4], timestamp[5],
 			  timestamp[6], timestamp[7]);
             }
             else
-              str_sprintf(statsBuf_, "%25s%s", "Last Suspend Time", "-1");
+              sprintf(statsBuf_, "%-25s%s", "Last Suspend Time", "-1");
             break;
           case SQLSTATS_AQR_LAST_ERROR:
-            str_sprintf(statsBuf_, "%25s%-d", "Last Error before AQR", 
+            sprintf(statsBuf_, "%-25s%-d", "Last Error before AQR", 
 		 (Lng32)masterStatsItems_[i].int64_value);         
             break;
           case SQLSTATS_AQR_NUM_RETRIES:
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Number of AQR retries", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Number of AQR retries", Int64Val);
             break;
           case SQLSTATS_AQR_DELAY_BEFORE_RETRY:
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Delay before AQR", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Delay before AQR", Int64Val);
             break;
           case SQLSTATS_RECLAIM_SPACE_COUNT:
-            str_sprintf(statsBuf_, "%25s%-d", "No. of times reclaimed", 
+            sprintf(statsBuf_, "%-25s%-d", "No. of times reclaimed", 
 		 (Lng32)masterStatsItems_[i].int64_value);         
             break;
           case SQLSTATS_EXECUTE_COUNT:
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "No. of times executed", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "No. of times executed", Int64Val);
             break;
           case SQLSTATS_EXECUTE_TIME_MIN:
             microSecs = masterStatsItems_[i].int64_value % 1000000L;
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value/1000000);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value/1000000);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%0s.%06d secs", "Min. Execute Time", Int64Val,microSecs);
+            sprintf(statsBuf_, "%-25s%s.%06d secs", "Min. Execute Time", Int64Val,microSecs);
             break;
           case SQLSTATS_EXECUTE_TIME_MAX:
             microSecs = masterStatsItems_[i].int64_value % 1000000L;
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value/1000000);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value/1000000);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%0s.%06d secs", "Max. Execute Time", Int64Val,microSecs);
+            sprintf(statsBuf_, "%-25s%s.%06d secs", "Max. Execute Time", Int64Val,microSecs);
             break;
           case SQLSTATS_EXECUTE_TIME_AVG:
             microSecs = masterStatsItems_[i].int64_value % 1000000L;
-            str_sprintf(Int64Val, "%Ld", masterStatsItems_[i].int64_value/1000000);
+            sprintf(Int64Val, "%ld", masterStatsItems_[i].int64_value/1000000);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%0s.%06d secs", "Avg. Execute Time", Int64Val,microSecs);
+            sprintf(statsBuf_, "%-25s%s.%06d secs", "Avg. Execute Time", Int64Val,microSecs);
             break;
           default:
             statsBuf_[0] = '\0';
@@ -2341,7 +2341,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (moveRowToUpQueue(statsBuf_, strlen(statsBuf_), &rc) == -1)
               return rc;
         }
-        str_sprintf(statsBuf_, "%25s%s", "Stats Collection Type", 
+        sprintf(statsBuf_, "%-25s%s", "Stats Collection Type", 
                     ExStatisticsArea::getStatsTypeText(statsCollectType_));
         if (moveRowToUpQueue(statsBuf_, strlen(statsBuf_), &rc) == -1)
           return rc;
@@ -2413,182 +2413,182 @@ short ExExeUtilGetRTSStatisticsTcb::work()
           switch (measStatsItems_[i].statsItem_id)
           {
           case SQLSTATS_ACT_ROWS_ACCESSED:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Accessed Rows", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Accessed Rows", Int64Val);
             break;          
           case SQLSTATS_ACT_ROWS_USED:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Used Rows", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Used Rows", Int64Val);
             break;
           case SQLSTATS_SE_IOS:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "SE IOs", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "SE IOs", Int64Val);
             break;
           case SQLSTATS_SE_IO_BYTES:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "SE IO Bytes", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "SE IO Bytes", Int64Val);
             break;
           case SQLSTATS_SE_IO_MAX_TIME:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "SE IO MAX Time", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "SE IO MAX Time", Int64Val);
             break;
           case SQLSTATS_SQL_CPU_BUSY_TIME:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "SQL Process Busy Time", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "SQL Process Busy Time", Int64Val);
             break;
           case SQLSTATS_UDR_CPU_BUSY_TIME:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "UDR Process Busy Time", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "UDR Process Busy Time", Int64Val);
             break;
           case SQLSTATS_SQL_SPACE_ALLOC:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s KB", "SQL Space Allocated", Int64Val); 
+            sprintf(statsBuf_, "%-25s%s KB", "SQL Space Allocated", Int64Val); 
             break;
           case SQLSTATS_SQL_SPACE_USED:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s KB", "SQL Space Used", Int64Val); 
+            sprintf(statsBuf_, "%-25s%s KB", "SQL Space Used", Int64Val); 
             break;
           case SQLSTATS_SQL_HEAP_ALLOC:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s KB", "SQL Heap Allocated", Int64Val);
+            sprintf(statsBuf_, "%-25s%s KB", "SQL Heap Allocated", Int64Val);
             break;
           case SQLSTATS_SQL_HEAP_USED:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s KB", "SQL Heap Used", Int64Val);
+            sprintf(statsBuf_, "%-25s%s KB", "SQL Heap Used", Int64Val);
             break;
           case SQLSTATS_SQL_HEAP_WM:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s KB", "SQL Heap WM", Int64Val);
+            sprintf(statsBuf_, "%-25s%s KB", "SQL Heap WM", Int64Val);
             break;
           case SQLSTATS_OPENS:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Opens", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Opens", Int64Val);
             break;
           case SQLSTATS_OPEN_TIME:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Open Time", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Open Time", Int64Val);
             break;
           case SQLSTATS_PROCESS_CREATED:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Processes Created", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Processes Created", Int64Val);
             break;
           case SQLSTATS_PROCESS_CREATE_TIME:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Process Create Time", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Process Create Time", Int64Val);
             break;
           case SQLSTATS_REQ_MSG_CNT:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Request Message Count", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Request Message Count", Int64Val);
             break;
           case SQLSTATS_REQ_MSG_BYTES:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Request Message Bytes", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Request Message Bytes", Int64Val);
             break;
           case SQLSTATS_REPLY_MSG_CNT:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Reply Message Count", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Reply Message Count", Int64Val);
             break;
           case SQLSTATS_REPLY_MSG_BYTES:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Reply Message Bytes", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Reply Message Bytes", Int64Val);
             break;
           case SQLSTATS_SCRATCH_OVERFLOW_MODE:
-            str_sprintf(statsBuf_, "%25s%s", "Scr. Overflow Mode", 
+            sprintf(statsBuf_, "%-25s%s", "Scr. Overflow Mode", 
               ExBMOStats::getScratchOverflowMode((Int16)measStatsItems_[i].int64_value));
             break;
           case SQLSTATS_TOPN:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Sort TopN", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Sort TopN", Int64Val);
             break;
           case SQLSTATS_SCRATCH_FILE_COUNT:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Scr. File Count", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Scr. File Count", Int64Val);
             break;
           case SQLSTATS_BMO_SPACE_BUFFER_SIZE:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "BMO Space Buffer Size", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "BMO Space Buffer Size", Int64Val);
             break;
           case SQLSTATS_BMO_SPACE_BUFFER_COUNT:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "BMO Space Buffer Count", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "BMO Space Buffer Count", Int64Val);
             break;
           case SQLSTATS_SCRATCH_READ_COUNT:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Scr. Read Count", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Scr. Read Count", Int64Val);
             break;
           case SQLSTATS_SCRATCH_WRITE_COUNT:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Scr. Write Count", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Scr. Write Count", Int64Val);
             break;
           case SQLSTATS_SCRATCH_IO_SIZE:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Scr. IO Size", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Scr. IO Size", Int64Val);
             break;
           case SQLSTATS_SCRATCH_IO_MAX_TIME:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "Scr. IO Max Time", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Scr. IO Max Time", Int64Val);
             break;
           case SQLSTATS_INTERIM_ROW_COUNT:
-            str_sprintf(Int64Val, "%Ld", measStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", measStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(statsBuf_, "%25s%s", "BMO Interim Row Count", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "BMO Interim Row Count", Int64Val);
             break;
           default:
             statsBuf_[0] = '\0';
@@ -2664,13 +2664,13 @@ short ExExeUtilGetRTSStatisticsTcb::work()
           {         
           case SQLSTATS_SQL_CPU_BUSY_TIME:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s", "SQL Process Busy Time", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "SQL Process Busy Time", Int64Val);
             break;
           case SQLSTATS_SQL_MAX_WAIT_TIME:
             if (getenv("SQL_DISPLAY_WAIT_TIME"))
             {
                // Convert it into microseconds
-               str_sprintf(statsBuf_, "%25s%s", "SQL Max Wait Time",
+               sprintf(statsBuf_, "%-25s%s", "SQL Max Wait Time",
                  formatElapsedTime(timestampVal, rootOperStatsItems_[i].int64_value/1000));
             }
             else
@@ -2680,7 +2680,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (getenv("SQL_DISPLAY_WAIT_TIME"))
             {
                // Convert it into microseconds
-               str_sprintf(statsBuf_, "%25s%s", "SQL Avg Wait Time",
+               sprintf(statsBuf_, "%-25s%s", "SQL Avg Wait Time",
                  formatElapsedTime(timestampVal, rootOperStatsItems_[i].int64_value/1000));
             }
             else
@@ -2690,67 +2690,67 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
               formatWInt64( rootOperStatsItems_[i], Int64Val);
-              str_sprintf(statsBuf_, "%25s%s", "UDR Process Busy Time", Int64Val);
+              sprintf(statsBuf_, "%-25s%s", "UDR Process Busy Time", Int64Val);
             }
             else
               continue;
             break;
           case SQLSTATS_SQL_SPACE_ALLOC:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s KB", "SQL Space Allocated", Int64Val);
+            sprintf(statsBuf_, "%-25s%s KB", "SQL Space Allocated", Int64Val);
             break;
           case SQLSTATS_SQL_SPACE_USED:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s KB", "SQL Space Used", Int64Val);
+            sprintf(statsBuf_, "%-25s%s KB", "SQL Space Used", Int64Val);
             break;
           case SQLSTATS_SQL_HEAP_ALLOC:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s KB", "SQL Heap Allocated", Int64Val);
+            sprintf(statsBuf_, "%-25s%s KB", "SQL Heap Allocated", Int64Val);
             break;
           case SQLSTATS_SQL_HEAP_USED:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s KB", "SQL Heap Used", Int64Val);
+            sprintf(statsBuf_, "%-25s%s KB", "SQL Heap Used", Int64Val);
             break;
           case SQLSTATS_SQL_HEAP_WM:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s KB", "SQL Heap WM", Int64Val);
+            sprintf(statsBuf_, "%-25s%s KB", "SQL Heap WM", Int64Val);
             break;
           case SQLSTATS_OPENS:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s", "Opens", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Opens", Int64Val);
             break;
           case SQLSTATS_OPEN_TIME:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s", "Open Time", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Open Time", Int64Val);
             break;
           case SQLSTATS_PROCESS_CREATED:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s", "Processes Created", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Processes Created", Int64Val);
             break;
           case SQLSTATS_PROCESS_CREATE_TIME:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s", "Process Create Time", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Process Create Time", Int64Val);
             break;
           case SQLSTATS_REQ_MSG_CNT:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s", "Request Message Count", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Request Message Count", Int64Val);
             break;
           case SQLSTATS_REQ_MSG_BYTES:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s", "Request Message Bytes", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Request Message Bytes", Int64Val);
             break;
           case SQLSTATS_REPLY_MSG_CNT:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s", "Reply Message Count", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Reply Message Count", Int64Val);
             break;
           case SQLSTATS_REPLY_MSG_BYTES:
             formatWInt64( rootOperStatsItems_[i], Int64Val);
-            str_sprintf(statsBuf_, "%25s%s", "Reply Message Bytes", Int64Val);
+            sprintf(statsBuf_, "%-25s%s", "Reply Message Bytes", Int64Val);
             break;
           case SQLSTATS_SCRATCH_OVERFLOW_MODE:
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
-              str_sprintf(statsBuf_, "%25s%s", "Scr. Overflow Mode", 
+              sprintf(statsBuf_, "%-25s%s", "Scr. Overflow Mode", 
                 ExBMOStats::getScratchOverflowMode((Int16)rootOperStatsItems_[i].int64_value));
             }
             else
@@ -2760,7 +2760,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
               formatWInt64( rootOperStatsItems_[i], Int64Val);
-              str_sprintf(statsBuf_, "%25s%s", "BMO Space Buffer Size", Int64Val);
+              sprintf(statsBuf_, "%-25s%s", "BMO Space Buffer Size", Int64Val);
             }
             else
               continue;
@@ -2769,7 +2769,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
               formatWInt64( rootOperStatsItems_[i], Int64Val);
-              str_sprintf(statsBuf_, "%25s%s", "BMO Space Buffer Count", Int64Val);
+              sprintf(statsBuf_, "%-25s%s", "BMO Space Buffer Count", Int64Val);
             }
             else
               continue;
@@ -2778,7 +2778,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
               formatWInt64( rootOperStatsItems_[i], Int64Val);
-              str_sprintf(statsBuf_, "%25s%s", "Sort TopN", Int64Val);
+              sprintf(statsBuf_, "%-25s%s", "Sort TopN", Int64Val);
             }
             else
               continue;
@@ -2787,7 +2787,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
               formatWInt64( rootOperStatsItems_[i], Int64Val);
-              str_sprintf(statsBuf_, "%25s%s", "Scr. File Count", Int64Val);
+              sprintf(statsBuf_, "%-25s%s", "Scr. File Count", Int64Val);
             }
             else
               continue;
@@ -2796,7 +2796,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
               formatWInt64( rootOperStatsItems_[i], Int64Val);
-              str_sprintf(statsBuf_, "%25s%s", "Scr. IO Size", Int64Val);
+              sprintf(statsBuf_, "%-25s%s", "Scr. IO Size", Int64Val);
             }
             else
               continue;
@@ -2805,7 +2805,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
               formatWInt64( rootOperStatsItems_[i], Int64Val);
-              str_sprintf(statsBuf_, "%25s%s", "Scr. Read Count", Int64Val);
+              sprintf(statsBuf_, "%-25s%s", "Scr. Read Count", Int64Val);
             }
             else
               continue;
@@ -2814,7 +2814,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
               formatWInt64( rootOperStatsItems_[i], Int64Val);
-              str_sprintf(statsBuf_, "%25s%s", "Scr. Write Count", Int64Val);
+              sprintf(statsBuf_, "%-25s%s", "Scr. Write Count", Int64Val);
             }
             else
               continue;
@@ -2823,7 +2823,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
               formatWInt64( rootOperStatsItems_[i], Int64Val);
-              str_sprintf(statsBuf_, "%25s%s", "Scr. IO Max Time", Int64Val);
+              sprintf(statsBuf_, "%-25s%s", "Scr. IO Max Time", Int64Val);
             }
             else
               continue;
@@ -2832,7 +2832,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
             if (statsMergeType != SQLCLI_PROGRESS_STATS)
             {
               formatWInt64( rootOperStatsItems_[i], Int64Val);
-              str_sprintf(statsBuf_, "%25s%s", "BMO Interim Row Count", Int64Val);
+              sprintf(statsBuf_, "%-25s%s", "BMO Interim Row Count", Int64Val);
             }
             else
               continue;
@@ -2899,17 +2899,17 @@ short ExExeUtilGetRTSStatisticsTcb::work()
 	      return WORK_CALL_AGAIN;
         moveRowToUpQueue(" ");
         if (singleLineFormat_) {
-           str_sprintf(statsBuf_, "%-5s%-10s%-15s%-20s%-15s%-20s%-20s%-20s%-20s%-20s%-10s",
+           sprintf(statsBuf_, "%5s%10s%15s%20s%15s%20s%20s%20s%20s%20s%10s",
                 "Id", "DOP",
                 "EstRowsAccess", "ActRowsAccess", "EstRowUsed", "ActRowsUsed", "SE_IOs",
                 "SE_IO_KBytes", "SE_IO_SumTime", "SE_IO_MaxTime", "TableName");
            moveRowToUpQueue(statsBuf_);
         }
         else {
-           str_sprintf(statsBuf_, "%-5s%-10s%-20s", 
+           sprintf(statsBuf_, "%5s%10s %-20s", 
                 "Id", "DOP","Table Name");
 	   moveRowToUpQueue(statsBuf_);
-           str_sprintf(statsBuf_, "%-15s%-20s%-15s%-20s%-20s%-20s%-20s%-20s",
+           sprintf(statsBuf_, "%15s%20s%15s%20s%20s%20s%20s%20s",
 		"EstRowsAccess", "ActRowsAccess", "EstRowsUsed", "ActRowsUsed", "SE_IOs", "SE_IO_KBytes", "SE_IO_SumTime", "SE_IO_MaxTime");
            moveRowToUpQueue(statsBuf_);
         }
@@ -2943,80 +2943,76 @@ short ExExeUtilGetRTSStatisticsTcb::work()
           switch (statsItems[i].statsItem_id)
           {
           case SQLSTATS_TDB_ID:
-            str_sprintf(statsBuf_, "%-5Ld", statsItems[i].int64_value);
+            sprintf(statsBuf_, "%5ld", statsItems[i].int64_value);
             break;
           case SQLSTATS_DOP:
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-10Ld", statsItems[i].int64_value);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%10ld", statsItems[i].int64_value);
             break;
           case SQLSTATS_TABLE_ANSI_NAME:
             statsItems[i].str_value[statsItems[i].str_ret_len] = '\0';
             if (singleLineFormat_)
                tableNameIndex = i;
             else {
-               str_sprintf(&statsBuf_[strlen(statsBuf_)], "   %s", statsItems[i].str_value);
+               sprintf(&statsBuf_[strlen(statsBuf_)], " %s", statsItems[i].str_value);
                if (moveRowToUpQueue(statsBuf_, strlen(statsBuf_), &rc) == -1)
                   return rc;
             }
             break;
           case SQLSTATS_EST_ROWS_ACCESSED:
-            FormatFloat(formattedFloatVal, intSize, valSize, statsItems[i].double_value,
-			FALSE, TRUE);
             if (singleLineFormat_)
-               str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", formattedFloatVal);
+               sprintf(&statsBuf_[strlen(statsBuf_)], "%15.0f", statsItems[i].double_value);
             else
-               str_sprintf(statsBuf_, "%-15s", formattedFloatVal);
+               sprintf(statsBuf_, "%15s", formattedFloatVal);
             break;
           case SQLSTATS_EST_ROWS_USED:
-            FormatFloat(formattedFloatVal, intSize, valSize, statsItems[i].double_value,
-			FALSE, TRUE);
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-15s", formattedFloatVal);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%15.0f", statsItems[i].double_value);
             break;
           case SQLSTATS_ACT_ROWS_ACCESSED:
-            str_sprintf(Int64Val, "%Ld", statsItems[i].int64_value);
+            sprintf(Int64Val, "%ld", statsItems[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             break;          
           case SQLSTATS_ACT_ROWS_USED:
-            str_sprintf(Int64Val, "%Ld", statsItems[i].int64_value);
+            sprintf(Int64Val, "%ld", statsItems[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             break;
           case SQLSTATS_HBASE_IOS:
           case SQLSTATS_HIVE_IOS:
-           str_sprintf(Int64Val, "%Ld", statsItems[i].int64_value);
+           sprintf(Int64Val, "%ld", statsItems[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             break;
           case SQLSTATS_HBASE_IO_BYTES:
           case SQLSTATS_HIVE_IO_BYTES:
-            str_sprintf(Int64Val, "%Ld", statsItems[i].int64_value/1024);
+            sprintf(Int64Val, "%ld", statsItems[i].int64_value/1024);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             break;
           case SQLSTATS_HBASE_IO_ELAPSED_TIME:
           case SQLSTATS_HIVE_IO_ELAPSED_TIME:
-            str_sprintf(Int64Val, "%Ld", statsItems[i].int64_value);
+            sprintf(Int64Val, "%ld", statsItems[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             break;
           case SQLSTATS_HBASE_IO_MAX_TIME:
           case SQLSTATS_HIVE_IO_MAX_TIME:
-            str_sprintf(Int64Val, "%Ld", statsItems[i].int64_value);
+            sprintf(Int64Val, "%ld", statsItems[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             break;
           default:
             break;
           }
         }
         if (singleLineFormat_)
-           str_sprintf(&statsBuf_[strlen(statsBuf_)], " %s", statsItems[2].str_value);
+           sprintf(&statsBuf_[strlen(statsBuf_)], " %s", statsItems[2].str_value);
         if (moveRowToUpQueue(statsBuf_, strlen(statsBuf_), &rc) == -1)
           return rc;
         step_ = GET_NEXT_STATS_DESC_ENTRY_;
@@ -3071,7 +3067,7 @@ short ExExeUtilGetRTSStatisticsTcb::work()
       {
         if (bmoStatsItems_ == NULL)
         {
-          maxBMOStatsItems_ = 19;
+          maxBMOStatsItems_ = 20;
           bmoStatsItems_ = new (getGlobals()->getDefaultHeap()) 
                   SQLSTATS_ITEM[maxBMOStatsItems_];
           initSqlStatsItems(bmoStatsItems_, maxBMOStatsItems_, FALSE);
@@ -3086,16 +3082,17 @@ short ExExeUtilGetRTSStatisticsTcb::work()
           bmoStatsItems_[8].statsItem_id = SQLSTATS_BMO_HEAP_USED;
           bmoStatsItems_[9].statsItem_id = SQLSTATS_BMO_HEAP_ALLOC;
           bmoStatsItems_[10].statsItem_id = SQLSTATS_BMO_HEAP_WM;
-          bmoStatsItems_[11].statsItem_id = SQLSTATS_BMO_SPACE_BUFFER_SIZE;
-          bmoStatsItems_[12].statsItem_id = SQLSTATS_BMO_SPACE_BUFFER_COUNT;
-          bmoStatsItems_[13].statsItem_id = SQLSTATS_SCRATCH_FILE_COUNT;
-          bmoStatsItems_[14].statsItem_id = SQLSTATS_SCRATCH_IO_SIZE;
-          bmoStatsItems_[15].statsItem_id = SQLSTATS_SCRATCH_READ_COUNT;
-          bmoStatsItems_[16].statsItem_id = SQLSTATS_SCRATCH_WRITE_COUNT;
-          bmoStatsItems_[17].statsItem_id = SQLSTATS_SCRATCH_IO_TIME;
-          bmoStatsItems_[18].statsItem_id = SQLSTATS_SCRATCH_IO_MAX_TIME;
+          bmoStatsItems_[11].statsItem_id = SQLSTATS_BMO_EST_MEMORY;
+          bmoStatsItems_[12].statsItem_id = SQLSTATS_BMO_SPACE_BUFFER_SIZE;
+          bmoStatsItems_[13].statsItem_id = SQLSTATS_BMO_SPACE_BUFFER_COUNT;
+          bmoStatsItems_[14].statsItem_id = SQLSTATS_SCRATCH_FILE_COUNT;
+          bmoStatsItems_[15].statsItem_id = SQLSTATS_SCRATCH_IO_SIZE;
+          bmoStatsItems_[16].statsItem_id = SQLSTATS_SCRATCH_READ_COUNT;
+          bmoStatsItems_[17].statsItem_id = SQLSTATS_SCRATCH_WRITE_COUNT;
+          bmoStatsItems_[18].statsItem_id = SQLSTATS_SCRATCH_IO_TIME;
+          bmoStatsItems_[19].statsItem_id = SQLSTATS_SCRATCH_IO_MAX_TIME;
                   
-          // maxBMOStatsItems_ is set to 18 
+          // maxBMOStatsItems_ is set to 20 
           // TDB_NAME
           bmoStatsItems_[1].str_value = new (getGlobals()->getDefaultHeap())
                       char[MAX_TDB_NAME_LEN+1];
@@ -3136,24 +3133,24 @@ short ExExeUtilGetRTSStatisticsTcb::work()
 	      return WORK_CALL_AGAIN;
        moveRowToUpQueue(" ");
        if (singleLineFormat()) {       
-          str_sprintf(statsBuf_, "%-5s%-20s%-5s%-10s%-10s%-12s%-20s%-20s%-20s%-20s%-20s%-20s%-20s%-10s%-10s%-20s%-20s%-20s%-20s",
+          sprintf(statsBuf_, "%5s%20s%5s%10s%10s%12s%20s%20s%20s%20s%20s%20s%20s%20s%10s%10s%20s%20s%20s%20s",
                "Id", "TDBName", "Mode", "DOP", "TopN", "BMOPhase", "InterimRowCount", "CPUTime",
-                "BMOHeapUsed", "BMOHeapAllocated", "BMOHeapWM", 
+                "BMOHeapUsed", "BMOHeapAllocated", "BMOHeapWM", "EstMemory", 
                 "BMOSpaceBufSz","BMOSpaceBufCnt", "FileCnt", "ScrIOSize",
                 "ScrIORead", "ScrIOWritten", "ScrIOTime", "ScrIOMaxTime");
           moveRowToUpQueue(statsBuf_);
        }
        else {
-          str_sprintf(statsBuf_, "%-5s%-20s%-20s%-10s%-10s%-20s%-20s%-20s",
+          sprintf(statsBuf_, "%5s%20s%20s%10s%10s%20s%20s%20s",
                "Id", "TDBName", "Mode", "DOP", "TopN", "BMOPhase", "InterimRowCount", "CPUTime");
           moveRowToUpQueue(statsBuf_);
         
-          str_sprintf(statsBuf_, "%-25s%-20s%-20s%-20s%-20s",
-                "BMOHeapUsed", "BMOHeapAllocated", "BMOHeapWM",
+          sprintf(statsBuf_, "%25s%20s%20s%20s%20s%20s",
+                "BMOHeapUsed", "BMOHeapAllocated", "BMOHeapWM", "EstMemory",
                 "BMOSpaceBufSz","BMOSpaceBufCnt");
           moveRowToUpQueue(statsBuf_);
        
-          str_sprintf(statsBuf_, "%-25s%-20s%-20s%-20s%-20s%-20s",
+          sprintf(statsBuf_, "%25s%20s%20s%20s%20s%20s",
                 "ScrFileCnt", "ScrIOSize", "ScrIORead", "ScrIOWritten", "ScrIOTime", "ScrIOMaxTime");
           moveRowToUpQueue(statsBuf_);
         }
@@ -3172,125 +3169,129 @@ short ExExeUtilGetRTSStatisticsTcb::work()
           switch (bmoStatsItems_[i].statsItem_id)
           {
           case SQLSTATS_TDB_ID:
-            str_sprintf(statsBuf_, "%-5Ld", bmoStatsItems_[i].int64_value);
+            sprintf(statsBuf_, "%5ld", bmoStatsItems_[i].int64_value);
             break;
           case SQLSTATS_TDB_NAME:
             bmoStatsItems_[i].str_value[bmoStatsItems_[i].str_ret_len] = '\0';
             if (singleLineFormat_) 
-               str_sprintf(&statsBuf_[strlen(statsBuf_)], " %19s", bmoStatsItems_[i].str_value);
+               sprintf(&statsBuf_[strlen(statsBuf_)], " %19s", bmoStatsItems_[i].str_value);
             else 
-               str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", bmoStatsItems_[i].str_value);
+               sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", bmoStatsItems_[i].str_value);
             break;
           case SQLSTATS_SCRATCH_OVERFLOW_MODE:
             ofMode = ExBMOStats::getScratchOverflowMode((Int16) bmoStatsItems_[i].int64_value);
             if (singleLineFormat_) 
-               str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-5s", ofMode);
+               sprintf(&statsBuf_[strlen(statsBuf_)], "%5s", ofMode);
             else
-               str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", ofMode);
+               sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", ofMode);
             break;
           case SQLSTATS_DOP:
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-10Ld", bmoStatsItems_[i].int64_value);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%10ld", bmoStatsItems_[i].int64_value);
             break;
           case SQLSTATS_TOPN:
-            str_sprintf(Int64Val, "%Ld", bmoStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", bmoStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-10s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%10s", Int64Val);
             break;
           case SQLSTATS_BMO_PHASE:
             bmoStatsItems_[i].str_value[bmoStatsItems_[i].str_ret_len] = '\0';
             if (singleLineFormat_) 
-               str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-12s", bmoStatsItems_[i].str_value);
+               sprintf(&statsBuf_[strlen(statsBuf_)], "%12s", bmoStatsItems_[i].str_value);
             else
-               str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", bmoStatsItems_[i].str_value);
+               sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", bmoStatsItems_[i].str_value);
             break;
           case SQLSTATS_INTERIM_ROW_COUNT:
-            str_sprintf(Int64Val, "%Ld", bmoStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", bmoStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             break;
           case SQLSTATS_OPER_CPU_TIME:
-            str_sprintf(Int64Val, "%Ld", bmoStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", bmoStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             if (! singleLineFormat_) {
                if (moveRowToUpQueue(statsBuf_, strlen(statsBuf_), &rc) == -1)
                   return rc;
             }
             break;
           case SQLSTATS_BMO_HEAP_USED:
-            str_sprintf(Int64Val, "%Ld", bmoStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", bmoStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
             if (singleLineFormat_) 
-               str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+               sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             else
-               str_sprintf(statsBuf_, "%-25s", Int64Val);
+               sprintf(statsBuf_, "%25s", Int64Val);
             break;
           case SQLSTATS_BMO_HEAP_ALLOC:
           case SQLSTATS_BMO_HEAP_WM:
-            str_sprintf(Int64Val, "%Ld", bmoStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", bmoStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
+            break;
+          case SQLSTATS_BMO_EST_MEMORY:
+            sprintf(formattedFloatVal, "%0.2lf",  bmoStatsItems_[i].double_value);
+            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", formattedFloatVal);
             break;
           case SQLSTATS_BMO_SPACE_BUFFER_SIZE:
-            str_sprintf(Int64Val, "%Ld", bmoStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", bmoStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             break;
           case SQLSTATS_BMO_SPACE_BUFFER_COUNT:
-            str_sprintf(Int64Val, "%Ld", bmoStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", bmoStatsItems_[i].int64_value);
             intSize = str_len(Int64Val);
             AddCommas(Int64Val,intSize); 
-            str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-20s", Int64Val);
+            sprintf(&statsBuf_[strlen(statsBuf_)], "%20s", Int64Val);
             if (! singleLineFormat_) {
                if (moveRowToUpQueue(statsBuf_, strlen(statsBuf_), &rc) == -1)
                   return rc;
             }
             break;
           case SQLSTATS_SCRATCH_FILE_COUNT:
-            str_sprintf(Int64Val, "%Ld", bmoStatsItems_[i].int64_value);
+            sprintf(Int64Val, "%ld", bmoStatsItems_[i].int64_value);
             if (singleLineFormat_) 
-               str_sprintf(&statsBuf_[strlen(statsBuf_)], "%-10s", Int64Val);
+               sprintf(&statsBuf_[strlen(statsBuf_)], "%10s", Int64Val);
 

<TRUNCATED>


[11/13] incubator-trafodion git commit: [TRAFODION-2754] Changing str_sprintf() to use sprintf()

Posted by se...@apache.org.
[TRAFODION-2754] Changing str_sprintf() to use sprintf()

Fix for debug build failure


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

Branch: refs/heads/master
Commit: d93e1d4e2a04544e1176a76258a98fe41310da64
Parents: 84a21dd
Author: selvaganesang <se...@esgyn.com>
Authored: Wed Sep 27 22:02:37 2017 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Wed Sep 27 22:02:37 2017 +0000

----------------------------------------------------------------------
 core/sql/executor/ExExeUtilMisc.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d93e1d4e/core/sql/executor/ExExeUtilMisc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilMisc.cpp b/core/sql/executor/ExExeUtilMisc.cpp
index aed6301..754e299 100644
--- a/core/sql/executor/ExExeUtilMisc.cpp
+++ b/core/sql/executor/ExExeUtilMisc.cpp
@@ -1397,7 +1397,7 @@ short ExExeUtilLongRunningTcb::executeLongRunningQuery()
 
           // str_printf() does not support %ld. Use %d instead.
           str_sprintf(lruQPInfo, 
-	             "Queries to be processed: \n\n%s\n\n%s\n\n\n Initial rows deleted: %d",
+	             "Queries to be processed: \n\n%s\n\n%s\n\n\n Initial rows deleted: %ld",
                       lruStmtAndPartInfo_,
                       lruStmtWithCKAndPartInfo_,
                       getRowsDeleted());
@@ -1426,7 +1426,7 @@ short ExExeUtilLongRunningTcb::executeLongRunningQuery()
       if ((rc == 100 || rc > 0) && lrTdb().longRunningQueryPlan()) {
 
         char lruQPInfo [100];
-        str_sprintf(lruQPInfo, "Total rows deleted: %d\n\n", getRowsDeleted());
+        str_sprintf(lruQPInfo, "Total rows deleted: %ld\n\n", getRowsDeleted());
 
         ComDiagsArea * diagsArea = getDiagAreaFromUpQueueTail();
         (*diagsArea) << DgSqlCode(8427) << DgString0(lruQPInfo);
@@ -1575,7 +1575,7 @@ short ExExeUtilLongRunningTcb::processContinuing(Lng32 &rc)
 
         char lruQPInfo[100];
 
-        str_sprintf(lruQPInfo, "Continuing rows deleted: %d\n\n", 
+        str_sprintf(lruQPInfo, "Continuing rows deleted: %ld\n\n", 
                                 rowsAffected);
 
         ComDiagsArea * diagsArea = getDiagAreaFromUpQueueTail();


[07/13] incubator-trafodion git commit: [TRAFODION-2754] Get statistics cores sqlci or mxosrvr at str_sprintf()

Posted by se...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp b/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
index 18d63eb..d83a9da 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
@@ -907,7 +907,7 @@ short CmpSeabaseDDL::updatePKeyInfo(
   NAString quotedObjName;
   ToQuotedString(quotedObjName, NAString(objectNamePart), FALSE);
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %Ld, %Ld, %Ld, '%s', '%s', %d, %d, 0 )",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %ld, %ld, %ld, '%s', '%s', %d, %d, 0 )",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               catalogNamePart.data(), quotedSchName.data(), quotedObjName.data(),
               COM_PRIMARY_KEY_CONSTRAINT_OBJECT_LIT,
@@ -960,7 +960,7 @@ short CmpSeabaseDDL::updatePKeyInfo(
     }
  
   Int64 indexUID = 0;
-  str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, %Ld, '%s', '%s', '%s', '%s', '%s', '%s', %Ld, %d, %Ld, %Ld )",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, %ld, '%s', '%s', '%s', '%s', '%s', '%s', %ld, %d, %ld, %ld )",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
               tableUID, pkeyUID,
               COM_PRIMARY_KEY_CONSTRAINT_LIT,
@@ -989,7 +989,7 @@ short CmpSeabaseDDL::updatePKeyInfo(
     {
       for (Lng32 i = 0; i < numKeys; i++)
         {
-          str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, '%s', %d, %d, %d, %d, 0)",
+          str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, '%s', %d, %d, %d, %d, 0)",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
                       pkeyUID,
                       keyInfoArray[i].colName,
@@ -1313,7 +1313,7 @@ short CmpSeabaseDDL::updateConstraintMD(
   NAString quotedObjName;
   ToQuotedString(quotedObjName, NAString(objectNamePart), FALSE);
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %Ld, %Ld, %Ld, '%s', '%s', %d, %d, 0 )",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values ('%s', '%s', '%s', '%s', %ld, %ld, %ld, '%s', '%s', %d, %d, 0 )",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               catalogNamePart.data(), quotedSchName.data(), quotedObjName.data(),
               ((ct == COM_UNIQUE_CONSTRAINT) ? COM_UNIQUE_CONSTRAINT_OBJECT_LIT :
@@ -1334,7 +1334,7 @@ short CmpSeabaseDDL::updateConstraintMD(
     }
 
   Int64 indexUID = 0;
-  str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, %Ld, '%s', '%s', '%s', '%s', '%s', '%s', %Ld, %d, %Ld, 0 )",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, %ld, '%s', '%s', '%s', '%s', '%s', '%s', %ld, %d, %ld, 0 )",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
               tableUID, constrUID,
               ((ct == COM_UNIQUE_CONSTRAINT) ? COM_UNIQUE_CONSTRAINT_LIT :
@@ -1360,7 +1360,7 @@ short CmpSeabaseDDL::updateConstraintMD(
       NAColumn * nac = naColArray.getColumn(keyColList[i]);
       Lng32 colNumber = nac->getPosition();
 
-      str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, '%s', %d, %d, %d, %d, 0)",
+      str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, '%s', %d, %d, %d, %d, 0)",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
                   constrUID,
                   keyColList[i].data(),
@@ -1391,7 +1391,7 @@ short CmpSeabaseDDL::updateRIConstraintMD(
 
   char buf[4000];
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, %Ld, '%s', '%s', '%s', 0 )",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, %ld, '%s', '%s', '%s', 0 )",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_REF_CONSTRAINTS,
               ringConstrUID, refdConstrUID,
               COM_FULL_MATCH_OPTION_LIT,
@@ -1405,7 +1405,7 @@ short CmpSeabaseDDL::updateRIConstraintMD(
       return -1;
     }
 
-  str_sprintf(buf, "insert into %s.\"%s\".%s values (%Ld, %Ld, 0)",
+  str_sprintf(buf, "insert into %s.\"%s\".%s values (%ld, %ld, 0)",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_UNIQUE_REF_CONSTR_USAGE,
               refdConstrUID, ringConstrUID);
   cliRC = cliInterface->executeImmediate(buf);
@@ -1509,7 +1509,7 @@ short CmpSeabaseDDL::updateIndexInfo(
         }
 
       // update indexes table and mark this index as an implicit index.
-      str_sprintf(buf, "update %s.\"%s\".%s set is_explicit = 0 where base_table_uid = %Ld and index_uid = (select object_uid from %s.\"%s\".%s where catalog_name = '%s' and schema_name = '%s' and object_name = '%s' and object_type = 'IX') ",
+      str_sprintf(buf, "update %s.\"%s\".%s set is_explicit = 0 where base_table_uid = %ld and index_uid = (select object_uid from %s.\"%s\".%s where catalog_name = '%s' and schema_name = '%s' and object_name = '%s' and object_type = 'IX') ",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_INDEXES,
                   tableUID,
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
@@ -1545,7 +1545,7 @@ short CmpSeabaseDDL::updateIndexInfo(
       CmpCommon::diags()->clear();
     }
 
-  str_sprintf(buf, "update %s.\"%s\".%s set index_uid = %Ld where table_uid = %Ld and constraint_uid = %Ld and constraint_type = '%s'",
+  str_sprintf(buf, "update %s.\"%s\".%s set index_uid = %ld where table_uid = %ld and constraint_uid = %ld and constraint_type = '%s'",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
               indexUID,
               tableUID, constrUID,
@@ -5282,7 +5282,7 @@ short CmpSeabaseDDL::cloneSeabaseTable(
       // if there are added or altered columns in the source table, then cloned
       // table metadata need to reflect that.
       // Update metadata and set the cloned column class to be the same as source.
-      str_sprintf(buf, "merge into %s.\"%s\".%s using (select column_name, column_class from %s.\"%s\".%s where object_uid = %Ld) x on (object_uid = %Ld and column_name = x.column_name) when matched then update set column_class = x.column_class;",
+      str_sprintf(buf, "merge into %s.\"%s\".%s using (select column_name, column_class from %s.\"%s\".%s where object_uid = %ld) x on (object_uid = %ld and column_name = x.column_name) when matched then update set column_class = x.column_class;",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
                   srcTableUID,
@@ -5562,7 +5562,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddColumn(
       if ((NOT naTable->isSQLMXAlignedTable()) &&
           (nac->isComputedColumn()))
         {
-          str_sprintf(query, "update %s.\"%s\".%s set column_number = column_number + 1 where object_uid = %Ld and column_number = %d",
+          str_sprintf(query, "update %s.\"%s\".%s set column_number = column_number + 1 where object_uid = %ld and column_number = %d",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
                       objUID,
                       nac->getPosition());
@@ -5575,7 +5575,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddColumn(
               return;
             }
 
-          str_sprintf(query, "update %s.\"%s\".%s set column_number = column_number + 1 where object_uid = %Ld and column_number = %d",
+          str_sprintf(query, "update %s.\"%s\".%s set column_number = column_number + 1 where object_uid = %ld and column_number = %d",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
                       objUID,
                       nac->getPosition());
@@ -5588,7 +5588,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddColumn(
               return;
             }
 
-          str_sprintf(query, "update %s.\"%s\".%s set sub_id = sub_id + 1 where text_uid = %Ld and text_type = %d and sub_id = %d",
+          str_sprintf(query, "update %s.\"%s\".%s set sub_id = sub_id + 1 where text_uid = %ld and text_type = %d and sub_id = %d",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TEXT,
                       objUID,
                       COM_COMPUTED_COL_TEXT,
@@ -5640,7 +5640,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddColumn(
         }
     }
 
-  str_sprintf(query, "insert into %s.\"%s\".%s values (%Ld, '%s', %d, '%s', %d, '%s', %d, %d, %d, %d, %d, '%s', %d, %d, '%s', %d, '%s', '%s', '%s', '%u', '%s', '%s', %Ld )",
+  str_sprintf(query, "insert into %s.\"%s\".%s values (%ld, '%s', %d, '%s', %d, '%s', %d, %d, %d, %d, %d, '%s', %d, %d, '%s', %d, '%s', '%s', '%s', '%u', '%s', '%s', %ld )",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               objUID,
               col_name,
@@ -5799,7 +5799,7 @@ short CmpSeabaseDDL::updateMDforDropCol(ExeCliInterface &cliInterface,
   Int64 objUID = naTable->objectUid().castToInt64();
 
   char buf[4000];
-  str_sprintf(buf, "delete from %s.\"%s\".%s where object_uid = %Ld and column_number = %d",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where object_uid = %ld and column_number = %d",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               objUID,
               dropColNum);
@@ -5811,7 +5811,7 @@ short CmpSeabaseDDL::updateMDforDropCol(ExeCliInterface &cliInterface,
       return -1;
     }
   
-  str_sprintf(buf, "update %s.\"%s\".%s set column_number = column_number - 1 where object_uid = %Ld and column_number >= %d",
+  str_sprintf(buf, "update %s.\"%s\".%s set column_number = column_number - 1 where object_uid = %ld and column_number >= %d",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               objUID,
               dropColNum);
@@ -5823,7 +5823,7 @@ short CmpSeabaseDDL::updateMDforDropCol(ExeCliInterface &cliInterface,
       return -1;
     }
   
-  str_sprintf(buf, "update %s.\"%s\".%s set column_number = column_number - 1 where object_uid = %Ld and column_number >= %d",
+  str_sprintf(buf, "update %s.\"%s\".%s set column_number = column_number - 1 where object_uid = %ld and column_number >= %d",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
               objUID,
               dropColNum);
@@ -5835,7 +5835,7 @@ short CmpSeabaseDDL::updateMDforDropCol(ExeCliInterface &cliInterface,
       return -1;
     }
   
-  str_sprintf(buf, "update %s.\"%s\".%s set sub_id = sub_id - 1 where text_uid = %Ld and text_type = %d and sub_id > %d",
+  str_sprintf(buf, "update %s.\"%s\".%s set sub_id = sub_id - 1 where text_uid = %ld and text_type = %d and sub_id > %d",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TEXT,
               objUID,
               COM_COMPUTED_COL_TEXT,
@@ -5850,7 +5850,7 @@ short CmpSeabaseDDL::updateMDforDropCol(ExeCliInterface &cliInterface,
   
   // keys for pkey constraint refer to base table column number.
   // modify it so they now refer to new column numbers.
-  str_sprintf(buf, "update %s.\"%s\".%s K set column_number = column_number - 1  where K.column_number >= %d and K.object_uid = (select C.constraint_uid from %s.\"%s\".%s C where C.table_uid = %Ld and C.constraint_type = 'P')",
+  str_sprintf(buf, "update %s.\"%s\".%s K set column_number = column_number - 1  where K.column_number >= %d and K.object_uid = (select C.constraint_uid from %s.\"%s\".%s C where C.table_uid = %ld and C.constraint_type = 'P')",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
               dropColNum,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
@@ -6539,31 +6539,31 @@ void CmpSeabaseDDL::alterSeabaseTableAlterIdentityColumn(
       char tmpBuf[1000];
       if (sgo->isIncrementSpecified())
         {
-          str_sprintf(tmpBuf, " increment by %Ld", sgo->getIncrement());
+          str_sprintf(tmpBuf, " increment by %ld", sgo->getIncrement());
           options += tmpBuf;
         }
       
       if (sgo->isMaxValueSpecified())
         {
           if (sgo->isNoMaxValue())
-            str_sprintf(tmpBuf, " no maxvalue ", sgo->getMaxValue());
+            strcpy(tmpBuf, " no maxvalue ");
           else
-            str_sprintf(tmpBuf, " maxvalue %Ld", sgo->getMaxValue());
+            str_sprintf(tmpBuf, " maxvalue %ld", sgo->getMaxValue());
           options += tmpBuf;
         }
       
       if (sgo->isMinValueSpecified())
         {
           if (sgo->isNoMinValue())
-            str_sprintf(tmpBuf, " no maxvalue ", sgo->getMinValue());
+            strcpy(tmpBuf, " no maxvalue ");
           else
-            str_sprintf(tmpBuf, " minvalue %Ld", sgo->getMinValue());
+            str_sprintf(tmpBuf, " minvalue %ld", sgo->getMinValue());
           options += tmpBuf;
         }
       
       if (sgo->isStartValueSpecified())
         {
-          str_sprintf(tmpBuf, " start with %Ld", sgo->getStartValue());
+          str_sprintf(tmpBuf, " start with %ld", sgo->getStartValue());
           options += tmpBuf;
         }
       
@@ -6572,7 +6572,7 @@ void CmpSeabaseDDL::alterSeabaseTableAlterIdentityColumn(
           if (sgo->isNoCache())
             str_sprintf(tmpBuf, " no cache ");
           else
-            str_sprintf(tmpBuf, " cache %Ld ", sgo->getCache());
+            str_sprintf(tmpBuf, " cache %ld ", sgo->getCache());
           options += tmpBuf;
         }
       
@@ -6894,7 +6894,7 @@ short CmpSeabaseDDL::alignedFormatTableAlterColumnAttr
       ToQuotedString(quotedDefVal, defVal, FALSE);
     }
   
-  str_sprintf(buf, "update %s.\"%s\".%s set (column_class, fs_data_type, sql_data_type, column_size, column_precision, column_scale, datetime_start_field, datetime_end_field, is_upshifted, nullable, character_set, default_class, default_value) = ('%s', %d, '%s', %d, %d, %d, %d, %d, '%s', %d, '%s', %d, '%s') where object_uid = %Ld and column_number = %d",
+  str_sprintf(buf, "update %s.\"%s\".%s set (column_class, fs_data_type, sql_data_type, column_size, column_precision, column_scale, datetime_start_field, datetime_end_field, is_upshifted, nullable, character_set, default_class, default_value) = ('%s', %d, '%s', %d, %d, %d, %d, %d, '%s', %d, '%s', %d, '%s') where object_uid = %ld and column_number = %d",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               COM_ALTERED_USER_COLUMN_LIT,
               datatype,
@@ -7022,7 +7022,7 @@ short CmpSeabaseDDL::mdOnlyAlterColumnAttr(
     return -1;
 
   char buf[4000];
-  str_sprintf(buf, "update %s.\"%s\".%s set column_size = %d, column_class = '%s' where object_uid = %Ld and column_number = %d",
+  str_sprintf(buf, "update %s.\"%s\".%s set column_size = %d, column_class = '%s' where object_uid = %ld and column_number = %d",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               newType->getNominalSize(),
               COM_ALTERED_USER_COLUMN_LIT,
@@ -7154,7 +7154,7 @@ short CmpSeabaseDDL::hbaseFormatTableAlterColumnAttr(
       goto label_error1;
     }
    
-  str_sprintf(buf, "delete from %s.\"%s\".%s where object_uid = %Ld and column_number = %d",
+  str_sprintf(buf, "delete from %s.\"%s\".%s where object_uid = %ld and column_number = %d",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               tableUID,
               altColNum);
@@ -7166,7 +7166,7 @@ short CmpSeabaseDDL::hbaseFormatTableAlterColumnAttr(
       goto label_error1;
     }
   
-  str_sprintf(buf, "insert into %s.\"%s\".%s select object_uid, '%s', %d, '%s', fs_data_type, sql_data_type, column_size, column_precision, column_scale, datetime_start_field, datetime_end_field, is_upshifted, column_flags, nullable, character_set, default_class, default_value, column_heading, '%s', '%s', direction, is_optional, flags from %s.\"%s\".%s where object_uid = %Ld and column_number = (select column_number from %s.\"%s\".%s where object_uid = %Ld and column_name = '%s')",
+  str_sprintf(buf, "insert into %s.\"%s\".%s select object_uid, '%s', %d, '%s', fs_data_type, sql_data_type, column_size, column_precision, column_scale, datetime_start_field, datetime_end_field, is_upshifted, column_flags, nullable, character_set, default_class, default_value, column_heading, '%s', '%s', direction, is_optional, flags from %s.\"%s\".%s where object_uid = %ld and column_number = (select column_number from %s.\"%s\".%s where object_uid = %ld and column_name = '%s')",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               naCol->getColName().data(),              
               altColNum,
@@ -7705,7 +7705,7 @@ void CmpSeabaseDDL::alterSeabaseTableAlterColumnRename(
   Lng32 colNumber = nacol->getPosition();
   
   char buf[4000];
-  str_sprintf(buf, "update %s.\"%s\".%s set column_name = '%s', column_class = '%s' where object_uid = %Ld and column_number = %d",
+  str_sprintf(buf, "update %s.\"%s\".%s set column_name = '%s', column_class = '%s' where object_uid = %ld and column_number = %d",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               renamedColName.data(),
               COM_ALTERED_USER_COLUMN_LIT,
@@ -7774,7 +7774,7 @@ void CmpSeabaseDDL::alterSeabaseTableAlterColumnRename(
           if (naFS->getKeytag() == 0)
             continue;
 
-          str_sprintf(buf, "update %s.\"%s\".%s set column_name = '%s' || '@' where object_uid = %Ld and column_name = '%s' || '@'",
+          str_sprintf(buf, "update %s.\"%s\".%s set column_name = '%s' || '@' where object_uid = %ld and column_name = '%s' || '@'",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
                       renamedColName.data(),
                       naFS->getIndexUID(),
@@ -7789,7 +7789,7 @@ void CmpSeabaseDDL::alterSeabaseTableAlterColumnRename(
               return;
             }
 
-         str_sprintf(buf, "update %s.\"%s\".%s set column_name = '%s' where object_uid = %Ld and column_name = '%s'",
+         str_sprintf(buf, "update %s.\"%s\".%s set column_name = '%s' where object_uid = %ld and column_name = '%s'",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
                       renamedColName.data(),
                       naFS->getIndexUID(),
@@ -8023,7 +8023,7 @@ void CmpSeabaseDDL::alterSeabaseTableAddPKeyConstraint(
     }
 
   char cqdbuf[200];
-  str_sprintf(cqdbuf, "cqd traf_create_table_with_uid '%Ld';",
+  str_sprintf(cqdbuf, "cqd traf_create_table_with_uid '%ld';",
               tableUID);
   cliRC = cliInterface.executeImmediate(cqdbuf);
   if (cliRC < 0)
@@ -9031,7 +9031,7 @@ short CmpSeabaseDDL::getTextFromMD(const char * catalogName,
 
   char query[1000];
 
-  str_sprintf(query, "select octet_length(text), text from %s.\"%s\".%s where text_uid = %Ld and text_type = %d and sub_id = %d for read committed access order by seq_num",
+  str_sprintf(query, "select octet_length(text), text from %s.\"%s\".%s where text_uid = %ld and text_type = %d and sub_id = %d for read committed access order by seq_num",
               catalogName, SEABASE_MD_SCHEMA, SEABASE_TEXT,
               textUID, static_cast<int>(textType), textSubID);
   
@@ -9431,7 +9431,7 @@ void CmpSeabaseDDL::alterSeabaseTableDropConstraint(
       
       // the cardinality hint should force a nested join with
       // TABLE_CONSTRAINTS as the outer and INDEXES as the inner
-      str_sprintf(query, "select I.keytag, I.is_explicit from %s.\"%s\".%s T, %s.\"%s\".%s I /*+ cardinality 1e9 */ where T.table_uid = %Ld and T.constraint_uid = %Ld and T.table_uid = I.base_table_uid and T.index_uid = I.index_uid ",
+      str_sprintf(query, "select I.keytag, I.is_explicit from %s.\"%s\".%s T, %s.\"%s\".%s I /*+ cardinality 1e9 */ where T.table_uid = %ld and T.constraint_uid = %ld and T.table_uid = I.base_table_uid and T.index_uid = I.index_uid ",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_INDEXES,
                   naTable->objectUid().castToInt64(),
@@ -10642,7 +10642,7 @@ short CmpSeabaseDDL::unregisterHiveViewUsage(StmtDDLCreateView * createViewParse
       SQL_EXEC_SetParserFlagsForExSqlComp_Internal(INTERNAL_QUERY_FROM_EXEUTIL);
       
       usedObjUID = naTable->objectUid().get_value();
-      str_sprintf(query, "delete from %s.\"%s\".%s where using_view_uid = %Ld and used_object_uid = %Ld",
+      str_sprintf(query, "delete from %s.\"%s\".%s where using_view_uid = %ld and used_object_uid = %ld",
 		  getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS_USAGE,
 		  viewUID,
 		  usedObjUID);
@@ -11222,7 +11222,7 @@ Lng32 CmpSeabaseDDL::getSeabaseColumnInfo(ExeCliInterface *cliInterface,
     "nullable, trim(character_set), default_class, default_value, "
     "trim(column_heading), hbase_col_family, hbase_col_qualifier, direction, "
     "is_optional, flags  from %s.\"%s\".%s "
-    "where object_uid = %Ld and direction in (%s)"
+    "where object_uid = %ld and direction in (%s)"
     "order by 2 for read committed access",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
               objUID,
@@ -11448,7 +11448,7 @@ ComTdbVirtTableSequenceInfo * CmpSeabaseDDL::getSeabaseSequenceInfo(
 
  char buf[4000];
 
- str_sprintf(buf, "select fs_data_type, start_value, increment, max_value, min_value, cycle_option, cache_size, next_value, seq_type, redef_ts from %s.\"%s\".%s  where seq_uid = %Ld",
+ str_sprintf(buf, "select fs_data_type, start_value, increment, max_value, min_value, cycle_option, cache_size, next_value, seq_type, redef_ts from %s.\"%s\".%s  where seq_uid = %ld",
              getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_SEQ_GEN,
              seqUID);
 
@@ -11569,7 +11569,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseLibraryDesc(
      
   str_sprintf(buf, "SELECT library_filename, version "
                    "FROM %s.\"%s\".%s "
-                   "WHERE library_uid = %Ld "
+                   "WHERE library_uid = %ld "
                    "FOR READ COMMITTED ACCESS",
              getSystemCatalog(),SEABASE_MD_SCHEMA,SEABASE_LIBRARIES,libUID);
 
@@ -11836,7 +11836,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseUserTableDesc(const NAString &catName,
       CmpCommon::diags()->clear();
     }
 
-  str_sprintf(query, "select is_audited, num_salt_partns, row_format, flags from %s.\"%s\".%s where table_uid = %Ld for read committed access",
+  str_sprintf(query, "select is_audited, num_salt_partns, row_format, flags from %s.\"%s\".%s where table_uid = %ld for read committed access",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLES,
               objUID);
   
@@ -11918,14 +11918,14 @@ TrafDesc * CmpSeabaseDDL::getSeabaseUserTableDesc(const NAString &catName,
 
   if (objType == COM_INDEX_OBJECT)
     {
-      str_sprintf(query, "select k.column_name, c.column_number, k.keyseq_number, ordering, cast(0 as int not null)  from %s.\"%s\".%s k, %s.\"%s\".%s c where k.column_name = c.column_name and k.object_uid = c.object_uid and k.object_uid = %Ld and k.nonkeycol = 0 for read committed access order by keyseq_number",
+      str_sprintf(query, "select k.column_name, c.column_number, k.keyseq_number, ordering, cast(0 as int not null)  from %s.\"%s\".%s k, %s.\"%s\".%s c where k.column_name = c.column_name and k.object_uid = c.object_uid and k.object_uid = %ld and k.nonkeycol = 0 for read committed access order by keyseq_number",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_COLUMNS,
                   objUID);
     }
   else
     {
-      str_sprintf(query, "select column_name, column_number, keyseq_number, ordering, cast(0 as int not null)  from %s.\"%s\".%s where object_uid = %Ld and nonkeycol = 0 for read committed access order by keyseq_number",
+      str_sprintf(query, "select column_name, column_number, keyseq_number, ordering, cast(0 as int not null)  from %s.\"%s\".%s where object_uid = %ld and nonkeycol = 0 for read committed access order by keyseq_number",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
                   objUID);
     }
@@ -11957,7 +11957,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseUserTableDesc(const NAString &catName,
       populateKeyInfo(keyInfoArray[idx], vi);
     }
 
-  str_sprintf(query, "select O.catalog_name, O.schema_name, O.object_name, I.keytag, I.is_unique, I.is_explicit, I.key_colcount, I.nonkey_colcount, T.num_salt_partns, T.row_format, I.index_uid from %s.\"%s\".%s I, %s.\"%s\".%s O ,  %s.\"%s\".%s T where I.base_table_uid = %Ld and I.index_uid = O.object_uid %s and I.index_uid = T.table_uid for read committed access order by 1,2,3",
+  str_sprintf(query, "select O.catalog_name, O.schema_name, O.object_name, I.keytag, I.is_unique, I.is_explicit, I.key_colcount, I.nonkey_colcount, T.num_salt_partns, T.row_format, I.index_uid from %s.\"%s\".%s I, %s.\"%s\".%s O ,  %s.\"%s\".%s T where I.base_table_uid = %ld and I.index_uid = O.object_uid %s and I.index_uid = T.table_uid for read committed access order by 1,2,3",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_INDEXES,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLES,
@@ -12086,7 +12086,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseUserTableDesc(const NAString &catName,
       indexInfoArray[idx].numSaltPartns = idxNumSaltPartns;
       indexInfoArray[idx].rowFormat = idxRowFormat;
       Queue * keyInfoQueue = NULL;
-      str_sprintf(query, "select column_name, column_number, keyseq_number, ordering, nonkeycol  from %s.\"%s\".%s where object_uid = %Ld for read committed access order by keyseq_number",
+      str_sprintf(query, "select column_name, column_number, keyseq_number, ordering, nonkeycol  from %s.\"%s\".%s where object_uid = %ld for read committed access order by keyseq_number",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
                   idxUID);
       cliRC = cliInterface.initializeInfoList(keyInfoQueue, TRUE);
@@ -12157,7 +12157,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseUserTableDesc(const NAString &catName,
     } // for
 
   // get constraint info
-  str_sprintf(query, "select O.object_name, C.constraint_type, C.col_count, C.constraint_uid, C.enforced, C.flags from %s.\"%s\".%s O, %s.\"%s\".%s C where O.catalog_name = '%s' and O.schema_name = '%s' and C.table_uid = %Ld and O.object_uid = C.constraint_uid order by 1",
+  str_sprintf(query, "select O.object_name, C.constraint_type, C.col_count, C.constraint_uid, C.enforced, C.flags from %s.\"%s\".%s O, %s.\"%s\".%s C where O.catalog_name = '%s' and O.schema_name = '%s' and C.table_uid = %ld and O.object_uid = C.constraint_uid order by 1",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLE_CONSTRAINTS,
               catName.data(), schName.data(), 
@@ -12240,7 +12240,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseUserTableDesc(const NAString &catName,
         constrInfoArray[idx].isEnforced = 0;
 
       Queue * keyInfoQueue = NULL;
-      str_sprintf(query, "select column_name, column_number, keyseq_number, ordering , cast(0 as int not null) from %s.\"%s\".%s where object_uid = %Ld for read committed access order by keyseq_number",
+      str_sprintf(query, "select column_name, column_number, keyseq_number, ordering , cast(0 as int not null) from %s.\"%s\".%s where object_uid = %ld for read committed access order by keyseq_number",
                   getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_KEYS,
                   constrUID);
       cliRC = cliInterface.initializeInfoList(keyInfoQueue, TRUE);
@@ -12304,7 +12304,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseUserTableDesc(const NAString &catName,
               return NULL;
             }
 
-          str_sprintf(query, "select trim(O.catalog_name || '.' || '\"' || O.schema_name || '\"' || '.' || '\"' || O.object_name || '\"' ) constr_name, trim(O2.catalog_name || '.' || '\"' || O2.schema_name || '\"' || '.' || '\"' || O2.object_name || '\"' ) table_name from %s.\"%s\".%s U, %s.\"%s\".%s O, %s.\"%s\".%s O2, %s.\"%s\".%s T where  O.object_uid = U.foreign_constraint_uid and O2.object_uid = T.table_uid and T.constraint_uid = U.foreign_constraint_uid and U.unique_constraint_uid = %Ld order by 2, 1",
+          str_sprintf(query, "select trim(O.catalog_name || '.' || '\"' || O.schema_name || '\"' || '.' || '\"' || O.object_name || '\"' ) constr_name, trim(O2.catalog_name || '.' || '\"' || O2.schema_name || '\"' || '.' || '\"' || O2.object_name || '\"' ) table_name from %s.\"%s\".%s U, %s.\"%s\".%s O, %s.\"%s\".%s O2, %s.\"%s\".%s T where  O.object_uid = U.foreign_constraint_uid and O2.object_uid = T.table_uid and T.constraint_uid = U.foreign_constraint_uid and U.unique_constraint_uid = %ld order by 2, 1",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_UNIQUE_REF_CONSTR_USAGE,
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
@@ -12350,7 +12350,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseUserTableDesc(const NAString &catName,
       // attach all the referencing constraints
       if (strcmp(constrType, COM_FOREIGN_KEY_CONSTRAINT_LIT) == 0)
         {
-          str_sprintf(query, "select trim(O.catalog_name || '.' || '\"' || O.schema_name || '\"' || '.' || '\"' || O.object_name || '\"' ) constr_name, trim(O2.catalog_name || '.' || '\"' || O2.schema_name || '\"' || '.' || '\"' || O2.object_name || '\"' ) table_name from %s.\"%s\".%s R, %s.\"%s\".%s O, %s.\"%s\".%s O2, %s.\"%s\".%s T where  O.object_uid = R.unique_constraint_uid and O2.object_uid = T.table_uid and T.constraint_uid = R.unique_constraint_uid and R.ref_constraint_uid = %Ld order by 2,1",
+          str_sprintf(query, "select trim(O.catalog_name || '.' || '\"' || O.schema_name || '\"' || '.' || '\"' || O.object_name || '\"' ) constr_name, trim(O2.catalog_name || '.' || '\"' || O2.schema_name || '\"' || '.' || '\"' || O2.object_name || '\"' ) table_name from %s.\"%s\".%s R, %s.\"%s\".%s O, %s.\"%s\".%s O2, %s.\"%s\".%s T where  O.object_uid = R.unique_constraint_uid and O2.object_uid = T.table_uid and T.constraint_uid = R.unique_constraint_uid and R.ref_constraint_uid = %ld order by 2,1",
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_REF_CONSTRAINTS,
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
                       getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
@@ -12410,7 +12410,7 @@ TrafDesc * CmpSeabaseDDL::getSeabaseUserTableDesc(const NAString &catName,
        }
     } // for
 
-  str_sprintf(query, "select check_option, is_updatable, is_insertable from %s.\"%s\".%s where view_uid = %Ld for read committed access ",
+  str_sprintf(query, "select check_option, is_updatable, is_insertable from %s.\"%s\".%s where view_uid = %ld for read committed access ",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS,
               objUID);
   
@@ -12781,7 +12781,7 @@ TrafDesc *CmpSeabaseDDL::getSeabaseRoutineDescInternal(const NAString &catName,
   " library_filename, version, signature,  catalog_name, schema_name,"
   " object_name"
   " from %s.\"%s\".%s r, %s.\"%s\".%s l, %s.\"%s\".%s o "
-  " where r.udr_uid = %Ld and r.library_uid = l.library_uid "
+  " where r.udr_uid = %ld and r.library_uid = l.library_uid "
   " and l.library_uid = o.object_uid for read committed access",
        getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_ROUTINES,
        getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_LIBRARIES,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp b/core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp
index 5703769..94dc0d9 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLupgrade.cpp
@@ -425,7 +425,7 @@ short CmpSeabaseMDupgrade::executeSeabaseMDupgrade(CmpDDLwithStatusInfo *mdui,
 		      break;
 		    }
 		  
-		  str_sprintf(msgBuf, "  Current Version %Ld.%Ld.%Ld. Expected Version %Ld.%Ld.%Ld.",
+		  str_sprintf(msgBuf, "  Current Version %ld.%ld.%ld. Expected Version %d.%d.%d.",
 			      mdCurrMajorVersion, 
                               mdCurrMinorVersion,
                               mdCurrUpdateVersion,
@@ -548,7 +548,7 @@ short CmpSeabaseMDupgrade::executeSeabaseMDupgrade(CmpDDLwithStatusInfo *mdui,
                   else
                     {
                       if (retcode == -1395)
-                        str_sprintf(msgBuf, "   Metadata needs to be upgraded or reinitialized (Current Version %Ld.%Ld.%Ld, Expected Version %Ld.%Ld.%Ld).",
+                        str_sprintf(msgBuf, "   Metadata needs to be upgraded or reinitialized (Current Version %ld.%ld.%ld, Expected Version %ld.%ld.%ld).",
                                     mdCurrMajorVersion, mdCurrMinorVersion, mdCurrUpdateVersion,
                                     (Int64)METADATA_MAJOR_VERSION, (Int64)METADATA_MINOR_VERSION, (Int64)METADATA_UPDATE_VERSION);   
                       else
@@ -566,7 +566,7 @@ short CmpSeabaseMDupgrade::executeSeabaseMDupgrade(CmpDDLwithStatusInfo *mdui,
                   Int64 expSWMajorVersion = SOFTWARE_MAJOR_VERSION;
                   Int64 expSWMinorVersion = SOFTWARE_MINOR_VERSION;
                   Int64 expSWUpdVersion = SOFTWARE_UPDATE_VERSION;
-		  str_sprintf(msgBuf, "  System Version %Ld.%Ld.%Ld. Expected Version %Ld.%Ld.%Ld.",
+		  str_sprintf(msgBuf, "  System Version %ld.%ld.%ld. Expected Version %ld.%ld.%ld.",
 			      sysSWMajorVersion, sysSWMinorVersion, sysSWUpdVersion,
 			      expSWMajorVersion, expSWMinorVersion, expSWUpdVersion);
 		  mdui->setMsg(msgBuf);
@@ -659,7 +659,7 @@ short CmpSeabaseMDupgrade::executeSeabaseMDupgrade(CmpDDLwithStatusInfo *mdui,
 		    {
 		      // no version mismatch detected.
 		      // Metadata is uptodate.
-		      str_sprintf(msgBuf, "  Metadata is already at Version %Ld.%Ld.",
+		      str_sprintf(msgBuf, "  Metadata is already at Version %ld.%ld.",
 				  mdCurrMajorVersion, mdCurrMinorVersion);
 		      mdui->setMsg(msgBuf);
 		      mdui->setEndStep(FALSE);
@@ -700,7 +700,7 @@ short CmpSeabaseMDupgrade::executeSeabaseMDupgrade(CmpDDLwithStatusInfo *mdui,
                                   upgItems += ".";
                                 }
                             }
-			  str_sprintf(msgBuf, "  Metadata needs to be upgraded from Version %Ld.%Ld.%Ld to %Ld.%Ld.%Ld.%s",
+			  str_sprintf(msgBuf, "  Metadata needs to be upgraded from Version %ld.%ld.%ld to %d.%d.%d.%s",
 				      mdCurrMajorVersion, mdCurrMinorVersion/10, 
                                       (mdCurrMinorVersion - (mdCurrMinorVersion/10)*10),
 				      METADATA_MAJOR_VERSION, METADATA_MINOR_VERSION,
@@ -716,7 +716,7 @@ short CmpSeabaseMDupgrade::executeSeabaseMDupgrade(CmpDDLwithStatusInfo *mdui,
 		      else
 			{
 			  // metadata cannot be upgraded with the current release.
-			  str_sprintf(msgBuf, "  Metadata cannot to be upgraded from Version %Ld.%Ld to %Ld.%Ld with this software",
+			  str_sprintf(msgBuf, "  Metadata cannot to be upgraded from Version %ld.%ld to %d.%d with this software",
 				      mdCurrMajorVersion, mdCurrMinorVersion,
 				      METADATA_MAJOR_VERSION, METADATA_MINOR_VERSION);
 			  
@@ -1827,7 +1827,7 @@ short CmpSeabaseMDupgrade::executeSeabaseMDupgrade(CmpDDLwithStatusInfo *mdui,
 
 	case METADATA_UPGRADED:
 	  {
-	    str_sprintf(msgBuf, "Metadata Upgrade to Version %Ld.%Ld.%Ld: done",
+	    str_sprintf(msgBuf, "Metadata Upgrade to Version %d.%d.%d: done",
                         METADATA_MAJOR_VERSION, 
                         METADATA_MINOR_VERSION,
                         METADATA_UPDATE_VERSION);
@@ -2207,7 +2207,7 @@ short CmpSeabaseMDupgrade::customizeNewMDv23tov30(CmpDDLwithStatusInfo *mdui,
                 hbaseCreateOptions = hbaseCreateOptions.strip();
               }
                
-            str_sprintf(buf, "update %s.\"%s\".%s set num_salt_partns = %d where table_uid = %Ld",
+            str_sprintf(buf, "update %s.\"%s\".%s set num_salt_partns = %d where table_uid = %ld",
                         getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLES,
                         numSaltPartns,
                         tableUID);
@@ -2265,7 +2265,7 @@ short CmpSeabaseMDupgrade::customizeNewMDv23tov30(CmpDDLwithStatusInfo *mdui,
             return -1;
           }
            
-        str_sprintf(buf, "merge into %s.\"%s\".%s using (select object_uid, sum(column_size + case when nullable != 0 then 1 else 0 end), sum(column_size + case when nullable != 0 then 1 else 0 end + %d + %d), count(*) from %s.\"%s\".%s group by 1) T(a,b,c,d) on table_uid = T.a when matched then update set (row_data_length, row_total_length) = (T.b, T.c + key_length * T.d)",
+        str_sprintf(buf, "merge into %s.\"%s\".%s using (select object_uid, sum(column_size + case when nullable != 0 then 1 else 0 end), sum(column_size + case when nullable != 0 then 1 else 0 end + %lu + %d), count(*) from %s.\"%s\".%s group by 1) T(a,b,c,d) on table_uid = T.a when matched then update set (row_data_length, row_total_length) = (T.b, T.c + key_length * T.d)",
                     getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TABLES,
                     sizeof(Int64),
                     5,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8fd49879/core/sql/sqlcomp/CmpSeabaseDDLview.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLview.cpp b/core/sql/sqlcomp/CmpSeabaseDDLview.cpp
index 0b8a690..66a2348 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLview.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLview.cpp
@@ -441,7 +441,7 @@ short CmpSeabaseDDL::updateViewUsage(StmtDDLCreateView * createViewParseNode,
 	  return -1;
 	}
       
-      str_sprintf(query, "upsert into %s.\"%s\".%s values (%Ld, %Ld, '%s', 0 )",
+      str_sprintf(query, "upsert into %s.\"%s\".%s values (%ld, %ld, '%s', 0 )",
 		  getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS_USAGE,
 		  viewUID,
 		  usedObjUID,
@@ -463,7 +463,7 @@ short CmpSeabaseDDL::updateViewUsage(StmtDDLCreateView * createViewParseNode,
     {
 
       char query[1000];
-      str_sprintf(query, "upsert into %s.\"%s\".%s values (%Ld, %Ld, '%s', 0 )",
+      str_sprintf(query, "upsert into %s.\"%s\".%s values (%ld, %ld, '%s', 0 )",
 		  getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS_USAGE,
 		  viewUID,
 		  uul[u]->getUDFUID(),
@@ -650,7 +650,7 @@ short CmpSeabaseDDL::getListOfDirectlyReferencedObjects (
   char buf[4000];
   str_sprintf(buf, "select object_type, object_uid, catalog_name," 
                    "schema_name, object_name from %s.\"%s\".%s T, %s.\"%s\".%s VU " 
-                   "where VU.using_view_uid = %Ld "
+                   "where VU.using_view_uid = %ld "
                    "and T.object_uid = VU.used_object_uid",
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
               getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS_USAGE,
@@ -1048,7 +1048,7 @@ void CmpSeabaseDDL::createSeabaseView(
 
 
   query = new(STMTHEAP) char[1000];
-  str_sprintf(query, "upsert into %s.\"%s\".%s values (%Ld, '%s', %d, %d, 0)",
+  str_sprintf(query, "upsert into %s.\"%s\".%s values (%ld, '%s', %d, %d, 0)",
 	      getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_VIEWS,
 	      objUID,
 	      computeCheckOption(createViewNode),