Github user sandhyasun commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/248#discussion_r48979511
--- Diff: core/sql/executor/ExExeUtilLoad.cpp ---
@@ -3098,19 +3119,25 @@ short ExExeUtilLobExtractTcb::work()
break;
}
- if (lobDataLen_ == 0)
+ if (lobDataOutputLen == 0)
{
step_ = CLOSE_CURSOR_;
break;
}
- remainingBytes_ = (Lng32)lobDataLen_;
+ remainingBytes_ = (Lng32)lobDataOutputLen;
currPos_ = 0;
- if (lobTdb().getToType() == ComTdbExeUtilLobExtract::TO_FILE_)
- step_ = INSERT_FROM_STRING_;
- else
- step_ = RETURN_STRING_;
+ /*if (lobTdb().getToType() ==
ComTdbExeUtilLobExtract::TO_FILE_)
+ step_ = INSERT_FROM_STRING_;*/
+ if (lobTdb().getToType() ==
ComTdbExeUtilLobExtract::TO_BUFFER_)
+ {
+ str_sprintf(statusString_," Success: LOB data length returned :
%d", lobDataOutputLen);
+
+ //lobTdb().setExtractSizeIOAddr((Int64)(&lobDataOutputLen));
+ memcpy((char *)lobTdb().dataExtractSizeIOAddr(), (char
*)&lobDataOutputLen,sizeof(Int64));
+ step_ = RETURN_STATUS_;
+ }
--- End diff --
Added an "invalid state handling" block to avoid hanging in the same state
---
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.
---