Commit 1c75becb authored by joreland@mysql.com's avatar joreland@mysql.com

wl#2126 - read_multi_range ndb part

parent 2a44929c
......@@ -430,6 +430,10 @@ public:
*/
const NdbOperation * getNextCompletedOperation(const NdbOperation * op)const;
const NdbOperation* getFirstDefinedOperation()const{return theFirstOpInList;}
const NdbOperation* getLastDefinedOperation()const{return theLastOpInList;}
/** @} *********************************************************************/
/**
......
......@@ -718,6 +718,7 @@ public:
};
LockMode getLockMode() const { return theLockMode; }
void setAbortOption(Int8 ao) { m_abortOption = ao; }
/**
* Set/get distribution/partition key
......@@ -746,10 +747,13 @@ protected:
void initInterpreter();
void next(NdbOperation*); // Set next pointer
NdbOperation* next(); // Get next pointer
public:
const NdbOperation* next() const;
protected:
enum OperationStatus{
enum OperationStatus
{
Init,
OperationDefined,
TupleKeyDefined,
......@@ -995,6 +999,12 @@ NdbOperation::next()
return theNext;
}
inline
const NdbOperation*
NdbOperation::next() const
{
return theNext;
}
/******************************************************************************
OperationStatus Status();
......
......@@ -232,21 +232,6 @@ Remark: Handle time-out on a transaction object.
void
NdbConnection::handleExecuteCompletion()
{
if (theCompletionStatus == CompletedFailure) {
NdbOperation* tOpTemp = theFirstExecOpInList;
while (tOpTemp != NULL) {
/*****************************************************************************
* Ensure that all executing operations report failed for each
* read attribute when failure occurs.
* We do not want any operations to report both failure and
* success on different read attributes.
****************************************************************************/
tOpTemp->handleFailedAI_ElemLen();
tOpTemp = tOpTemp->next();
}//while
theReturnStatus = ReturnFailure;
}//if
/***************************************************************************
* Move the NdbOperation objects from the list of executing
* operations to list of completed
......@@ -1512,6 +1497,7 @@ transactions.
/**********************************************************************/
theCompletionStatus = CompletedFailure;
theCommitStatus = Aborted;
theReturnStatus = ReturnFailure;
return 0;
} else {
#ifdef NDB_NO_DROPPED_SIGNAL
......
......@@ -543,10 +543,11 @@ NdbOperation::receiveTCKEYREF( NdbApiSignal* aSignal)
theStatus = Finished;
// blobs want this
if (m_abortOption != IgnoreError)
{
theNdbCon->theReturnStatus = NdbConnection::ReturnFailure;
}
theError.code = aSignal->readData(4);
theNdbCon->setOperationErrorCodeAbort(aSignal->readData(4), m_abortOption);
theNdbCon->setOperationErrorCodeAbort(aSignal->readData(4), ao);
if(theOperationType != ReadRequest || !theSimpleIndicator) // not simple read
return theNdbCon->OpCompleteFailure(ao, m_abortOption != IgnoreError);
......
This diff is collapsed.
......@@ -111,6 +111,14 @@ class ha_ndbcluster: public handler
byte* buf);
int read_range_next();
/**
* Multi range stuff
*/
int read_multi_range_first(key_multi_range **found_range_p,
key_multi_range *ranges, uint range_count,
bool sorted, handler_buffer *buffer);
int read_multi_range_next(void);
bool get_error_message(int error, String *buf);
void info(uint);
int extra(enum ha_extra_function operation);
......@@ -257,6 +265,10 @@ class ha_ndbcluster: public handler
uint32 m_blobs_buffer_size;
uint m_dupkey;
bool m_disable_multi_read;
byte* m_multi_range_result_ptr;
const NdbOperation* m_current_multi_operation;
void set_rec_per_key();
void records_update();
void no_uncommitted_rows_execute_failure();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment