Commit b689f487 authored by unknown's avatar unknown

Fix of a nasty bug, small but hard to find

Some small printout fixes


ndb/include/kernel/signaldata/ScanFrag.hpp:
  Mixed up Hexadecimal and decimal notation, cost me 5 hours of
  debugging to find, grrr..
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  Fixed some declaration so that new bigger info fits in variables
ndb/test/ndbapi/testScanPerf.cpp:
  Fix for printing int's instead of Uint64 which for some reason
  caused problems on my Mac.
  Also print performance in each loop.
parent 9b3d5b9c
......@@ -321,7 +321,7 @@ KeyInfo20::getScanNo(Uint32 scanInfo){
inline
Uint32
KeyInfo20::getScanOp(Uint32 scanInfo){
return (scanInfo >> 8) & 0x1023;
return (scanInfo >> 8) & 0x3FF;
}
#endif
......@@ -927,17 +927,22 @@ public:
UintR distributionGroup;
UintR nextCacheRec;
UintR distributionKeySize;
Uint16 scanNode;
unsigned scanTakeOverInd : 1;
unsigned scanInfo : 15; // 12 bits used currently
Uint32 scanInfo;
//---------------------------------------------------
// Third and fourth 16 byte cache line in second 64
// byte cache line. Not used currently.
// Third 16 byte cache line in second 64
// byte cache line. Diverse use.
//---------------------------------------------------
Uint32 scanNode;
Uint32 scanTakeOverInd;
UintR firstKeybuf; /* POINTER THE LINKED LIST OF KEY BUFFERS */
UintR lastKeybuf; /* VARIABLE POINTING TO THE LAST KEY BUFFER */
UintR packedCacheVar[6];
//---------------------------------------------------
// Fourth 16 byte cache line in second 64
// byte cache line. Not used currently.
//---------------------------------------------------
UintR packedCacheVar[4];
};
typedef Ptr<CacheRecord> CacheRecordPtr;
......
......@@ -196,7 +196,6 @@ int
clear_table(){
if(!g_paramters[P_LOAD].value)
return 0;
int rows = g_paramters[P_ROWS].value;
UtilTransactions utilTrans(* g_table);
......@@ -215,8 +214,8 @@ void err(NdbError e){
int
run_scan(){
int iter = g_paramters[P_LOOPS].value;
Uint64 start1;
Uint64 sum1 = 0;
NDB_TICKS start1, stop;
int sum_time= 0;
Uint32 tot = g_paramters[P_ROWS].value;
......@@ -357,12 +356,15 @@ run_scan(){
pTrans->close();
Uint64 stop = NdbTick_CurrentMillisecond();
start1 = (stop - start1);
sum1 += start1;
stop = NdbTick_CurrentMillisecond();
int time_passed= (int)(stop - start1);
g_err.println("Time: %d ms = %u rows/sec", time_passed,
(1000*tot)/time_passed);
sum_time+= time_passed;
}
sum1 /= iter;
sum_time= sum_time / iter;
g_err.println("Avg time: %Ldms = %d rows/sec", sum1, (1000*tot)/sum1);
g_err.println("Avg time: %d ms = %u rows/sec", sum_time,
(1000*tot)/sum_time);
return 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