Merge remote branch 'origin/release2.2' into TRAFODION-3014

Conflicts:
        core/sql/cli/Cli.cpp
        core/sql/clitest/blobtest.cpp
        core/sql/executor/ExExeUtilLoad.cpp
        core/sql/exp/ExpLOBaccess.cpp
        core/sql/exp/ExpLOBaccess.h
        core/sql/exp/ExpLOBenums.h
        core/sql/exp/ExpLOBinterface.cpp
        core/sql/exp/ExpLOBinterface.h
        core/sql/generator/GenRelExeUtil.cpp
        core/sql/regress/executor/EXPECTED130
        core/sql/regress/hive/EXPECTED018
        docs/sql_reference/src/asciidoc/_chapters/sql_statements.adoc
        install/python-installer/scripts/traf_ldap.py
        pom.xml


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

Branch: refs/heads/master
Commit: c75c6bfa45fb2c8f2d2e7406522f83aef20ee786
Parents: 7430ca8 b460106
Author: Liu Ming <ovis_p...@sina.com>
Authored: Tue Mar 27 19:56:23 2018 -0400
Committer: Liu Ming <ovis_p...@sina.com>
Committed: Tue Mar 27 19:56:23 2018 -0400

----------------------------------------------------------------------
 NOTICE                                          |  2 +-
 .../trafodion/jdbc/t4/ExtractLobMessage.java    | 13 +--
 .../org/trafodion/jdbc/t4/ExtractLobReply.java  | 23 +++--
 .../org/trafodion/jdbc/t4/T4Properties.java     | 48 +++++++++-
 .../java/org/trafodion/jdbc/t4/TrafT4Blob.java  | 11 ---
 .../java/org/trafodion/jdbc/t4/TrafT4Clob.java  | 13 ---
 .../java/org/trafodion/jdbc/t4/TrafT4Lob.java   | 39 ++++++--
 .../org/trafodion/jdbc/t4/TrafT4ResultSet.java  |  8 +-
 .../nsksrvr/Interface/marshalingsrvr_srvr.cpp   | 48 +++++++---
 .../nsksrvr/Interface/marshalingsrvr_srvr.h     |  6 +-
 .../src/odbc/nsksrvr/Interface/odbcs_srvr.cpp   | 11 ++-
 .../odbc/nsksrvr/Interface/odbcs_srvr_res.cpp   | 18 ++--
 .../src/odbc/nsksrvr/Interface/odbcs_srvr_res.h |  6 +-
 core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp | 20 +++--
 core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.h   |  3 +-
 .../conn/odbc/src/odbc/nsksrvrcore/srvrcommon.h |  5 +-
 .../odbc/src/odbc/nsksrvrcore/srvrothers.cpp    | 94 +++++++-------------
 .../java/org/trafodion/ci/SessionInterface.java |  2 +
 core/sql/executor/ExExeUtilLoad.cpp             |  1 -
 core/sql/exp/ExpLOBaccess.cpp                   |  1 +
 core/sql/exp/ExpLOBinterface.cpp                |  2 -
 .../org/trafodion/jdbc_test/JdbcCommon.java     | 27 ++++--
 .../java/org/trafodion/jdbc_test/PropTest.java  |  9 +-
 .../java/org/trafodion/jdbc_test/TestBlob.java  | 16 ++--
 .../org/trafodion/jdbc_test/TestBlobBatch.java  | 12 ++-
 .../java/org/trafodion/jdbc_test/TestClob.java  | 17 +++-
 .../org/trafodion/jdbc_test/TestClobBatch.java  | 15 ++--
 .../org/trafodion/jdbc_test/TestForeignKey.java | 87 +++++++++++-------
 .../trafodion/jdbc_test/TestGetIndexInfo.java   | 24 +++--
 install/python-installer/scripts/hdfs_cmds.py   |  2 +-
 30 files changed, 364 insertions(+), 219 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/T4Properties.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4ResultSet.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.h
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/core/conn/odbc/src/odbc/nsksrvrcore/srvrcommon.h
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/core/conn/trafci/src/main/java/org/trafodion/ci/SessionInterface.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/core/sql/executor/ExExeUtilLoad.cpp
----------------------------------------------------------------------
diff --cc core/sql/executor/ExExeUtilLoad.cpp
index fca307c,614adde..fbebeaa
--- a/core/sql/executor/ExExeUtilLoad.cpp
+++ b/core/sql/executor/ExExeUtilLoad.cpp
@@@ -2752,9 -2779,8 +2752,8 @@@ void ExExeUtilLobExtractTcb::freeResour
               3, // close
                 0); // open type not applicable
  
