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

    https://github.com/apache/incubator-trafodion/pull/589#discussion_r70474212
  
    --- 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 --
    
    In the function prototype, hdfsDetailError defaults to NULL, So, should we 
check for null before attempting to store errno in there? (An alternative would 
be to make hdfsDetailError a reference parameter instead of a pointer; then the 
caller always has to provide it.)


---
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