Commit 6e05df48 authored by unknown's avatar unknown

ndb - bug#18026

  incorrect handling of varsize primary key and charsets in tup-scan


storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  put tracenr log in signal log instead...as out file gets very big...
storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp:
  PK needs to be normalized before computing hashvalue, otherwise lock-req will not find row,
    causing assertion in debug build, and inconsistency in release
parent a4801409
......@@ -119,9 +119,10 @@ operator<<(NdbOut& out, Dblqh::ScanRecord::ScanType state){
const Uint32 NR_ScanNo = 0;
#if defined VM_TRACE || defined ERROR_INSERT || defined NDBD_TRACENR
NdbOut & tracenrout = ndbout;
#include <NdbConfig.h>
NdbOut * tracenrout = 0;
static int TRACENR_FLAG = 0;
#define TRACENR(x) tracenrout << x
#define TRACENR(x) (* tracenrout) << x
#define SET_TRACENR_FLAG TRACENR_FLAG = 1
#define CLEAR_TRACENR_FLAG TRACENR_FLAG = 0
#else
......@@ -445,6 +446,12 @@ void Dblqh::execSTTOR(Signal* signal)
c_acc = (Dbacc*)globalData.getBlock(DBACC);
ndbrequire(c_tup != 0 && c_acc != 0);
sendsttorryLab(signal);
#if defined VM_TRACE || defined ERROR_INSERT || defined NDBD_TRACENR
char *name = NdbConfig_SignalLogFileName(getOwnNodeId());
tracenrout = new NdbOut(* new FileOutputStream(fopen(name, "w+")));
#endif
return;
break;
case 4:
......
......@@ -280,7 +280,7 @@ Dbtup::scanReply(Signal* signal, ScanOpPtr scanPtr)
const ScanPos& pos = scan.m_scanPos;
const Local_key& key_mm = pos.m_key_mm;
int ret = tuxReadPk(fragPtr.i, pos.m_realpid_mm, key_mm.m_page_idx,
pkData, false);
pkData, true);
ndbrequire(ret > 0);
pkSize = ret;
dbg((DBTUP, "PK size=%d data=%08x", pkSize, pkData[0]));
......
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