Commit 04bb3a62 authored by joreland@mysql.com's avatar joreland@mysql.com

Merge joreland@build:/home/bk/mysql-5.0-ndb

into mysql.com:/home/jonas/src/mysql-5.0-ndb
parents 33a9e15e 8bd3e9ad
...@@ -51,11 +51,9 @@ private: ...@@ -51,11 +51,9 @@ private:
* Previously there where also a scan type * Previously there where also a scan type
*/ */
static Uint32 getLockMode(const Uint32 & requestInfo); static Uint32 getLockMode(const Uint32 & requestInfo);
static Uint32 getKeyinfoFlag(const Uint32 & requestInfo);
static Uint32 getReadCommittedFlag(const Uint32 & requestInfo); static Uint32 getReadCommittedFlag(const Uint32 & requestInfo);
static void setLockMode(Uint32 & requestInfo, Uint32 lockMode); static void setLockMode(Uint32 & requestInfo, Uint32 lockMode);
static void setKeyinfoFlag(Uint32 & requestInfo, Uint32 keyinfo);
static void setReadCommittedFlag(Uint32 & requestInfo, Uint32 readCommitted); static void setReadCommittedFlag(Uint32 & requestInfo, Uint32 readCommitted);
}; };
...@@ -63,17 +61,14 @@ private: ...@@ -63,17 +61,14 @@ private:
* Request Info * Request Info
* *
* l = Lock Mode - 1 Bit 2 * l = Lock Mode - 1 Bit 2
* k = Keyinfo - 1 Bit 4
* h = Read Committed - 1 Bit 5 * h = Read Committed - 1 Bit 5
* *
* 1111111111222222222233 * 1111111111222222222233
* 01234567890123456789012345678901 * 01234567890123456789012345678901
* l kh * l h
*/ */
#define AS_LOCK_MODE_SHIFT (2) #define AS_LOCK_MODE_SHIFT (2)
#define AS_LOCK_MODE_MASK (1) #define AS_LOCK_MODE_MASK (1)
#define AS_KEYINFO_SHIFT (4)
#define AS_READ_COMMITTED_SHIFT (5) #define AS_READ_COMMITTED_SHIFT (5)
inline inline
...@@ -82,12 +77,6 @@ AccScanReq::getLockMode(const Uint32 & requestInfo){ ...@@ -82,12 +77,6 @@ AccScanReq::getLockMode(const Uint32 & requestInfo){
return (requestInfo >> AS_LOCK_MODE_SHIFT) & AS_LOCK_MODE_MASK; return (requestInfo >> AS_LOCK_MODE_SHIFT) & AS_LOCK_MODE_MASK;
} }
inline
Uint32
AccScanReq::getKeyinfoFlag(const Uint32 & requestInfo){
return (requestInfo >> AS_KEYINFO_SHIFT) & 1;
}
inline inline
Uint32 Uint32
AccScanReq::getReadCommittedFlag(const Uint32 & requestInfo){ AccScanReq::getReadCommittedFlag(const Uint32 & requestInfo){
...@@ -101,13 +90,6 @@ AccScanReq::setLockMode(UintR & requestInfo, UintR val){ ...@@ -101,13 +90,6 @@ AccScanReq::setLockMode(UintR & requestInfo, UintR val){
requestInfo |= (val << AS_LOCK_MODE_SHIFT); requestInfo |= (val << AS_LOCK_MODE_SHIFT);
} }
inline
void
AccScanReq::setKeyinfoFlag(UintR & requestInfo, UintR val){
ASSERT_BOOL(val, "AccScanReq::setKeyinfoFlag");
requestInfo |= (val << AS_KEYINFO_SHIFT);
}
inline inline
void void
AccScanReq::setReadCommittedFlag(UintR & requestInfo, UintR val){ AccScanReq::setReadCommittedFlag(UintR & requestInfo, UintR val){
......
...@@ -50,6 +50,8 @@ private: ...@@ -50,6 +50,8 @@ private:
* Number of words of bound info included after fixed signal data. * Number of words of bound info included after fixed signal data.
*/ */
Uint32 boundAiLength; Uint32 boundAiLength;
Uint32 data[1];
}; };
#endif #endif
...@@ -114,6 +114,12 @@ public: ...@@ -114,6 +114,12 @@ public:
* sent on next execute * sent on next execute
*/ */
int reset_bounds(); int reset_bounds();
/**
* Set new bound on operation,
* used when batching index reads
*/
int set_new_bound();
bool getSorted() const { return m_ordered; } bool getSorted() const { return m_ordered; }
private: private:
...@@ -132,6 +138,9 @@ private: ...@@ -132,6 +138,9 @@ private:
int compare(Uint32 key, Uint32 cols, const NdbReceiver*, const NdbReceiver*); int compare(Uint32 key, Uint32 cols, const NdbReceiver*, const NdbReceiver*);
Uint32 m_sort_columns; Uint32 m_sort_columns;
Uint32 m_this_bound_start;
Uint32 * m_first_bound_word;
}; };
#endif #endif
...@@ -8949,7 +8949,6 @@ void Dbacc::execACC_SCANREQ(Signal* signal) ...@@ -8949,7 +8949,6 @@ void Dbacc::execACC_SCANREQ(Signal* signal)
rootfragrecptr.p->scan[i] = scanPtr.i; rootfragrecptr.p->scan[i] = scanPtr.i;
scanPtr.p->scanBucketState = ScanRec::FIRST_LAP; scanPtr.p->scanBucketState = ScanRec::FIRST_LAP;
scanPtr.p->scanLockMode = AccScanReq::getLockMode(tscanFlag); scanPtr.p->scanLockMode = AccScanReq::getLockMode(tscanFlag);
scanPtr.p->scanKeyinfoFlag = AccScanReq::getKeyinfoFlag(tscanFlag);
scanPtr.p->scanReadCommittedFlag = AccScanReq::getReadCommittedFlag(tscanFlag); scanPtr.p->scanReadCommittedFlag = AccScanReq::getReadCommittedFlag(tscanFlag);
/* TWELVE BITS OF THE ELEMENT HEAD ARE SCAN */ /* TWELVE BITS OF THE ELEMENT HEAD ARE SCAN */
...@@ -10083,53 +10082,19 @@ void Dbacc::sendNextScanConf(Signal* signal) ...@@ -10083,53 +10082,19 @@ void Dbacc::sendNextScanConf(Signal* signal)
{ {
scanPtr.p->scanTimer = scanPtr.p->scanContinuebCounter; scanPtr.p->scanTimer = scanPtr.p->scanContinuebCounter;
Uint32 blockNo = refToBlock(scanPtr.p->scanUserblockref); Uint32 blockNo = refToBlock(scanPtr.p->scanUserblockref);
if (!scanPtr.p->scanKeyinfoFlag){ jam();
jam(); /** ---------------------------------------------------------------------
/** --------------------------------------------------------------------- * LQH WILL NOT HAVE ANY USE OF THE TUPLE KEY LENGTH IN THIS CASE AND
* LQH WILL NOT HAVE ANY USE OF THE TUPLE KEY LENGTH IN THIS CASE AND * SO WE DO NOT PROVIDE IT. IN THIS CASE THESE VALUES ARE UNDEFINED.
* SO WE DO NOT PROVIDE IT. IN THIS CASE THESE VALUES ARE UNDEFINED. * ---------------------------------------------------------------------- */
* ---------------------------------------------------------------------- */
signal->theData[0] = scanPtr.p->scanUserptr;
signal->theData[1] = operationRecPtr.i;
signal->theData[2] = operationRecPtr.p->fid;
signal->theData[3] = operationRecPtr.p->localdata[0];
signal->theData[4] = operationRecPtr.p->localdata[1];
signal->theData[5] = fragrecptr.p->localkeylen;
EXECUTE_DIRECT(blockNo, GSN_NEXT_SCANCONF, signal, 6);
return;
}//if
fragrecptr.i = operationRecPtr.p->fragptr;
ptrCheckGuard(fragrecptr, cfragmentsize, fragmentrec);
readTablePk(operationRecPtr.p->localdata[0]);
signal->theData[0] = scanPtr.p->scanUserptr; signal->theData[0] = scanPtr.p->scanUserptr;
signal->theData[1] = operationRecPtr.i; signal->theData[1] = operationRecPtr.i;
signal->theData[2] = operationRecPtr.p->fid; signal->theData[2] = operationRecPtr.p->fid;
signal->theData[3] = operationRecPtr.p->localdata[0]; signal->theData[3] = operationRecPtr.p->localdata[0];
signal->theData[4] = operationRecPtr.p->localdata[1]; signal->theData[4] = operationRecPtr.p->localdata[1];
signal->theData[5] = fragrecptr.p->localkeylen; signal->theData[5] = fragrecptr.p->localkeylen;
signal->theData[6] = fragrecptr.p->keyLength; EXECUTE_DIRECT(blockNo, GSN_NEXT_SCANCONF, signal, 6);
signal->theData[7] = ckeys[0]; return;
signal->theData[8] = ckeys[1];
signal->theData[9] = ckeys[2];
signal->theData[10] = ckeys[3];
EXECUTE_DIRECT(blockNo, GSN_NEXT_SCANCONF, signal, 11);
const Uint32 keyLength = fragrecptr.p->keyLength;
Uint32 total = 4;
while (total < keyLength) {
jam();
Uint32 length = keyLength - total;
if (length > 20)
length = 20;
signal->theData[0] = scanPtr.p->scanUserptr;
signal->theData[1] = operationRecPtr.i; // not used by LQH
signal->theData[2] = operationRecPtr.p->fid; // not used by LQH
signal->theData[3] = length;
memcpy(&signal->theData[4], &ckeys[total], length << 2);
EXECUTE_DIRECT(blockNo, GSN_ACC_SCAN_INFO24, signal, 4 + length);
// wl-2066 remove GSN_ACC_SCAN_INFO
total += length;
}//if
}//Dbacc::sendNextScanConf() }//Dbacc::sendNextScanConf()
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
...@@ -11233,13 +11198,12 @@ Dbacc::execDUMP_STATE_ORD(Signal* signal) ...@@ -11233,13 +11198,12 @@ Dbacc::execDUMP_STATE_ORD(Signal* signal)
scanPtr.p->minBucketIndexToRescan, scanPtr.p->minBucketIndexToRescan,
scanPtr.p->maxBucketIndexToRescan); scanPtr.p->maxBucketIndexToRescan);
infoEvent(" scanBucketState=%d, scanLockHeld=%d, userBlockRef=%d, " infoEvent(" scanBucketState=%d, scanLockHeld=%d, userBlockRef=%d, "
"scanMask=%d scanLockMode=%d, keyInfoFlag=%d", "scanMask=%d scanLockMode=%d",
scanPtr.p->scanBucketState, scanPtr.p->scanBucketState,
scanPtr.p->scanLockHeld, scanPtr.p->scanLockHeld,
scanPtr.p->scanUserblockref, scanPtr.p->scanUserblockref,
scanPtr.p->scanMask, scanPtr.p->scanMask,
scanPtr.p->scanLockMode, scanPtr.p->scanLockMode);
scanPtr.p->scanKeyinfoFlag);
return; return;
} }
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
#include <signaldata/LqhTransConf.hpp> #include <signaldata/LqhTransConf.hpp>
#include <signaldata/LqhFrag.hpp> #include <signaldata/LqhFrag.hpp>
// primary key is stored in TUP
#include <../dbtup/Dbtup.hpp>
#ifdef DBLQH_C #ifdef DBLQH_C
// Constants // Constants
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
...@@ -500,9 +503,7 @@ public: ...@@ -500,9 +503,7 @@ public:
WAIT_DELETE_STORED_PROC_ID_COPY = 6, WAIT_DELETE_STORED_PROC_ID_COPY = 6,
WAIT_ACC_COPY = 7, WAIT_ACC_COPY = 7,
WAIT_ACC_SCAN = 8, WAIT_ACC_SCAN = 8,
WAIT_SCAN_KEYINFO = 9,
WAIT_SCAN_NEXTREQ = 10, WAIT_SCAN_NEXTREQ = 10,
WAIT_COPY_KEYINFO = 11,
WAIT_CLOSE_SCAN = 12, WAIT_CLOSE_SCAN = 12,
WAIT_CLOSE_COPY = 13, WAIT_CLOSE_COPY = 13,
WAIT_RELEASE_LOCK = 14, WAIT_RELEASE_LOCK = 14,
...@@ -2025,6 +2026,7 @@ public: ...@@ -2025,6 +2026,7 @@ public:
Uint8 opExec; Uint8 opExec;
Uint8 operation; Uint8 operation;
Uint8 reclenAiLqhkey; Uint8 reclenAiLqhkey;
Uint8 m_offset_current_keybuf;
Uint8 replicaType; Uint8 replicaType;
Uint8 simpleRead; Uint8 simpleRead;
Uint8 seqNoReplica; Uint8 seqNoReplica;
...@@ -2128,8 +2130,6 @@ private: ...@@ -2128,8 +2130,6 @@ private:
void execACC_SCANREF(Signal* signal); void execACC_SCANREF(Signal* signal);
void execNEXT_SCANCONF(Signal* signal); void execNEXT_SCANCONF(Signal* signal);
void execNEXT_SCANREF(Signal* signal); void execNEXT_SCANREF(Signal* signal);
void execACC_SCAN_INFO(Signal* signal);
void execACC_SCAN_INFO24(Signal* signal);
void execACC_TO_REF(Signal* signal); void execACC_TO_REF(Signal* signal);
void execSTORED_PROCCONF(Signal* signal); void execSTORED_PROCCONF(Signal* signal);
void execSTORED_PROCREF(Signal* signal); void execSTORED_PROCREF(Signal* signal);
...@@ -2250,7 +2250,7 @@ private: ...@@ -2250,7 +2250,7 @@ private:
void finishScanrec(Signal* signal); void finishScanrec(Signal* signal);
void releaseScanrec(Signal* signal); void releaseScanrec(Signal* signal);
void seizeScanrec(Signal* signal); void seizeScanrec(Signal* signal);
void sendKeyinfo20(Signal* signal, ScanRecord *, TcConnectionrec *); Uint32 sendKeyinfo20(Signal* signal, ScanRecord *, TcConnectionrec *);
void sendScanFragConf(Signal* signal, Uint32 scanCompleted); void sendScanFragConf(Signal* signal, Uint32 scanCompleted);
void initCopyrec(Signal* signal); void initCopyrec(Signal* signal);
void initCopyTc(Signal* signal); void initCopyTc(Signal* signal);
...@@ -2379,6 +2379,8 @@ private: ...@@ -2379,6 +2379,8 @@ private:
void seizeAttrinbuf(Signal* signal); void seizeAttrinbuf(Signal* signal);
Uint32 seize_attrinbuf(); Uint32 seize_attrinbuf();
Uint32 release_attrinbuf(Uint32); Uint32 release_attrinbuf(Uint32);
Uint32 copy_bounds(Uint32 * dst, TcConnectionrec*);
void seizeFragmentrec(Signal* signal); void seizeFragmentrec(Signal* signal);
void seizePageRef(Signal* signal); void seizePageRef(Signal* signal);
void seizeTcrec(); void seizeTcrec();
...@@ -2425,7 +2427,6 @@ private: ...@@ -2425,7 +2427,6 @@ private:
void localCommitLab(Signal* signal); void localCommitLab(Signal* signal);
void abortErrorLab(Signal* signal); void abortErrorLab(Signal* signal);
void continueAfterReceivingAllAiLab(Signal* signal); void continueAfterReceivingAllAiLab(Signal* signal);
void sendScanFragRefLateLab(Signal* signal);
void abortStateHandlerLab(Signal* signal); void abortStateHandlerLab(Signal* signal);
void writeAttrinfoLab(Signal* signal); void writeAttrinfoLab(Signal* signal);
void scanAttrinfoLab(Signal* signal, Uint32* dataPtr, Uint32 length); void scanAttrinfoLab(Signal* signal, Uint32* dataPtr, Uint32 length);
...@@ -2492,7 +2493,7 @@ private: ...@@ -2492,7 +2493,7 @@ private:
void nextScanConfScanLab(Signal* signal); void nextScanConfScanLab(Signal* signal);
void nextScanConfCopyLab(Signal* signal); void nextScanConfCopyLab(Signal* signal);
void continueScanNextReqLab(Signal* signal); void continueScanNextReqLab(Signal* signal);
bool keyinfoLab(Signal* signal, Uint32* dataPtr, Uint32 length); void keyinfoLab(const Uint32 * src, const Uint32 * end);
void copySendTupkeyReqLab(Signal* signal); void copySendTupkeyReqLab(Signal* signal);
void storedProcConfScanLab(Signal* signal); void storedProcConfScanLab(Signal* signal);
void storedProcConfCopyLab(Signal* signal); void storedProcConfCopyLab(Signal* signal);
...@@ -2548,7 +2549,6 @@ private: ...@@ -2548,7 +2549,6 @@ private:
void accScanConfScanLab(Signal* signal); void accScanConfScanLab(Signal* signal);
void accScanConfCopyLab(Signal* signal); void accScanConfCopyLab(Signal* signal);
void scanLockReleasedLab(Signal* signal); void scanLockReleasedLab(Signal* signal);
void accScanInfoEnterLab(Signal* signal, Uint32* dataPtr, Uint32 length);
void openSrFourthNextLab(Signal* signal); void openSrFourthNextLab(Signal* signal);
void closingInitLab(Signal* signal); void closingInitLab(Signal* signal);
void closeExecSrCompletedLab(Signal* signal); void closeExecSrCompletedLab(Signal* signal);
...@@ -2563,6 +2563,8 @@ private: ...@@ -2563,6 +2563,8 @@ private:
void initData(); void initData();
void initRecords(); void initRecords();
Dbtup* c_tup;
Uint32 readPrimaryKeys(ScanRecord*, TcConnectionrec*, Uint32 * dst);
// ---------------------------------------------------------------- // ----------------------------------------------------------------
// These are variables handling the records. For most records one // These are variables handling the records. For most records one
// pointer to the array of structs, one pointer-struct, a file size // pointer to the array of structs, one pointer-struct, a file size
......
...@@ -274,8 +274,6 @@ Dblqh::Dblqh(const class Configuration & conf): ...@@ -274,8 +274,6 @@ Dblqh::Dblqh(const class Configuration & conf):
addRecSignal(GSN_ACC_SCANREF, &Dblqh::execACC_SCANREF); addRecSignal(GSN_ACC_SCANREF, &Dblqh::execACC_SCANREF);
addRecSignal(GSN_NEXT_SCANCONF, &Dblqh::execNEXT_SCANCONF); addRecSignal(GSN_NEXT_SCANCONF, &Dblqh::execNEXT_SCANCONF);
addRecSignal(GSN_NEXT_SCANREF, &Dblqh::execNEXT_SCANREF); addRecSignal(GSN_NEXT_SCANREF, &Dblqh::execNEXT_SCANREF);
addRecSignal(GSN_ACC_SCAN_INFO, &Dblqh::execACC_SCAN_INFO);
addRecSignal(GSN_ACC_SCAN_INFO24, &Dblqh::execACC_SCAN_INFO24);
addRecSignal(GSN_STORED_PROCCONF, &Dblqh::execSTORED_PROCCONF); addRecSignal(GSN_STORED_PROCCONF, &Dblqh::execSTORED_PROCCONF);
addRecSignal(GSN_STORED_PROCREF, &Dblqh::execSTORED_PROCREF); addRecSignal(GSN_STORED_PROCREF, &Dblqh::execSTORED_PROCREF);
addRecSignal(GSN_COPY_FRAGREQ, &Dblqh::execCOPY_FRAGREQ); addRecSignal(GSN_COPY_FRAGREQ, &Dblqh::execCOPY_FRAGREQ);
......
This diff is collapsed.
...@@ -406,7 +406,6 @@ private: ...@@ -406,7 +406,6 @@ private:
Uint32 m_accLockOp; Uint32 m_accLockOp;
Uint8 m_readCommitted; // no locking Uint8 m_readCommitted; // no locking
Uint8 m_lockMode; Uint8 m_lockMode;
Uint8 m_keyInfo;
ScanBound m_boundMin; ScanBound m_boundMin;
ScanBound m_boundMax; ScanBound m_boundMax;
ScanBound* m_bound[2]; // pointers to above 2 ScanBound* m_bound[2]; // pointers to above 2
...@@ -1030,7 +1029,6 @@ Dbtux::ScanOp::ScanOp(ScanBoundPool& scanBoundPool) : ...@@ -1030,7 +1029,6 @@ Dbtux::ScanOp::ScanOp(ScanBoundPool& scanBoundPool) :
m_accLockOp(RNIL), m_accLockOp(RNIL),
m_readCommitted(0), m_readCommitted(0),
m_lockMode(0), m_lockMode(0),
m_keyInfo(0),
m_boundMin(scanBoundPool), m_boundMin(scanBoundPool),
m_boundMax(scanBoundPool), m_boundMax(scanBoundPool),
m_scanPos(), m_scanPos(),
......
...@@ -347,7 +347,6 @@ operator<<(NdbOut& out, const Dbtux::ScanOp& scan) ...@@ -347,7 +347,6 @@ operator<<(NdbOut& out, const Dbtux::ScanOp& scan)
out << "]"; out << "]";
out << " [readCommitted " << dec << scan.m_readCommitted << "]"; out << " [readCommitted " << dec << scan.m_readCommitted << "]";
out << " [lockMode " << dec << scan.m_lockMode << "]"; out << " [lockMode " << dec << scan.m_lockMode << "]";
out << " [keyInfo " << dec << scan.m_keyInfo << "]";
out << " [pos " << scan.m_scanPos << "]"; out << " [pos " << scan.m_scanPos << "]";
out << " [ent " << scan.m_scanEnt << "]"; out << " [ent " << scan.m_scanEnt << "]";
for (unsigned i = 0; i <= 1; i++) { for (unsigned i = 0; i <= 1; i++) {
......
...@@ -73,7 +73,6 @@ Dbtux::execACC_SCANREQ(Signal* signal) ...@@ -73,7 +73,6 @@ Dbtux::execACC_SCANREQ(Signal* signal)
scanPtr.p->m_savePointId = req->savePointId; scanPtr.p->m_savePointId = req->savePointId;
scanPtr.p->m_readCommitted = AccScanReq::getReadCommittedFlag(req->requestInfo); scanPtr.p->m_readCommitted = AccScanReq::getReadCommittedFlag(req->requestInfo);
scanPtr.p->m_lockMode = AccScanReq::getLockMode(req->requestInfo); scanPtr.p->m_lockMode = AccScanReq::getLockMode(req->requestInfo);
scanPtr.p->m_keyInfo = AccScanReq::getKeyinfoFlag(req->requestInfo);
#ifdef VM_TRACE #ifdef VM_TRACE
if (debugFlags & DebugScan) { if (debugFlags & DebugScan) {
debugOut << "Seize scan " << scanPtr.i << " " << *scanPtr.p << endl; debugOut << "Seize scan " << scanPtr.i << " " << *scanPtr.p << endl;
...@@ -473,13 +472,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) ...@@ -473,13 +472,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal)
jam(); jam();
// read keys if not already done (uses signal) // read keys if not already done (uses signal)
const TreeEnt ent = scan.m_scanEnt; const TreeEnt ent = scan.m_scanEnt;
if (scan.m_keyInfo) {
jam();
if (pkSize == 0) {
jam();
readTablePk(frag, ent, pkData, pkSize);
}
}
// conf signal // conf signal
NextScanConf* const conf = (NextScanConf*)signal->getDataPtrSend(); NextScanConf* const conf = (NextScanConf*)signal->getDataPtrSend();
conf->scanPtr = scan.m_userPtr; conf->scanPtr = scan.m_userPtr;
...@@ -501,15 +493,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) ...@@ -501,15 +493,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal)
conf->localKeyLength = 1; conf->localKeyLength = 1;
unsigned signalLength = 6; unsigned signalLength = 6;
// add key info // add key info
if (scan.m_keyInfo) {
jam();
conf->keyLength = pkSize;
// piggy-back first 4 words of key data
for (unsigned i = 0; i < 4; i++) {
conf->key[i] = i < pkSize ? pkData[i] : 0;
}
signalLength = 11;
}
if (! scan.m_readCommitted) { if (! scan.m_readCommitted) {
sendSignal(scan.m_userRef, GSN_NEXT_SCANCONF, sendSignal(scan.m_userRef, GSN_NEXT_SCANCONF,
signal, signalLength, JBB); signal, signalLength, JBB);
...@@ -517,24 +500,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) ...@@ -517,24 +500,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal)
Uint32 blockNo = refToBlock(scan.m_userRef); Uint32 blockNo = refToBlock(scan.m_userRef);
EXECUTE_DIRECT(blockNo, GSN_NEXT_SCANCONF, signal, signalLength); EXECUTE_DIRECT(blockNo, GSN_NEXT_SCANCONF, signal, signalLength);
} }
// send rest of key data
if (scan.m_keyInfo && pkSize > 4) {
unsigned total = 4;
while (total < pkSize) {
jam();
unsigned length = pkSize - total;
if (length > 20)
length = 20;
signal->theData[0] = scan.m_userPtr;
signal->theData[1] = 0;
signal->theData[2] = 0;
signal->theData[3] = length;
memcpy(&signal->theData[4], &pkData[total], length << 2);
sendSignal(scan.m_userRef, GSN_ACC_SCAN_INFO24,
signal, 4 + length, JBB);
total += length;
}
}
// next time look for next entry // next time look for next entry
scan.m_state = ScanOp::Next; scan.m_state = ScanOp::Next;
return; return;
......
...@@ -129,7 +129,6 @@ NdbResultSet* NdbScanOperation::readTuples(NdbScanOperation::LockMode lm, ...@@ -129,7 +129,6 @@ NdbResultSet* NdbScanOperation::readTuples(NdbScanOperation::LockMode lm,
Uint32 parallel) Uint32 parallel)
{ {
m_ordered = 0; m_ordered = 0;
Uint32 fragCount = m_currentTable->m_fragmentCount; Uint32 fragCount = m_currentTable->m_fragmentCount;
if (parallel > fragCount || parallel == 0) { if (parallel > fragCount || parallel == 0) {
...@@ -232,7 +231,7 @@ NdbResultSet* NdbScanOperation::readTuples(NdbScanOperation::LockMode lm, ...@@ -232,7 +231,7 @@ NdbResultSet* NdbScanOperation::readTuples(NdbScanOperation::LockMode lm,
tSignal->setSignal(GSN_KEYINFO); tSignal->setSignal(GSN_KEYINFO);
theKEYINFOptr = ((KeyInfo*)tSignal->getDataPtrSend())->keyData; theKEYINFOptr = ((KeyInfo*)tSignal->getDataPtrSend())->keyData;
theTotalNrOfKeyWordInSignal= 0; theTotalNrOfKeyWordInSignal= 0;
getFirstATTRINFOScan(); getFirstATTRINFOScan();
return getResultSet(); return getResultSet();
} }
...@@ -1205,6 +1204,9 @@ NdbIndexScanOperation::readTuples(LockMode lm, ...@@ -1205,6 +1204,9 @@ NdbIndexScanOperation::readTuples(LockMode lm,
#endif #endif
} }
} }
m_this_bound_start = 0;
m_first_bound_word = theKEYINFOptr;
return rs; return rs;
} }
...@@ -1573,7 +1575,8 @@ NdbScanOperation::restart() ...@@ -1573,7 +1575,8 @@ NdbScanOperation::restart()
} }
int int
NdbIndexScanOperation::reset_bounds(){ NdbIndexScanOperation::reset_bounds()
{
int res; int res;
{ {
...@@ -1593,6 +1596,8 @@ NdbIndexScanOperation::reset_bounds(){ ...@@ -1593,6 +1596,8 @@ NdbIndexScanOperation::reset_bounds(){
theTotalNrOfKeyWordInSignal = 0; theTotalNrOfKeyWordInSignal = 0;
theNoOfTupKeyLeft = m_accessTable->m_noOfDistributionKeys; theNoOfTupKeyLeft = m_accessTable->m_noOfDistributionKeys;
theDistrKeyIndicator_ = 0; theDistrKeyIndicator_ = 0;
m_this_bound_start = 0;
m_first_bound_word = theKEYINFOptr;
m_transConnection m_transConnection
->remove_list((NdbOperation*&)m_transConnection->m_firstExecutedScanOp, ->remove_list((NdbOperation*&)m_transConnection->m_firstExecutedScanOp,
this); this);
...@@ -1601,3 +1606,14 @@ NdbIndexScanOperation::reset_bounds(){ ...@@ -1601,3 +1606,14 @@ NdbIndexScanOperation::reset_bounds(){
} }
return res; return res;
} }
int
NdbIndexScanOperation::set_new_bound()
{
Uint32 bound_head = * m_first_bound_word;
bound_head |= (theTupKeyLen - m_this_bound_start) << 16;
* m_first_bound_word = bound_head;
m_first_bound_word = theKEYINFOptr;
m_this_bound_start = theTupKeyLen;
}
...@@ -222,6 +222,10 @@ max-time: 500 ...@@ -222,6 +222,10 @@ max-time: 500
cmd: testScan cmd: testScan
args: -n ScanRead488 -l 10 T6 args: -n ScanRead488 -l 10 T6
max-time: 500
cmd: testScan
args: -n ScanRead488Timeout -l 10 T6
max-time: 600 max-time: 600
cmd: testScan cmd: testScan
args: -n ScanRead40 -l 100 T2 args: -n ScanRead40 -l 100 T2
......
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