Commit d22ab3f7 authored by joreland@mysql.com's avatar joreland@mysql.com

wl2126 ndb read_multi_range - bugfixes + more tests

parent 5d420d91
...@@ -33,18 +33,20 @@ a b c ...@@ -33,18 +33,20 @@ a b c
5 2 12 5 2 12
9 2 8 9 2 8
drop table r1; drop table r1;
create table r1 as select * from t1 where a in (33,8,12); create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1);
select * from r1 order by a; select * from r1 order by a;
a b c a b c
1 2 1
2 3 2
8 5 9 8 5 9
12 5 5 12 5 5
drop table r1; drop table r1;
select * from t1 where a in (33,34,35) order by a; create table r1 as select * from t1 where a in (33,8,12);
a b c select * from r1 order by a;
select * from t1 where a in (33,8,12) order by a;
a b c a b c
8 5 9 8 5 9
12 5 5 12 5 5
drop table r1;
create table r1 as select * from t1 where a in (2,33,8,12,34); create table r1 as select * from t1 where a in (2,33,8,12,34);
select * from r1 order by a; select * from r1 order by a;
a b c a b c
...@@ -73,6 +75,50 @@ a b c ...@@ -73,6 +75,50 @@ a b c
drop table r1; drop table r1;
select * from t1 where b in (45,22) order by a; select * from t1 where b in (45,22) order by a;
a b c a b c
create table r1 as select * from t1 where c in (2,8,33);
select * from r1 order by a;
a b c
2 3 2
9 2 8
drop table r1;
create table r1 as select * from t1 where c in (13,2,8,33,12);
select * from r1 order by a;
a b c
2 3 2
5 2 12
9 2 8
drop table r1;
select * from t1 where a in (33,8,12) order by a;
a b c
8 5 9
12 5 5
select * from t1 where a in (33,34,35) order by a;
a b c
select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a;
a b c
1 2 1
2 3 2
8 5 9
12 5 5
select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a;
a b c
1 2 1
5 2 12
9 2 8
2 3 2
6 3 11
10 3 7
3 4 3
7 4 10
11 4 6
4 5 4
8 5 9
12 5 5
select * from t1 where c in (13,2,8,33,12) order by c,a;
a b c
2 3 2
9 2 8
5 2 12
drop table t1; drop table t1;
create table t1 ( create table t1 (
a int not null, a int not null,
......
...@@ -34,12 +34,15 @@ create table r1 as select * from t1 where c in (2,8,12); ...@@ -34,12 +34,15 @@ create table r1 as select * from t1 where c in (2,8,12);
select * from r1 order by a; select * from r1 order by a;
drop table r1; drop table r1;
# batch mixed
create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1);
select * from r1 order by a;
drop table r1;
# batch on primary key, missing values # batch on primary key, missing values
create table r1 as select * from t1 where a in (33,8,12); create table r1 as select * from t1 where a in (33,8,12);
select * from r1 order by a; select * from r1 order by a;
drop table r1; drop table r1;
select * from t1 where a in (33,34,35) order by a;
select * from t1 where a in (33,8,12) order by a;
create table r1 as select * from t1 where a in (2,33,8,12,34); create table r1 as select * from t1 where a in (2,33,8,12,34);
select * from r1 order by a; select * from r1 order by a;
drop table r1; drop table r1;
...@@ -54,15 +57,19 @@ select * from r1 order by a; ...@@ -54,15 +57,19 @@ select * from r1 order by a;
drop table r1; drop table r1;
select * from t1 where b in (45,22) order by a; select * from t1 where b in (45,22) order by a;
# current bug in ndb, cannot handle missing values for unique indexes
# batch on unique hash index, missing values # batch on unique hash index, missing values
#create table r1 as select * from t1 where c in (2,8,33); create table r1 as select * from t1 where c in (2,8,33);
#select * from r1 order by a; select * from r1 order by a;
#drop table r1; drop table r1;
#create table r1 as select * from t1 where c in (13,2,8,33,12); create table r1 as select * from t1 where c in (13,2,8,33,12);
#select * from r1 order by a; select * from r1 order by a;
#drop table r1; drop table r1;
select * from t1 where a in (33,8,12) order by a;
select * from t1 where a in (33,34,35) order by a;
select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a;
select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a;
select * from t1 where c in (13,2,8,33,12) order by c,a;
drop table t1; drop table t1;
# #
......
...@@ -123,34 +123,4 @@ TcIndxConf::setMarkerFlag(Uint32 & confInfo, Uint32 flag){ ...@@ -123,34 +123,4 @@ TcIndxConf::setMarkerFlag(Uint32 & confInfo, Uint32 flag){
confInfo |= (flag << 17); confInfo |= (flag << 17);
} }
class TcIndxRef {
/**
* Reciver(s)
*/
friend class NdbIndexOperation;
/**
* Sender(s)
*/
friend class Dbtc;
/**
* For printing
*/
friend bool printTCINDXREF(FILE *, const Uint32 *, Uint32, Uint16);
public:
/**
* Length of signal
*/
public:
STATIC_CONST( SignalLength = 4 );
private:
Uint32 connectPtr;
Uint32 transId[2];
Uint32 errorCode;
};
#endif #endif
...@@ -11144,14 +11144,14 @@ void Dbtc::execTCINDXREQ(Signal* signal) ...@@ -11144,14 +11144,14 @@ void Dbtc::execTCINDXREQ(Signal* signal)
if (!seizeIndexOperation(regApiPtr, indexOpPtr)) { if (!seizeIndexOperation(regApiPtr, indexOpPtr)) {
jam(); jam();
// Failed to allocate index operation // Failed to allocate index operation
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend(); TcKeyRef * const tcIndxRef = (TcKeyRef *)signal->getDataPtrSend();
tcIndxRef->connectPtr = tcIndxReq->senderData; tcIndxRef->connectPtr = tcIndxReq->senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0]; tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1]; tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->errorCode = 4000; tcIndxRef->errorCode = 4000;
sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal, sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal,
TcIndxRef::SignalLength, JBB); TcKeyRef::SignalLength, JBB);
return; return;
} }
TcIndexOperation* indexOp = indexOpPtr.p; TcIndexOperation* indexOp = indexOpPtr.p;
...@@ -11465,14 +11465,14 @@ void Dbtc::execTCKEYCONF(Signal* signal) ...@@ -11465,14 +11465,14 @@ void Dbtc::execTCKEYCONF(Signal* signal)
case(IOS_NOOP): { case(IOS_NOOP): {
jam(); jam();
// Should never happen, abort // Should never happen, abort
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend(); TcKeyRef * const tcIndxRef = (TcKeyRef *)signal->getDataPtrSend();
tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData; tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0]; tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1]; tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->errorCode = 4349; tcIndxRef->errorCode = 4349;
sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal, sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal,
TcIndxRef::SignalLength, JBB); TcKeyRef::SignalLength, JBB);
return; return;
} }
case(IOS_INDEX_ACCESS): { case(IOS_INDEX_ACCESS): {
...@@ -11484,14 +11484,14 @@ void Dbtc::execTCKEYCONF(Signal* signal) ...@@ -11484,14 +11484,14 @@ void Dbtc::execTCKEYCONF(Signal* signal)
case(IOS_INDEX_ACCESS_WAIT_FOR_TRANSID_AI): { case(IOS_INDEX_ACCESS_WAIT_FOR_TRANSID_AI): {
jam(); jam();
// Double TCKEYCONF, should never happen, abort // Double TCKEYCONF, should never happen, abort
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend(); TcKeyRef * const tcIndxRef = (TcKeyRef *)signal->getDataPtrSend();
tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData; tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0]; tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1]; tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->errorCode = 4349; tcIndxRef->errorCode = 4349;
sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal, sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal,
TcIndxRef::SignalLength, JBB); TcKeyRef::SignalLength, JBB);
return; return;
} }
case(IOS_INDEX_ACCESS_WAIT_FOR_TCKEYCONF): { case(IOS_INDEX_ACCESS_WAIT_FOR_TCKEYCONF): {
...@@ -11578,7 +11578,7 @@ void Dbtc::execTCKEYREF(Signal* signal) ...@@ -11578,7 +11578,7 @@ void Dbtc::execTCKEYREF(Signal* signal)
jam(); jam();
TcKeyReq * const tcIndxReq = &indexOp->tcIndxReq; TcKeyReq * const tcIndxReq = &indexOp->tcIndxReq;
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend(); TcKeyRef * const tcIndxRef = (TcKeyRef *)signal->getDataPtrSend();
ndbassert(regApiPtr->noIndexOp); ndbassert(regApiPtr->noIndexOp);
regApiPtr->noIndexOp--; // Decrease count regApiPtr->noIndexOp--; // Decrease count
...@@ -11587,7 +11587,7 @@ void Dbtc::execTCKEYREF(Signal* signal) ...@@ -11587,7 +11587,7 @@ void Dbtc::execTCKEYREF(Signal* signal)
tcIndxRef->transId[1] = tcKeyRef->transId[1]; tcIndxRef->transId[1] = tcKeyRef->transId[1];
tcIndxRef->errorCode = tcKeyRef->errorCode; tcIndxRef->errorCode = tcKeyRef->errorCode;
sendSignal(regApiPtr->ndbapiBlockref, sendSignal(regApiPtr->ndbapiBlockref,
GSN_TCINDXREF, signal, TcIndxRef::SignalLength, JBB); GSN_TCINDXREF, signal, TcKeyRef::SignalLength, JBB);
return; return;
} }
} }
...@@ -11654,14 +11654,14 @@ void Dbtc::execTRANSID_AI(Signal* signal) ...@@ -11654,14 +11654,14 @@ void Dbtc::execTRANSID_AI(Signal* signal)
signal->getLength() - TransIdAI::HeaderLength)) { signal->getLength() - TransIdAI::HeaderLength)) {
jam(); jam();
// Failed to allocate space for TransIdAI // Failed to allocate space for TransIdAI
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend(); TcKeyRef * const tcIndxRef = (TcKeyRef *)signal->getDataPtrSend();
tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData; tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0]; tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1]; tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->errorCode = 4000; tcIndxRef->errorCode = 4000;
sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal, sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal,
TcIndxRef::SignalLength, JBB); TcKeyRef::SignalLength, JBB);
return; return;
} }
...@@ -11669,14 +11669,14 @@ void Dbtc::execTRANSID_AI(Signal* signal) ...@@ -11669,14 +11669,14 @@ void Dbtc::execTRANSID_AI(Signal* signal)
case(IOS_NOOP): { case(IOS_NOOP): {
jam(); jam();
// Should never happen, abort // Should never happen, abort
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend(); TcKeyRef * const tcIndxRef = (TcKeyRef *)signal->getDataPtrSend();
tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData; tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0]; tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1]; tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->errorCode = 4349; tcIndxRef->errorCode = 4349;
sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal, sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal,
TcIndxRef::SignalLength, JBB); TcKeyRef::SignalLength, JBB);
return; return;
break; break;
} }
...@@ -11697,14 +11697,14 @@ void Dbtc::execTRANSID_AI(Signal* signal) ...@@ -11697,14 +11697,14 @@ void Dbtc::execTRANSID_AI(Signal* signal)
#endif #endif
/* /*
// Too many TRANSID_AI // Too many TRANSID_AI
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend(); TcKeyRef * const tcIndxRef = (TcKeyRef *)signal->getDataPtrSend();
tcIndexRef->connectPtr = indexOp->tcIndxReq.senderData; tcIndexRef->connectPtr = indexOp->tcIndxReq.senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0]; tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1]; tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->errorCode = 4349; tcIndxRef->errorCode = 4349;
sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal, sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal,
TcIndxRef::SignalLength, JBB); TcKeyRef::SignalLength, JBB);
*/ */
break; break;
} }
...@@ -11722,14 +11722,14 @@ void Dbtc::execTRANSID_AI(Signal* signal) ...@@ -11722,14 +11722,14 @@ void Dbtc::execTRANSID_AI(Signal* signal)
case(IOS_INDEX_OPERATION): { case(IOS_INDEX_OPERATION): {
// Should never receive TRANSID_AI in this state!! // Should never receive TRANSID_AI in this state!!
jam(); jam();
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend(); TcKeyRef * const tcIndxRef = (TcKeyRef *)signal->getDataPtrSend();
tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData; tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0]; tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1]; tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->errorCode = 4349; tcIndxRef->errorCode = 4349;
sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal, sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal,
TcIndxRef::SignalLength, JBB); TcKeyRef::SignalLength, JBB);
return; return;
} }
} }
...@@ -11775,14 +11775,14 @@ void Dbtc::readIndexTable(Signal* signal, ...@@ -11775,14 +11775,14 @@ void Dbtc::readIndexTable(Signal* signal,
if ((indexData = c_theIndexes.getPtr(indexOp->tcIndxReq.tableId)) == NULL) { if ((indexData = c_theIndexes.getPtr(indexOp->tcIndxReq.tableId)) == NULL) {
jam(); jam();
// Failed to find index record // Failed to find index record
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend(); TcKeyRef * const tcIndxRef = (TcKeyRef *)signal->getDataPtrSend();
tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData; tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0]; tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1]; tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->errorCode = 4000; tcIndxRef->errorCode = 4000;
sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal, sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal,
TcIndxRef::SignalLength, JBB); TcKeyRef::SignalLength, JBB);
return; return;
} }
tcKeyReq->transId1 = transId1; tcKeyReq->transId1 = transId1;
...@@ -11895,14 +11895,14 @@ void Dbtc::executeIndexOperation(Signal* signal, ...@@ -11895,14 +11895,14 @@ void Dbtc::executeIndexOperation(Signal* signal,
if ((indexData = c_theIndexes.getPtr(tcIndxReq->tableId)) == NULL) { if ((indexData = c_theIndexes.getPtr(tcIndxReq->tableId)) == NULL) {
jam(); jam();
// Failed to find index record // Failed to find index record
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend(); TcKeyRef * const tcIndxRef = (TcKeyRef *)signal->getDataPtrSend();
tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData; tcIndxRef->connectPtr = indexOp->tcIndxReq.senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0]; tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1]; tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->errorCode = 4349; tcIndxRef->errorCode = 4349;
sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal, sendSignal(regApiPtr->ndbapiBlockref, GSN_TCINDXREF, signal,
TcIndxRef::SignalLength, JBB); TcKeyRef::SignalLength, JBB);
return; return;
} }
// Find schema version of primary table // Find schema version of primary table
......
...@@ -411,17 +411,5 @@ Remark: Handles the reception of the TCKEYREF signal. ...@@ -411,17 +411,5 @@ Remark: Handles the reception of the TCKEYREF signal.
int int
NdbIndexOperation::receiveTCINDXREF( NdbApiSignal* aSignal) NdbIndexOperation::receiveTCINDXREF( NdbApiSignal* aSignal)
{ {
const TcIndxRef * const tcIndxRef = CAST_CONSTPTR(TcIndxRef, aSignal->getDataPtr()); return NdbOperation::receiveTCKEYREF(aSignal);
if (checkState_TransId(aSignal) == -1) {
return -1;
}//if
theStatus = Finished;
theNdbCon->theReturnStatus = NdbConnection::ReturnFailure;
Uint32 errorCode = tcIndxRef->errorCode;
theError.code = errorCode;
theNdbCon->setOperationErrorCodeAbort(errorCode);
return theNdbCon->OpCompleteFailure(theNdbCon->m_abortOption);
}//NdbIndexOperation::receiveTCINDXREF() }//NdbIndexOperation::receiveTCINDXREF()
...@@ -3306,7 +3306,7 @@ static int create_ndb_column(NDBCOL &col, ...@@ -3306,7 +3306,7 @@ static int create_ndb_column(NDBCOL &col,
col.setPartSize(0); col.setPartSize(0);
col.setStripeSize(0); col.setStripeSize(0);
break; break;
mysql_type_blob: //mysql_type_blob:
case MYSQL_TYPE_BLOB: case MYSQL_TYPE_BLOB:
if (field->flags & BINARY_FLAG) if (field->flags & BINARY_FLAG)
col.setType(NDBCOL::Blob); col.setType(NDBCOL::Blob);
...@@ -4788,11 +4788,12 @@ ha_ndbcluster::read_multi_range_first(key_multi_range **found_range_p, ...@@ -4788,11 +4788,12 @@ ha_ndbcluster::read_multi_range_first(key_multi_range **found_range_p,
case ORDERED_INDEX: case ORDERED_INDEX:
range: range:
ranges[i].range_flag &= ~(uint)UNIQUE_RANGE; ranges[i].range_flag &= ~(uint)UNIQUE_RANGE;
if (sorted && scanOp != 0 && curr != buffer->buffer) if (sorted && scanOp != 0)
{ {
/** /**
* We currently don't support batching of ordered range scans * We currently don't support batching of ordered range scans
*/ */
i--;
curr= (byte*)buffer->buffer_end; curr= (byte*)buffer->buffer_end;
break; break;
} }
...@@ -4865,12 +4866,47 @@ ha_ndbcluster::read_multi_range_next(key_multi_range ** multi_range_found_p) ...@@ -4865,12 +4866,47 @@ ha_ndbcluster::read_multi_range_next(key_multi_range ** multi_range_found_p)
} }
else if(m_active_cursor) else if(m_active_cursor)
{ {
if(m_active_cursor->nextResult()) int check;
goto found; bool contact_ndb= m_lock.type < TL_WRITE_ALLOW_WRITE;
do {
check= m_active_cursor->nextResult(contact_ndb, m_force_send);
if (check == 0)
goto found;
else if (check == 1 || check == 2)
{
// 1: No more records
// 2: No more cached records
/*
Before fetching more rows and releasing lock(s),
all pending update or delete operations should
be sent to NDB
*/
DBUG_PRINT("info", ("ops_pending: %d", m_ops_pending));
if (m_ops_pending)
{
// if (current_thd->transaction.on)
if (m_transaction_on)
{
if (execute_no_commit(this, m_active_trans) != 0)
DBUG_RETURN(ndb_err(m_active_trans));
}
else
{
if (execute_commit(this, m_active_trans) != 0)
DBUG_RETURN(ndb_err(m_active_trans));
int res= m_active_trans->restart();
DBUG_ASSERT(res == 0);
}
m_ops_pending= 0;
}
contact_ndb= (check == 2);
}
} while (check == 2);
multi_range_curr++; multi_range_curr++;
m_multi_range_result_ptr += reclength; m_multi_range_result_ptr += reclength;
m_active_cursor->close(); m_active_cursor->close();
m_active_cursor= 0; m_active_cursor= 0;
} }
...@@ -4893,17 +4929,23 @@ ha_ndbcluster::read_multi_range_next(key_multi_range ** multi_range_found_p) ...@@ -4893,17 +4929,23 @@ ha_ndbcluster::read_multi_range_next(key_multi_range ** multi_range_found_p)
multi_range_sorted, multi_range_sorted,
multi_range_buffer)); multi_range_buffer));
found_next:
multi_range_curr++;
op= m_active_trans->getNextCompletedOperation(op);
m_multi_range_result_ptr += reclength;
found: found:
* multi_range_found_p= multi_ranges + multi_range_curr; * multi_range_found_p= multi_ranges + multi_range_curr;
memcpy(table->record[0], m_multi_range_result_ptr, reclength); memcpy(table->record[0], m_multi_range_result_ptr, reclength);
unpack_record(table->record[0]); unpack_record(table->record[0]);
table->status= 0; table->status= 0;
DBUG_RETURN(0); DBUG_RETURN(0);
found_next:
* multi_range_found_p= multi_ranges + multi_range_curr;
memcpy(table->record[0], m_multi_range_result_ptr, reclength);
unpack_record(table->record[0]);
table->status= 0;
multi_range_curr++;
op= m_active_trans->getNextCompletedOperation(op);
m_multi_range_result_ptr += reclength;
DBUG_RETURN(0);
} }
#endif /* HAVE_NDBCLUSTER_DB */ #endif /* HAVE_NDBCLUSTER_DB */
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