mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
Fix of a nasty bug, small but hard to find
Some small printout fixes
This commit is contained in:
parent
5e4070af30
commit
e30e90fbda
3 changed files with 22 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue