ndb - bug#18026

  incorrect handling of varsize primary key and charsets in tup-scan
parent 4561b28d
...@@ -119,9 +119,10 @@ operator<<(NdbOut& out, Dblqh::ScanRecord::ScanType state){ ...@@ -119,9 +119,10 @@ operator<<(NdbOut& out, Dblqh::ScanRecord::ScanType state){
const Uint32 NR_ScanNo = 0; const Uint32 NR_ScanNo = 0;
#if defined VM_TRACE || defined ERROR_INSERT || defined NDBD_TRACENR #if defined VM_TRACE || defined ERROR_INSERT || defined NDBD_TRACENR
NdbOut & tracenrout = ndbout; #include <NdbConfig.h>
NdbOut * tracenrout = 0;
static int TRACENR_FLAG = 0; static int TRACENR_FLAG = 0;
#define TRACENR(x) tracenrout << x #define TRACENR(x) (* tracenrout) << x
#define SET_TRACENR_FLAG TRACENR_FLAG = 1 #define SET_TRACENR_FLAG TRACENR_FLAG = 1
#define CLEAR_TRACENR_FLAG TRACENR_FLAG = 0 #define CLEAR_TRACENR_FLAG TRACENR_FLAG = 0
#else #else
...@@ -445,6 +446,12 @@ void Dblqh::execSTTOR(Signal* signal) ...@@ -445,6 +446,12 @@ void Dblqh::execSTTOR(Signal* signal)
c_acc = (Dbacc*)globalData.getBlock(DBACC); c_acc = (Dbacc*)globalData.getBlock(DBACC);
ndbrequire(c_tup != 0 && c_acc != 0); ndbrequire(c_tup != 0 && c_acc != 0);
sendsttorryLab(signal); 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; return;
break; break;
case 4: case 4:
......
...@@ -280,7 +280,7 @@ Dbtup::scanReply(Signal* signal, ScanOpPtr scanPtr) ...@@ -280,7 +280,7 @@ Dbtup::scanReply(Signal* signal, ScanOpPtr scanPtr)
const ScanPos& pos = scan.m_scanPos; const ScanPos& pos = scan.m_scanPos;
const Local_key& key_mm = pos.m_key_mm; const Local_key& key_mm = pos.m_key_mm;
int ret = tuxReadPk(fragPtr.i, pos.m_realpid_mm, key_mm.m_page_idx, int ret = tuxReadPk(fragPtr.i, pos.m_realpid_mm, key_mm.m_page_idx,
pkData, false); pkData, true);
ndbrequire(ret > 0); ndbrequire(ret > 0);
pkSize = ret; pkSize = ret;
dbg((DBTUP, "PK size=%d data=%08x", pkSize, pkData[0])); 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