-     
 -   NADELETE(lobGlobals_,LOBglobals,currContext->exHeap());
 -  lobGlobals_ = NULL;
 +  ExpLOBinterfaceCleanup(exLobGlobals_);
 +  exLobGlobals_ = NULL;
  }
  
  ExExeUtilLobExtractTcb::~ExExeUtilLobExtractTcb()

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/core/sql/exp/ExpLOBaccess.cpp
----------------------------------------------------------------------
diff --cc core/sql/exp/ExpLOBaccess.cpp
index 4b3a785,af2846c..819394b
--- a/core/sql/exp/ExpLOBaccess.cpp
+++ b/core/sql/exp/ExpLOBaccess.cpp
@@@ -786,66 -853,6 +786,67 @@@ Ex_Lob_Error ExLob::getLength(char *han
        }
    return err;
  }
++
 +Ex_Lob_Error ExLob::getOffset(char *handleIn, Int32 handleInLen,Int64 
&outLobOffset,LobsSubOper so, Int64 transId)
 +{
 +  char logBuf[4096];
 +  Int32 cliErr = 0;
 +  Ex_Lob_Error err=LOB_OPER_OK; 
 +
 +  Int64 dummy = 0;
 +  Int32 dummy2 = 0;
 +  if (so != Lob_External_File)
 +    {
 +      
 +      cliErr = SQL_EXEC_LOBcliInterface(handleIn, 
handleInLen,NULL,NULL,NULL,NULL,LOB_CLI_SELECT_LOBOFFSET,LOB_CLI_ExecImmed,&outLobOffset,0,
 0, 0,0,transId,lobTrace_);
 +    
 +      if (cliErr < 0 ) {
 +        str_sprintf(logBuf,"CLI SELECT_LOBOFFSET returned error %d",cliErr);
 +        lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
 +  
 +        return LOB_DESC_READ_ERROR;
 +      }
 +    }
 + 
 +  return err;
 +}
 +
 +Ex_Lob_Error ExLob::getFileName(char *handleIn, Int32 handleInLen, char 
*outFileName, Int32 &outFileLen , LobsSubOper so, Int64 transId)
 +{
 +  char logBuf[4096];
 +  Int32 cliErr = 0;
 +  Ex_Lob_Error err=LOB_OPER_OK; 
 +  Int64 dummy = 0;
 +  Int32 dummy2 = 0;
 +  if (so != Lob_External_File)
 +    {
 +      //Derive the filename from the LOB handle and return
 +      str_cpy_all(outFileName, (char 
*)lobDataFile_.data(),lobDataFile_.length());
 +    }
 +    else
 +      {
 +        //Get the lob external filename from the descriptor file 
 +        cliErr = SQL_EXEC_LOBcliInterface(handleIn, 
 +                                          handleInLen, 
 +                                          (char *)outFileName, &outFileLen,
 +                                          NULL, 0,
 +                                          LOB_CLI_SELECT_UNIQUE, 
LOB_CLI_ExecImmed,
 +                                          &dummy, &dummy,
 +                                          &dummy, &dummy, 
 +                                          0,
 +                                          transId,lobTrace_);
 +        if (cliErr < 0 ) {
 +          str_sprintf(logBuf,"CLI SELECT_FILENAME returned error %d",cliErr);
 +          lobDebugInfo(logBuf, 0,__LINE__,lobTrace_);
 +  
 +          return LOB_DESC_READ_ERROR;
 +        }
 +             
 +      }
 +  return err;
 +}
 +
 +
  Ex_Lob_Error ExLob::writeDesc(Int64 &sourceLen, char *source, LobsSubOper 
subOper, Int64 &descNumOut, Int64 &operLen, Int64 lobMaxSize,Int64 
lobMaxChunkMemSize,Int64 lobGCLimit, char * handleIn, Int32 handleInLen, char 
*blackBox, Int32 *blackBoxLen, char *handleOut, Int32 &handleOutLen, Int64 
xnId, void *lobGlobals)
  {
    Ex_Lob_Error err=LOB_OPER_OK; 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/core/sql/exp/ExpLOBinterface.cpp
----------------------------------------------------------------------
diff --cc core/sql/exp/ExpLOBinterface.cpp
index 8e73864,9b58344..a79381a
--- a/core/sql/exp/ExpLOBinterface.cpp
+++ b/core/sql/exp/ExpLOBinterface.cpp
@@@ -985,7 -984,7 +985,6 @@@ Lng32 ExpLOBInterfaceSelectCursor(ExLob
                   0,
                   hdfsDetailError,0,0,0,0,0,0,0,
                     openType
--                   
                   );
  
    if (err != LOB_OPER_OK)
@@@ -1050,123 -1049,8 +1049,122 @@@ Lng32 ExpLOBInterfaceGetLobLength(ExLob
    
    return LOB_ACCESS_SUCCESS;
  }
 +
 +Lng32 ExpLOBInterfaceGetOffset(ExLobGlobals * exLobGlob, 
 +                                char * lobName, 
 +                                char * lobLoc,
 +                                Lng32 lobType,
 +                                char * lobHdfsServer,
 +                                Lng32 lobHdfsPort,
 +                                Int32 handleLen, 
 +                                char * lobHandle,
 +                                Int64 &outLobOffset
 +                                 
 +                                )
 +{
 +  Ex_Lob_Error err;
 +  
 +  Int64 dummyParam = 0;
 +  Int32 dummyParam2 = 0;
 +  Ex_Lob_Error status;
 +  Int64 cliError=0;
 +  
 +  LobsOper lo;
 +  LobsSubOper so;
 +  LobsStorage ls = (LobsStorage)lobType;
 +  if (ls == Lob_External_HDFS_File)
 +    {
 +      so = Lob_External_File;
 +      outLobOffset = 0;
 +      return LOB_ACCESS_SUCCESS;
 +    }
 +  else 
 +    so = Lob_Buffer;
 +  err = ExLobsOper(lobName, 
 +                 lobHandle, handleLen, 
 +                 lobHdfsServer, lobHdfsPort,
 +                   NULL, dummyParam2, 
 +                 dummyParam, dummyParam, 
 +                 outLobOffset,
 +                   dummyParam, dummyParam,
 +                 status, cliError, 
 +                 lobLoc, ls, //Lob_HDFS_File,
 +                 NULL, 0, 
 +                 dummyParam,NULL,
 +                 Lob_GetOffset,
 +                 so,
 +                   TRUE,
 +                 exLobGlob,
 +                 0,
 +                 0, 0,0,0,0,0,0,0,
 +                   0
 +                 );
 +
 +  if (err != LOB_OPER_OK)
 +    {
 +      return -err;
 +    }
 +  
 +  return LOB_ACCESS_SUCCESS;
 +}
 +
 +Lng32 ExpLOBInterfaceGetFileName(ExLobGlobals * exLobGlob, 
 +                                char * lobName, 
 +                                char * lobLoc,
 +                                Lng32 lobType,
 +                                char * lobHdfsServer,
 +                                Lng32 lobHdfsPort,
 +                                Int32 handleLen, 
 +                                char * lobHandle,
 +                                  char * fileName,
 +                                Int32 &outFileLen
 +                                 
 +                                )
 +{
 +  Ex_Lob_Error err;
 +  
 +  Int64 dummyParam = 0;
 +  Int32 dummyParam2 = 0;
 +  Ex_Lob_Error status;
 +  Int64 cliError=0;
 +  Int64 hdfsFileLen = 0;
 +  LobsOper lo;
 +  LobsSubOper so;
 +  LobsStorage ls = (LobsStorage)lobType;
 +  if (ls == Lob_External_HDFS_File)
 +    so = Lob_External_File;
 +  else 
 +    so = Lob_Buffer;
 +  err = ExLobsOper(lobName, 
 +                 lobHandle, handleLen, 
 +                 lobHdfsServer, lobHdfsPort,
 +                   NULL, dummyParam2, 
 +                 dummyParam, dummyParam, 
 +                 dummyParam,
 +                   dummyParam, dummyParam,
 +                 status, cliError, 
 +                 lobLoc, ls, //Lob_HDFS_File,
 +                 NULL, 0, 
 +                 dummyParam,NULL,
 +                 Lob_GetFileName,
 +                 so,
 +                   TRUE,
 +                 exLobGlob,
 +                 0,
 +                 fileName, outFileLen,
 +                   0,0,0,0,0,0,
 +                   0
 +                 );
 +
 +  if (err != LOB_OPER_OK)
 +    {
 +      return -err;
 +    }
 +  
-   
 +  return LOB_ACCESS_SUCCESS;
 +}
  Lng32 ExpLOBinterfaceStats(
 -                          void * exLobGlob, 
 +                          ExLobGlobals * exLobGlob, 
                            ExLobStats * lobStats,
                            char * lobName, char * lobLoc,
                            Lng32 lobType,

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/dcs/src/test/jdbc_test/src/test/java/org/trafodion/jdbc_test/PropTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafodion/blob/c75c6bfa/dcs/src/test/jdbc_test/src/test/java/org/trafodion/jdbc_test/TestGetIndexInfo.java
----------------------------------------------------------------------

Reply via email to