trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sand...@apache.org
Subject [1/4] incubator-trafodion git commit: Fixes from testing JDBC usage of blob datatype.
Date Wed, 31 May 2017 03:23:55 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 8fe0d62ad -> c9ff84394


Fixes from testing  JDBC usage of blob datatype.


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

Branch: refs/heads/master
Commit: 9a1ccf0ce8a68fdd6594187cfe617b973f327db7
Parents: d0c4d73
Author: Sandhya Sundaresan <sandhya@apache.org>
Authored: Tue May 23 19:59:11 2017 +0000
Committer: Sandhya Sundaresan <sandhya@apache.org>
Committed: Tue May 23 19:59:11 2017 +0000

----------------------------------------------------------------------
 core/sql/exp/ExpLOBaccess.cpp       |  2 +-
 core/sql/optimizer/BindItemExpr.cpp | 69 +-------------------------------
 core/sql/sqlcomp/nadefaults.cpp     |  3 +-
 3 files changed, 5 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9a1ccf0c/core/sql/exp/ExpLOBaccess.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBaccess.cpp b/core/sql/exp/ExpLOBaccess.cpp
index 27d8c5f..3764752 100644
--- a/core/sql/exp/ExpLOBaccess.cpp
+++ b/core/sql/exp/ExpLOBaccess.cpp
@@ -1664,7 +1664,7 @@ Ex_Lob_Error ExLob::allocateDesc(ULng32 size, Int64 &descNum, Int64
&dataOffset,
     if (fInfo)
       dataOffset = fInfo->mSize;
 
-    if (dataOffset > lobGCLimit) // 5 GB default
+    if ((lobGCLimit != 0) && (dataOffset > lobGCLimit)) // 5 GB default
       {
         str_sprintf(logBuf,"Starting GC. Current Offset : %Ld",dataOffset);
         lobDebugInfo(logBuf,0,__LINE__,lobTrace_);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9a1ccf0c/core/sql/optimizer/BindItemExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/BindItemExpr.cpp b/core/sql/optimizer/BindItemExpr.cpp
index cf99135..fbbc6f8 100644
--- a/core/sql/optimizer/BindItemExpr.cpp
+++ b/core/sql/optimizer/BindItemExpr.cpp
@@ -6088,18 +6088,7 @@ ItemExpr *Assign::bindNode(BindWA *bindWA)
         return this;
       child(1) = boundExpr_1;
     }
-  if (CmpCommon::getDefault(JDBC_PROCESS) == DF_ON)
-  {
-    // if an untyped param is being assigned to a column, and
-    // the column heading indicates its a 'BLOB/CLOB' column,
-    // then assign that heading and column's tablename to the
-    // parameter. This is being done for WLI BLOB/CLOB support.
-    // See sqlparser.y for details.
-    ItemExpr *ie = SetParamHeadingAndTablename(bindWA);
-    if (bindWA->errStatus())
-	      return ie;
-  }
-
+ 
  
   NABuiltInTypeEnum targetType =  child(0)->castToItemExpr()->getValueId().getType().getTypeQualifier()
;
   if  (targetType == NA_LOB_TYPE)
@@ -6109,7 +6098,7 @@ ItemExpr *Assign::bindNode(BindWA *bindWA)
           NABuiltInTypeEnum sourceType =  child(1)->castToItemExpr()->getValueId().getType().getTypeQualifier()
; 
           //If it's a dynamic param with unknown type or if it is a 
           // character type, trasnform the insert.
-          if ((child(1)->getOperatorType() == ITM_DYN_PARAM && sourceType == NA_UNKNOWN_TYPE)
 || sourceType == NA_CHARACTER_TYPE)
+          if ((((child(1)->getOperatorType() == ITM_DYN_PARAM) ||(child(1)->getOperatorType()
== ITM_ROWSETARRAY_SCAN))  && sourceType == NA_UNKNOWN_TYPE)  || sourceType == NA_CHARACTER_TYPE)
             {
               ValueId vid1 = child(1)->castToItemExpr()->getValueId();  
               // Add a stringToLob node
@@ -6385,61 +6374,7 @@ ItemExpr *Assign::bindNode(BindWA *bindWA)
   return boundExpr;
 } // Assign::bindNode()
 
-ItemExpr *Assign::SetParamHeadingAndTablename(BindWA *bindWA) {
-  if (isUserSpecified())
-    {
-      //
-      // Ensure the target is a column;
-      // and that it is a user column (4013).
-      //
-      const NAColumn *nacolTgt = child(0).getNAColumn();
-      if ((nacolTgt->isUserColumn()) &&
-	  (nacolTgt->getHeading()))
-	{
-	  if ((strcmp(nacolTgt->getHeading(),
-		      "JDBC_BLOB_COLUMN -") == 0) ||
-	      (strcmp(nacolTgt->getHeading(),
-		      "JDBC_CLOB_COLUMN -") == 0))
-	    {
-
-	      if (NOT child(1)->castToItemExpr()->nodeIsBound())
-		{
-		  ItemExpr * boundExpr =
-		    child(1)->castToItemExpr()->bindNode(bindWA);
-		  if (bindWA->errStatus())
-		    return boundExpr;
-		  child(1) = boundExpr;
-		}
-
-	      OperatorTypeEnum ieOperType ;
-	      ieOperType = child(1)->castToItemExpr()->getOperatorType() ;
-
-	      if ( ieOperType == ITM_DYN_PARAM || ieOperType == ITM_ROWSETARRAY_SCAN )
-		{
-		  if (child(1)->castToItemExpr()->getValueId().getType().getTypeQualifier() == NA_UNKNOWN_TYPE)
-		    {
 
-		      if (ieOperType == ITM_DYN_PARAM) {
-			DynamicParam * param =
-			  (DynamicParam *)child(1)->castToItemExpr();
-			param->setParamHeading(nacolTgt->getHeading());
-			param->setParamTablename(nacolTgt->getTableName()->getObjectName());
-		      }
-		      else {  // ITM_ROWSETARRAY_SCAN
-			HostVar * hv =
-			  (HostVar *)child(1)->child(0)->castToItemExpr();
-			hv->setParamHeading(nacolTgt->getHeading());
-			hv->setParamTablename(nacolTgt->getTableName()->getObjectName());
-		      }
-
-		    } // source is untyped scalar or array param
-
-		} // source is dynamic scalar or array param ( i.e. rowset)
-	    } // blob/clob'ed
-	} // user column
-    } // user specified
-  return this;
-} // Assign::setParamHeadingAndTablename
 
 // -----------------------------------------------------------------------
 // member functions for class Cast

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9a1ccf0c/core/sql/sqlcomp/nadefaults.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/nadefaults.cpp b/core/sql/sqlcomp/nadefaults.cpp
index 19fe1ac..a054bd2 100644
--- a/core/sql/sqlcomp/nadefaults.cpp
+++ b/core/sql/sqlcomp/nadefaults.cpp
@@ -2076,7 +2076,8 @@ SDDkwd__(ISO_MAPPING,           (char *)SQLCHARSETSTRING_ISO88591),
   SDDkwd__(LIMIT_MAX_NUMERIC_PRECISION,		"SYSTEM"),
 
  // Size in bytes  used to perform garbage collection  to lob data file 
-  // default size is 5GB   . Change to adjust disk usage. 
+  // default size is 5GB   . Change to adjust disk usage. If 0 it means
+ // don't do GC
   DDint__(LOB_GC_LIMIT_SIZE,            "5000"),
   
   DDint__(LOB_HDFS_PORT,                       "0"),


Mime
View raw message