Github user sandhyasun commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/589#discussion_r70508105
  
    --- Diff: core/sql/exp/ExpLOBaccess.cpp ---
    @@ -1359,22 +1361,26 @@ Ex_Lob_Error ExLob::openDataCursor(char *file, 
LobsCursorType type, Int64 range,
         it = lobCursors_.find(string(file, strlen(file))); // to get the 
actual cursor object in the map
     
         if (!fdData_ || (openFlags_ != O_RDONLY)) 
    -    {
    -      hdfsCloseFile(fs_, fdData_);
    -      fdData_ = NULL;
    -      openFlags_ = O_RDONLY;
    -      fdData_ = hdfsOpenFile(fs_, lobDataFile_, openFlags_, 0, 0, 0);
    -      if (!fdData_) {
    -        openFlags_ = -1;
    -        lobCursorLock_.unlock();
    -        return LOB_DATA_FILE_OPEN_ERROR;
    +      {
    +        hdfsCloseFile(fs_, fdData_);
    +        fdData_ = NULL;
    +        openFlags_ = O_RDONLY;
    +        fdData_ = hdfsOpenFile(fs_, lobDataFile_, openFlags_, 0, 0, 0);
    +       
    +        if (!fdData_)
    +          {
    +            openFlags_ = -1;
    +            *hdfsDetailError = errno;
    --- End diff --
    
    Yes will be better to check for NULL. I did make it a reference param 
initially but there are 4 other files that needed to be touched unnecessarily 
so made it a pointer. Will make that change to be safe.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to