[GitHub] trafodion pull request #1470: [TRAFODION-2853] memory leak of ComDiagsArea i...

2018-03-14 Thread selvaganesang
Github user selvaganesang commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1470#discussion_r174679546
  
--- Diff: core/sql/sqlci/SqlCmd.cpp ---
@@ -440,25 +461,50 @@ void handleLocalError(ComDiagsArea &diags, SqlciEnv 
*sqlci_env)
   // when HandleCLIError() is called with a error after a CLI call.
   // Soln :10-021203-3433
 
-  if (diags.getNumber(DgSqlCode::ERROR_)) {
+  if (diags->getNumber(DgSqlCode::ERROR_)) {
  worstcode = SQL_Error;
   }
-  else if (diags.getNumber(DgSqlCode::WARNING_)) {
+  else if (diags->getNumber(DgSqlCode::WARNING_)) {
 worstcode = SQL_Warning;
   }
 
   if (!lastLineWasABlank) log->WriteAllWithoutEOL("");
   lastLineWasABlank = TRUE;
 
   ostringstream errMsg;
-  NADumpDiags(errMsg, &diags, TRUE/*newline*/, 0, NULL, log->isVerbose(),
+  NADumpDiags(errMsg, diags, TRUE/*newline*/, 0, NULL, log->isVerbose(),
   sqlci_env->getTerminalCharset());
 
   errMsg << ends;
 
   log->WriteAllWithoutEOL(errMsg.str().c_str());
 }
 
+Int64 getRowsAffected(SQLSTMT_ID *stmt)
+{
+   Int32 rc;
+   rc = SQL_EXEC_GetDiagnosticsStmtInfo2(stmt,
+   SQLDIAG_ROW_COUNT, &rowsAffected,
+   NULL, 0, NULL);
+   if (rc == 0)
+  return rowsAffected; 
+   else
+  return -1;
+}
+
+Int64 getDiagsCondCount(SQLSTMT_ID *stmt)
+{
+   Int32 rc;
+   Int64 diagsCondCount;
+   rc = SQL_EXEC_GetDiagnosticsStmtInfo2(stmt,
+   SQLDIAG_NUMBER, &diagsCondCount,
+   NULL, 0, NULL);
+   if (rc == 0)
+  return 0; 
+   else
+  return diagsCondCount;
--- End diff --

I just realized that I misread the function SQLCLI_ReturnCode.  It looks 
like diagsCondCount is uninitialized and hence junk value was returned for 
getDiagsCondCount that enabled us to return warnings. Basically two issues made 
this function to behave as expected most of the time. I will be fixing it soon


---


[GitHub] trafodion pull request #1474: fix [trafodion-2988] prepare query returns 200...

2018-03-14 Thread kakaxi3019
Github user kakaxi3019 commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1474#discussion_r174657626
  
--- Diff: core/sql/optimizer/mdam.cpp ---
@@ -2002,7 +2002,8 @@ void Disjuncts::computeCommonPredicates()
  inVidset.next(predId);
  inVidset.advance(predId) )
 {
-if(predId.getItemExpr()->getOperatorType() == 
ITM_RANGE_SPEC_FUNC )
+//TRAFODION-2988
+/*if(predId.getItemExpr()->getOperatorType() == 
ITM_RANGE_SPEC_FUNC )
--- End diff --

Thanks Dave,your suggestion is right.I will fix it and push again.


---


[GitHub] trafodion pull request #1477: [TRAFODION-2985] Revert 2.2.0 download links t...

2018-03-14 Thread svarnau
GitHub user svarnau opened a pull request:

https://github.com/apache/trafodion/pull/1477

[TRAFODION-2985] Revert 2.2.0 download links to mirror pointers



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/svarnau/trafodion web2985

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafodion/pull/1477.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1477


commit 47c9f7425aab9af74f57354c3ad741d25c81e68d
Author: Steve Varnau 
Date:   2018-03-15T01:17:52Z

[TRAFODION-2985] Revert 2.2.0 web links to mirror pointers




---


[GitHub] trafodion pull request #1476: Removing the "WITH PARTITIONS" syntax descript...

2018-03-14 Thread zellerh
GitHub user zellerh opened a pull request:

https://github.com/apache/trafodion/pull/1476

Removing the "WITH PARTITIONS" syntax description

This option does not do anything in Trafodion.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zellerh/trafodion bug/R23a

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafodion/pull/1476.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1476


commit 4520a46dae2fffe58c8db70ba15d05d1a83235d6
Author: Hans Zeller 
Date:   2018-03-14T23:52:14Z

Removing the "WITH PARTITIONS" syntax description

This option does not do anything in Trafodion.




---


[GitHub] trafodion pull request #1473: [TRAFODION-2977] Fix issues with maximum key l...

2018-03-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/trafodion/pull/1473


---


[GitHub] trafodion pull request #1474: fix [trafodion-2988] prepare query returns 200...

2018-03-14 Thread DaveBirdsall
Github user DaveBirdsall commented on a diff in the pull request:

https://github.com/apache/trafodion/pull/1474#discussion_r174623263
  
--- Diff: core/sql/optimizer/mdam.cpp ---
@@ -2002,7 +2002,8 @@ void Disjuncts::computeCommonPredicates()
  inVidset.next(predId);
  inVidset.advance(predId) )
 {
-if(predId.getItemExpr()->getOperatorType() == 
ITM_RANGE_SPEC_FUNC )
+//TRAFODION-2988
+/*if(predId.getItemExpr()->getOperatorType() == 
ITM_RANGE_SPEC_FUNC )
--- End diff --

One cosmetic issue. It is better to delete code you are replacing rather 
than commenting it out. The only reason to comment out code is if we are 
temporarily disabling it in hopes of putting it back it later.


---


[GitHub] trafodion pull request #1472: [TRAFODION-2958] Consolidate the master and ba...

2018-03-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/trafodion/pull/1472


---