Commit 3eae2226 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 4a895da7 ba8e8b06
......@@ -1076,7 +1076,7 @@ private:
void storeLongKeysAtPos(Signal* signal);
void reorgLongPage(Signal* signal);
void getElement(Signal* signal);
void searchLongKey(Signal* signal);
void searchLongKey(Signal* signal, bool verify);
void getdirindex(Signal* signal);
void commitdelete(Signal* signal, bool systemRestart);
void deleteElement(Signal* signal);
......
......@@ -4685,7 +4685,7 @@ void Dbacc::getElement(Signal* signal)
/* --------------------------------------------------------------------------------- */
tslcPageIndex = gePageptr.p->word32[tgeKeyptr] & 0x3ff;
tslcPagedir = gePageptr.p->word32[tgeKeyptr] >> 10;
searchLongKey(signal);
searchLongKey(signal, true);
if (tslcResult == ZTRUE) {
register Uint32 TlocData1, TlocData2;
jam();
......@@ -4728,6 +4728,14 @@ void Dbacc::getElement(Signal* signal)
Uint32 TgeIndex = TdataIndex + tgeForward;
operationRecPtr.p->localdata[0] = gePageptr.p->word32[TdataIndex];
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;
}//if
if (tgeRemLen <= ZCON_HEAD_SIZE) {
......@@ -4775,7 +4783,7 @@ void Dbacc::getElement(Signal* signal)
/* TSLC_RESULT */
/* DESCRIPTION: SEARCH FOR AN ELEMENT IN A LONG_KEY_PAGE. */
/* --------------------------------------------------------------------------------- */
void Dbacc::searchLongKey(Signal* signal)
void Dbacc::searchLongKey(Signal* signal, bool verify)
{
DirRangePtr slcOverflowrangeptr;
DirectoryarrayPtr slcOverflowDirptr;
......@@ -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, slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex] >> 16);
tslcIndexValue = slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex];
if (verify) {
if ((tslcIndexValue >> 16) != operationRecPtr.p->tupkeylen) {
jam();
tslcResult = ZFALSE;
return;
}//if
}
tslcStartIndex = tslcIndexValue & 0xffff;
guard30 = operationRecPtr.p->tupkeylen - 1;
arrGuard(guard30, 2048);
arrGuard(guard30 + tslcStartIndex, 2048);
if (verify) {
for (tslcIndex = 0; tslcIndex <= guard30; tslcIndex++) {
dbgWord32(slcPageptr, tslcIndex + tslcStartIndex, slcPageptr.p->word32[tslcIndex + tslcStartIndex]);
if (slcPageptr.p->word32[tslcIndex + tslcStartIndex] != Tkeydata[tslcIndex]) {
......@@ -4818,6 +4829,7 @@ void Dbacc::searchLongKey(Signal* signal)
return;
}//if
}//for
}
jam();
tslcResult = ZTRUE;
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