Commit 5fb52827 authored by unknown's avatar unknown

Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/space/pekka/ndb/version/my41

parents b9c6c482 4a641100
...@@ -1076,7 +1076,7 @@ private: ...@@ -1076,7 +1076,7 @@ private:
void storeLongKeysAtPos(Signal* signal); void storeLongKeysAtPos(Signal* signal);
void reorgLongPage(Signal* signal); void reorgLongPage(Signal* signal);
void getElement(Signal* signal); void getElement(Signal* signal);
void searchLongKey(Signal* signal); void searchLongKey(Signal* signal, bool verify);
void getdirindex(Signal* signal); void getdirindex(Signal* signal);
void commitdelete(Signal* signal, bool systemRestart); void commitdelete(Signal* signal, bool systemRestart);
void deleteElement(Signal* signal); void deleteElement(Signal* signal);
......
...@@ -4685,7 +4685,7 @@ void Dbacc::getElement(Signal* signal) ...@@ -4685,7 +4685,7 @@ void Dbacc::getElement(Signal* signal)
/* --------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------- */
tslcPageIndex = gePageptr.p->word32[tgeKeyptr] & 0x3ff; tslcPageIndex = gePageptr.p->word32[tgeKeyptr] & 0x3ff;
tslcPagedir = gePageptr.p->word32[tgeKeyptr] >> 10; tslcPagedir = gePageptr.p->word32[tgeKeyptr] >> 10;
searchLongKey(signal); searchLongKey(signal, true);
if (tslcResult == ZTRUE) { if (tslcResult == ZTRUE) {
register Uint32 TlocData1, TlocData2; register Uint32 TlocData1, TlocData2;
jam(); jam();
...@@ -4728,6 +4728,14 @@ void Dbacc::getElement(Signal* signal) ...@@ -4728,6 +4728,14 @@ void Dbacc::getElement(Signal* signal)
Uint32 TgeIndex = TdataIndex + tgeForward; Uint32 TgeIndex = TdataIndex + tgeForward;
operationRecPtr.p->localdata[0] = gePageptr.p->word32[TdataIndex]; operationRecPtr.p->localdata[0] = gePageptr.p->word32[TdataIndex];
operationRecPtr.p->localdata[1] = gePageptr.p->word32[TgeIndex]; operationRecPtr.p->localdata[1] = gePageptr.p->word32[TgeIndex];
if (fragrecptr.p->keyLength == 0) {
// set up long key variables in operation record
tslcPageIndex = gePageptr.p->word32[tgeKeyptr] & 0x3ff;
tslcPagedir = gePageptr.p->word32[tgeKeyptr] >> 10;
// no verification since we have no key data
searchLongKey(signal, false);
}
return; return;
}//if }//if
if (tgeRemLen <= ZCON_HEAD_SIZE) { if (tgeRemLen <= ZCON_HEAD_SIZE) {
...@@ -4775,7 +4783,7 @@ void Dbacc::getElement(Signal* signal) ...@@ -4775,7 +4783,7 @@ void Dbacc::getElement(Signal* signal)
/* TSLC_RESULT */ /* TSLC_RESULT */
/* DESCRIPTION: SEARCH FOR AN ELEMENT IN A LONG_KEY_PAGE. */ /* DESCRIPTION: SEARCH FOR AN ELEMENT IN A LONG_KEY_PAGE. */
/* --------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------- */
void Dbacc::searchLongKey(Signal* signal) void Dbacc::searchLongKey(Signal* signal, bool verify)
{ {
DirRangePtr slcOverflowrangeptr; DirRangePtr slcOverflowrangeptr;
DirectoryarrayPtr slcOverflowDirptr; DirectoryarrayPtr slcOverflowDirptr;
...@@ -4801,15 +4809,18 @@ void Dbacc::searchLongKey(Signal* signal) ...@@ -4801,15 +4809,18 @@ void Dbacc::searchLongKey(Signal* signal)
dbgWord32(slcPageptr, ZWORDS_IN_PAGE - tslcPageIndex, (int)slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex] & 0xffff); dbgWord32(slcPageptr, ZWORDS_IN_PAGE - tslcPageIndex, (int)slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex] & 0xffff);
dbgWord32(slcPageptr, ZWORDS_IN_PAGE - tslcPageIndex, slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex] >> 16); dbgWord32(slcPageptr, ZWORDS_IN_PAGE - tslcPageIndex, slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex] >> 16);
tslcIndexValue = slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex]; tslcIndexValue = slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex];
if (verify) {
if ((tslcIndexValue >> 16) != operationRecPtr.p->tupkeylen) { if ((tslcIndexValue >> 16) != operationRecPtr.p->tupkeylen) {
jam(); jam();
tslcResult = ZFALSE; tslcResult = ZFALSE;
return; return;
}//if }//if
}
tslcStartIndex = tslcIndexValue & 0xffff; tslcStartIndex = tslcIndexValue & 0xffff;
guard30 = operationRecPtr.p->tupkeylen - 1; guard30 = operationRecPtr.p->tupkeylen - 1;
arrGuard(guard30, 2048); arrGuard(guard30, 2048);
arrGuard(guard30 + tslcStartIndex, 2048); arrGuard(guard30 + tslcStartIndex, 2048);
if (verify) {
for (tslcIndex = 0; tslcIndex <= guard30; tslcIndex++) { for (tslcIndex = 0; tslcIndex <= guard30; tslcIndex++) {
dbgWord32(slcPageptr, tslcIndex + tslcStartIndex, slcPageptr.p->word32[tslcIndex + tslcStartIndex]); dbgWord32(slcPageptr, tslcIndex + tslcStartIndex, slcPageptr.p->word32[tslcIndex + tslcStartIndex]);
if (slcPageptr.p->word32[tslcIndex + tslcStartIndex] != Tkeydata[tslcIndex]) { if (slcPageptr.p->word32[tslcIndex + tslcStartIndex] != Tkeydata[tslcIndex]) {
...@@ -4818,6 +4829,7 @@ void Dbacc::searchLongKey(Signal* signal) ...@@ -4818,6 +4829,7 @@ void Dbacc::searchLongKey(Signal* signal)
return; return;
}//if }//if
}//for }//for
}
jam(); jam();
tslcResult = ZTRUE; tslcResult = ZTRUE;
operationRecPtr.p->longPagePtr = slcPageptr.i; operationRecPtr.p->longPagePtr = slcPageptr.i;
......
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