mariadb/ndb/include/kernel/signaldata/ScanTab.hpp

383 lines
8.5 KiB
C++
Raw Normal View History

/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef SCAN_TAB_H
#define SCAN_TAB_H
#include "SignalData.hpp"
/**
*
* SENDER: API
* RECIVER: Dbtc
*/
class ScanTabReq {
/**
* Reciver(s)
*/
friend class Dbtc; // Reciver
/**
* Sender(s)
*/
friend class NdbConnection;
2004-05-26 13:24:14 +02:00
friend class NdbScanOperation;
/**
* For printing
*/
friend bool printSCANTABREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo);
public:
/**
* Length of signal
*/
First step for WL 2025 Not yet fully working Scan reads work fine, not scan updates ndb/include/kernel/ndb_limits.h: Introducing a new parameter plus increasing the max no of parallel operations per scan in LQH, first step in WL 2025 ndb/include/kernel/signaldata/ScanFrag.hpp: Only need one clientOpPtr Concurrency is batch_size to use in this scan batch_byte_size is max no of bytes sent in a batch first_batch_size is the batch size in the first batch ndb/include/kernel/signaldata/ScanTab.hpp: apiOperationPtr is sent as long signal data batch_byte_size and first_batch_size is needed for further transport to LQH batch size can now be bigger than before ndb/include/kernel/signaldata/TcKeyReq.hpp: More concurrency means more size for scanInfo also in TCKEYREQ ndb/include/ndbapi/NdbReceiver.hpp: New subroutine to caclculate batch size and similar parameters ndb/include/ndbapi/NdbScanOperation.hpp: batch size calculated before sending, not necessary to store anymore ndb/src/common/debugger/signaldata/ScanTab.cpp: Updated signal printer for SCAN_TABREQ ndb/src/kernel/blocks/backup/Backup.cpp: Fixes to make it compile, not fixed for BACKUP being useful yet ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Removed parameters no longer needed and added some new ones. ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Fix for cmaxAccOps that was using the wrong constant Removed old code New SCAN_FRAGREQ signal ndb/src/kernel/blocks/dbtc/Dbtc.hpp: New variables Removed dead code ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: New SCAN_TABREQ, SCAN_FRAGREQ, SCAN_FRAGCONF and SCAN_TABCONF Fixed some error handling to be more efficient ndb/src/kernel/blocks/suma/Suma.cpp: Fixes to make it compile, not yet usable for SUMA features ndb/src/kernel/vm/Configuration.cpp: Fix for wrong constant ndb/src/ndbapi/NdbApiSignal.cpp: Fix for not using constants ndb/src/ndbapi/NdbApiSignal.hpp: Added possibility to get signal sending node from signal ndb/src/ndbapi/NdbConnectionScan.cpp: Moved declaration ndb/src/ndbapi/NdbReceiver.cpp: New routine to calculate batch_size etc. ndb/src/ndbapi/NdbScanOperation.cpp: Various fixes for sending SCAN_TABREQ and other stuff
2004-08-09 17:43:15 +02:00
STATIC_CONST( StaticLength = 11 );
private:
// Type definitions
/**
* DATA VARIABLES
*/
UintR apiConnectPtr; // DATA 0
NdbIndexScanOperation::reset_bounds() - Send BOUNDS as KEYINFO - At restart, only reset KEYINFO -- Fix resource shortage at KEYINFO in Dbtc and Dblqh w.r.t scan -- ndb/include/kernel/signaldata/AttrInfo.hpp: Let NdbScanOperation access AttrInfo ndb/include/kernel/signaldata/KeyInfo.hpp: Let NdbScanOperation access AttrInfo ndb/include/kernel/signaldata/ScanFrag.hpp: Send KeyLen in ScanFragReq (for range scans) ndb/include/kernel/signaldata/ScanTab.hpp: Send KeyLen in ScanTabReq (for range scans) ndb/include/ndbapi/NdbConnection.hpp: Function for adding op to list ndb/include/ndbapi/NdbIndexScanOperation.hpp: new method for saving BOUNDS ndb/include/ndbapi/NdbOperation.hpp: Remove bounds stuff from NdbOperation and put it into NdbScanOperation ndb/include/ndbapi/NdbScanOperation.hpp: reset bounds ndb/src/common/debugger/signaldata/Makefile.am: New signal data printer for ScanFrag ndb/src/common/debugger/signaldata/ScanTab.cpp: Fix printout ndb/src/common/debugger/signaldata/SignalDataPrint.cpp: New signal data printer for ScanFrag ndb/src/kernel/blocks/backup/Backup.cpp: Updated ScanFragReq ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Use same sendKeyInfo for both acckeyreq and tux_bounds ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Let range scan use KEYinfo for bounds instead of attrinfo ndb/src/kernel/blocks/dbtc/Dbtc.hpp: Let range scan use KEYinfo for bounds instead of attrinfo ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Handle keyinfo in range scan ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: Skip useless 5 words in beginning of TuxBounds ndb/src/kernel/blocks/suma/Suma.cpp: Fix SCAN_FRAGREQ ndb/src/ndbapi/NdbConnection.cpp: reset bounds ndb/src/ndbapi/NdbOperation.cpp: Remove bounds ndb/src/ndbapi/NdbOperationDefine.cpp: Remove bounds stuff ndb/src/ndbapi/NdbOperationInt.cpp: Remove bounds stuff ndb/src/ndbapi/NdbScanOperation.cpp: Send BOUNDS in KEYINFO instead of ATTRINFO
2004-10-04 12:59:04 +02:00
UintR attrLenKeyLen; // DATA 1
UintR requestInfo; // DATA 2
UintR tableId; // DATA 3
UintR tableSchemaVersion; // DATA 4
UintR storedProcId; // DATA 5
UintR transId1; // DATA 6
UintR transId2; // DATA 7
UintR buddyConPtr; // DATA 8
First step for WL 2025 Not yet fully working Scan reads work fine, not scan updates ndb/include/kernel/ndb_limits.h: Introducing a new parameter plus increasing the max no of parallel operations per scan in LQH, first step in WL 2025 ndb/include/kernel/signaldata/ScanFrag.hpp: Only need one clientOpPtr Concurrency is batch_size to use in this scan batch_byte_size is max no of bytes sent in a batch first_batch_size is the batch size in the first batch ndb/include/kernel/signaldata/ScanTab.hpp: apiOperationPtr is sent as long signal data batch_byte_size and first_batch_size is needed for further transport to LQH batch size can now be bigger than before ndb/include/kernel/signaldata/TcKeyReq.hpp: More concurrency means more size for scanInfo also in TCKEYREQ ndb/include/ndbapi/NdbReceiver.hpp: New subroutine to caclculate batch size and similar parameters ndb/include/ndbapi/NdbScanOperation.hpp: batch size calculated before sending, not necessary to store anymore ndb/src/common/debugger/signaldata/ScanTab.cpp: Updated signal printer for SCAN_TABREQ ndb/src/kernel/blocks/backup/Backup.cpp: Fixes to make it compile, not fixed for BACKUP being useful yet ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Removed parameters no longer needed and added some new ones. ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Fix for cmaxAccOps that was using the wrong constant Removed old code New SCAN_FRAGREQ signal ndb/src/kernel/blocks/dbtc/Dbtc.hpp: New variables Removed dead code ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: New SCAN_TABREQ, SCAN_FRAGREQ, SCAN_FRAGCONF and SCAN_TABCONF Fixed some error handling to be more efficient ndb/src/kernel/blocks/suma/Suma.cpp: Fixes to make it compile, not yet usable for SUMA features ndb/src/kernel/vm/Configuration.cpp: Fix for wrong constant ndb/src/ndbapi/NdbApiSignal.cpp: Fix for not using constants ndb/src/ndbapi/NdbApiSignal.hpp: Added possibility to get signal sending node from signal ndb/src/ndbapi/NdbConnectionScan.cpp: Moved declaration ndb/src/ndbapi/NdbReceiver.cpp: New routine to calculate batch_size etc. ndb/src/ndbapi/NdbScanOperation.cpp: Various fixes for sending SCAN_TABREQ and other stuff
2004-08-09 17:43:15 +02:00
UintR batch_byte_size; // DATA 9
UintR first_batch_size; // DATA 10
/**
* Get:ers for requestInfo
*/
static Uint8 getParallelism(const UintR & requestInfo);
static Uint8 getLockMode(const UintR & requestInfo);
static Uint8 getHoldLockFlag(const UintR & requestInfo);
static Uint8 getReadCommittedFlag(const UintR & requestInfo);
static Uint8 getRangeScanFlag(const UintR & requestInfo);
static Uint8 getKeyinfoFlag(const UintR & requestInfo);
static Uint16 getScanBatch(const UintR & requestInfo);
/**
* Set:ers for requestInfo
*/
static void clearRequestInfo(UintR & requestInfo);
static void setParallelism(UintR & requestInfo, Uint32 flag);
static void setLockMode(UintR & requestInfo, Uint32 flag);
static void setHoldLockFlag(UintR & requestInfo, Uint32 flag);
static void setReadCommittedFlag(UintR & requestInfo, Uint32 flag);
static void setRangeScanFlag(UintR & requestInfo, Uint32 flag);
static void setKeyinfoFlag(UintR & requestInfo, Uint32 flag);
2004-05-26 13:24:14 +02:00
static void setScanBatch(Uint32& requestInfo, Uint32 sz);
};
/**
* Request Info
*
p = Parallelism - 8 Bits -> Max 256 (Bit 0-7)
l = Lock mode - 1 Bit 8
h = Hold lock mode - 1 Bit 10
c = Read Committed - 1 Bit 11
k = Keyinfo - 1 Bit 12
x = Range Scan (TUX) - 1 Bit 15
First step for WL 2025 Not yet fully working Scan reads work fine, not scan updates ndb/include/kernel/ndb_limits.h: Introducing a new parameter plus increasing the max no of parallel operations per scan in LQH, first step in WL 2025 ndb/include/kernel/signaldata/ScanFrag.hpp: Only need one clientOpPtr Concurrency is batch_size to use in this scan batch_byte_size is max no of bytes sent in a batch first_batch_size is the batch size in the first batch ndb/include/kernel/signaldata/ScanTab.hpp: apiOperationPtr is sent as long signal data batch_byte_size and first_batch_size is needed for further transport to LQH batch size can now be bigger than before ndb/include/kernel/signaldata/TcKeyReq.hpp: More concurrency means more size for scanInfo also in TCKEYREQ ndb/include/ndbapi/NdbReceiver.hpp: New subroutine to caclculate batch size and similar parameters ndb/include/ndbapi/NdbScanOperation.hpp: batch size calculated before sending, not necessary to store anymore ndb/src/common/debugger/signaldata/ScanTab.cpp: Updated signal printer for SCAN_TABREQ ndb/src/kernel/blocks/backup/Backup.cpp: Fixes to make it compile, not fixed for BACKUP being useful yet ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Removed parameters no longer needed and added some new ones. ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Fix for cmaxAccOps that was using the wrong constant Removed old code New SCAN_FRAGREQ signal ndb/src/kernel/blocks/dbtc/Dbtc.hpp: New variables Removed dead code ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: New SCAN_TABREQ, SCAN_FRAGREQ, SCAN_FRAGCONF and SCAN_TABCONF Fixed some error handling to be more efficient ndb/src/kernel/blocks/suma/Suma.cpp: Fixes to make it compile, not yet usable for SUMA features ndb/src/kernel/vm/Configuration.cpp: Fix for wrong constant ndb/src/ndbapi/NdbApiSignal.cpp: Fix for not using constants ndb/src/ndbapi/NdbApiSignal.hpp: Added possibility to get signal sending node from signal ndb/src/ndbapi/NdbConnectionScan.cpp: Moved declaration ndb/src/ndbapi/NdbReceiver.cpp: New routine to calculate batch_size etc. ndb/src/ndbapi/NdbScanOperation.cpp: Various fixes for sending SCAN_TABREQ and other stuff
2004-08-09 17:43:15 +02:00
b = Scan batch - 10 Bit 16-25 (max 1023)
1111111111222222222233
01234567890123456789012345678901
ppppppppl hck xbbbbbbbbbb
*/
#define PARALLELL_SHIFT (0)
#define PARALLELL_MASK (255)
#define LOCK_MODE_SHIFT (8)
#define LOCK_MODE_MASK (1)
#define HOLD_LOCK_SHIFT (10)
#define HOLD_LOCK_MASK (1)
#define KEYINFO_SHIFT (12)
#define KEYINFO_MASK (1)
#define READ_COMMITTED_SHIFT (11)
#define READ_COMMITTED_MASK (1)
#define RANGE_SCAN_SHIFT (15)
#define RANGE_SCAN_MASK (1)
2004-05-26 13:24:14 +02:00
#define SCAN_BATCH_SHIFT (16)
First step for WL 2025 Not yet fully working Scan reads work fine, not scan updates ndb/include/kernel/ndb_limits.h: Introducing a new parameter plus increasing the max no of parallel operations per scan in LQH, first step in WL 2025 ndb/include/kernel/signaldata/ScanFrag.hpp: Only need one clientOpPtr Concurrency is batch_size to use in this scan batch_byte_size is max no of bytes sent in a batch first_batch_size is the batch size in the first batch ndb/include/kernel/signaldata/ScanTab.hpp: apiOperationPtr is sent as long signal data batch_byte_size and first_batch_size is needed for further transport to LQH batch size can now be bigger than before ndb/include/kernel/signaldata/TcKeyReq.hpp: More concurrency means more size for scanInfo also in TCKEYREQ ndb/include/ndbapi/NdbReceiver.hpp: New subroutine to caclculate batch size and similar parameters ndb/include/ndbapi/NdbScanOperation.hpp: batch size calculated before sending, not necessary to store anymore ndb/src/common/debugger/signaldata/ScanTab.cpp: Updated signal printer for SCAN_TABREQ ndb/src/kernel/blocks/backup/Backup.cpp: Fixes to make it compile, not fixed for BACKUP being useful yet ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Removed parameters no longer needed and added some new ones. ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Fix for cmaxAccOps that was using the wrong constant Removed old code New SCAN_FRAGREQ signal ndb/src/kernel/blocks/dbtc/Dbtc.hpp: New variables Removed dead code ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: New SCAN_TABREQ, SCAN_FRAGREQ, SCAN_FRAGCONF and SCAN_TABCONF Fixed some error handling to be more efficient ndb/src/kernel/blocks/suma/Suma.cpp: Fixes to make it compile, not yet usable for SUMA features ndb/src/kernel/vm/Configuration.cpp: Fix for wrong constant ndb/src/ndbapi/NdbApiSignal.cpp: Fix for not using constants ndb/src/ndbapi/NdbApiSignal.hpp: Added possibility to get signal sending node from signal ndb/src/ndbapi/NdbConnectionScan.cpp: Moved declaration ndb/src/ndbapi/NdbReceiver.cpp: New routine to calculate batch_size etc. ndb/src/ndbapi/NdbScanOperation.cpp: Various fixes for sending SCAN_TABREQ and other stuff
2004-08-09 17:43:15 +02:00
#define SCAN_BATCH_MASK (1023)
2004-05-26 13:24:14 +02:00
inline
Uint8
ScanTabReq::getParallelism(const UintR & requestInfo){
return (Uint8)((requestInfo >> PARALLELL_SHIFT) & PARALLELL_MASK);
}
inline
Uint8
ScanTabReq::getLockMode(const UintR & requestInfo){
return (Uint8)((requestInfo >> LOCK_MODE_SHIFT) & LOCK_MODE_MASK);
}
inline
Uint8
ScanTabReq::getHoldLockFlag(const UintR & requestInfo){
return (Uint8)((requestInfo >> HOLD_LOCK_SHIFT) & HOLD_LOCK_MASK);
}
inline
Uint8
ScanTabReq::getReadCommittedFlag(const UintR & requestInfo){
return (Uint8)((requestInfo >> READ_COMMITTED_SHIFT) & READ_COMMITTED_MASK);
}
inline
Uint8
ScanTabReq::getRangeScanFlag(const UintR & requestInfo){
return (Uint8)((requestInfo >> RANGE_SCAN_SHIFT) & RANGE_SCAN_MASK);
}
2004-05-26 13:24:14 +02:00
inline
Uint16
2004-05-26 13:24:14 +02:00
ScanTabReq::getScanBatch(const Uint32 & requestInfo){
return (Uint16)((requestInfo >> SCAN_BATCH_SHIFT) & SCAN_BATCH_MASK);
2004-05-26 13:24:14 +02:00
}
inline
void
ScanTabReq::clearRequestInfo(UintR & requestInfo){
requestInfo = 0;
}
inline
void
ScanTabReq::setParallelism(UintR & requestInfo, Uint32 type){
ASSERT_MAX(type, PARALLELL_MASK, "ScanTabReq::setParallellism");
requestInfo |= (type << PARALLELL_SHIFT);
}
inline
void
ScanTabReq::setLockMode(UintR & requestInfo, Uint32 mode){
ASSERT_MAX(mode, LOCK_MODE_MASK, "ScanTabReq::setLockMode");
requestInfo |= (mode << LOCK_MODE_SHIFT);
}
inline
void
ScanTabReq::setHoldLockFlag(UintR & requestInfo, Uint32 flag){
ASSERT_BOOL(flag, "ScanTabReq::setHoldLockFlag");
requestInfo |= (flag << HOLD_LOCK_SHIFT);
}
inline
void
ScanTabReq::setReadCommittedFlag(UintR & requestInfo, Uint32 flag){
ASSERT_BOOL(flag, "ScanTabReq::setReadCommittedFlag");
requestInfo |= (flag << READ_COMMITTED_SHIFT);
}
inline
void
ScanTabReq::setRangeScanFlag(UintR & requestInfo, Uint32 flag){
ASSERT_BOOL(flag, "ScanTabReq::setRangeScanFlag");
requestInfo |= (flag << RANGE_SCAN_SHIFT);
}
2004-05-26 13:24:14 +02:00
inline
void
ScanTabReq::setScanBatch(Uint32 & requestInfo, Uint32 flag){
ASSERT_MAX(flag, SCAN_BATCH_MASK, "ScanTabReq::setScanBatch");
First step for WL 2025 Not yet fully working Scan reads work fine, not scan updates ndb/include/kernel/ndb_limits.h: Introducing a new parameter plus increasing the max no of parallel operations per scan in LQH, first step in WL 2025 ndb/include/kernel/signaldata/ScanFrag.hpp: Only need one clientOpPtr Concurrency is batch_size to use in this scan batch_byte_size is max no of bytes sent in a batch first_batch_size is the batch size in the first batch ndb/include/kernel/signaldata/ScanTab.hpp: apiOperationPtr is sent as long signal data batch_byte_size and first_batch_size is needed for further transport to LQH batch size can now be bigger than before ndb/include/kernel/signaldata/TcKeyReq.hpp: More concurrency means more size for scanInfo also in TCKEYREQ ndb/include/ndbapi/NdbReceiver.hpp: New subroutine to caclculate batch size and similar parameters ndb/include/ndbapi/NdbScanOperation.hpp: batch size calculated before sending, not necessary to store anymore ndb/src/common/debugger/signaldata/ScanTab.cpp: Updated signal printer for SCAN_TABREQ ndb/src/kernel/blocks/backup/Backup.cpp: Fixes to make it compile, not fixed for BACKUP being useful yet ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Removed parameters no longer needed and added some new ones. ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Fix for cmaxAccOps that was using the wrong constant Removed old code New SCAN_FRAGREQ signal ndb/src/kernel/blocks/dbtc/Dbtc.hpp: New variables Removed dead code ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: New SCAN_TABREQ, SCAN_FRAGREQ, SCAN_FRAGCONF and SCAN_TABCONF Fixed some error handling to be more efficient ndb/src/kernel/blocks/suma/Suma.cpp: Fixes to make it compile, not yet usable for SUMA features ndb/src/kernel/vm/Configuration.cpp: Fix for wrong constant ndb/src/ndbapi/NdbApiSignal.cpp: Fix for not using constants ndb/src/ndbapi/NdbApiSignal.hpp: Added possibility to get signal sending node from signal ndb/src/ndbapi/NdbConnectionScan.cpp: Moved declaration ndb/src/ndbapi/NdbReceiver.cpp: New routine to calculate batch_size etc. ndb/src/ndbapi/NdbScanOperation.cpp: Various fixes for sending SCAN_TABREQ and other stuff
2004-08-09 17:43:15 +02:00
requestInfo &= ~(SCAN_BATCH_MASK << SCAN_BATCH_SHIFT);
2004-05-26 13:24:14 +02:00
requestInfo |= (flag << SCAN_BATCH_SHIFT);
}
inline
Uint8
ScanTabReq::getKeyinfoFlag(const UintR & requestInfo){
return (Uint8)((requestInfo >> KEYINFO_SHIFT) & KEYINFO_MASK);
}
inline
void
ScanTabReq::setKeyinfoFlag(UintR & requestInfo, Uint32 flag){
ASSERT_BOOL(flag, "ScanTabReq::setKeyinfoFlag");
requestInfo |= (flag << KEYINFO_SHIFT);
}
/**
*
* SENDER: Dbtc
* RECIVER: API
*/
class ScanTabConf {
/**
* Reciver(s)
*/
friend class NdbConnection; // Reciver
/**
* Sender(s)
*/
friend class Dbtc;
/**
* For printing
*/
friend bool printSCANTABCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo);
public:
/**
* Length of signal
*/
STATIC_CONST( SignalLength = 4 );
2004-05-26 13:24:14 +02:00
static const Uint32 EndOfData = (1 << 31);
private:
// Type definitions
/**
* DATA VARIABLES
*/
UintR apiConnectPtr; // DATA 0
UintR requestInfo; // DATA 1
UintR transId1; // DATA 2
UintR transId2; // DATA 3
2004-05-26 13:24:14 +02:00
struct OpData {
Uint32 apiPtrI;
Uint32 tcPtrI;
Uint32 info;
};
First step for WL 2025 Not yet fully working Scan reads work fine, not scan updates ndb/include/kernel/ndb_limits.h: Introducing a new parameter plus increasing the max no of parallel operations per scan in LQH, first step in WL 2025 ndb/include/kernel/signaldata/ScanFrag.hpp: Only need one clientOpPtr Concurrency is batch_size to use in this scan batch_byte_size is max no of bytes sent in a batch first_batch_size is the batch size in the first batch ndb/include/kernel/signaldata/ScanTab.hpp: apiOperationPtr is sent as long signal data batch_byte_size and first_batch_size is needed for further transport to LQH batch size can now be bigger than before ndb/include/kernel/signaldata/TcKeyReq.hpp: More concurrency means more size for scanInfo also in TCKEYREQ ndb/include/ndbapi/NdbReceiver.hpp: New subroutine to caclculate batch size and similar parameters ndb/include/ndbapi/NdbScanOperation.hpp: batch size calculated before sending, not necessary to store anymore ndb/src/common/debugger/signaldata/ScanTab.cpp: Updated signal printer for SCAN_TABREQ ndb/src/kernel/blocks/backup/Backup.cpp: Fixes to make it compile, not fixed for BACKUP being useful yet ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Removed parameters no longer needed and added some new ones. ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Fix for cmaxAccOps that was using the wrong constant Removed old code New SCAN_FRAGREQ signal ndb/src/kernel/blocks/dbtc/Dbtc.hpp: New variables Removed dead code ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: New SCAN_TABREQ, SCAN_FRAGREQ, SCAN_FRAGCONF and SCAN_TABCONF Fixed some error handling to be more efficient ndb/src/kernel/blocks/suma/Suma.cpp: Fixes to make it compile, not yet usable for SUMA features ndb/src/kernel/vm/Configuration.cpp: Fix for wrong constant ndb/src/ndbapi/NdbApiSignal.cpp: Fix for not using constants ndb/src/ndbapi/NdbApiSignal.hpp: Added possibility to get signal sending node from signal ndb/src/ndbapi/NdbConnectionScan.cpp: Moved declaration ndb/src/ndbapi/NdbReceiver.cpp: New routine to calculate batch_size etc. ndb/src/ndbapi/NdbScanOperation.cpp: Various fixes for sending SCAN_TABREQ and other stuff
2004-08-09 17:43:15 +02:00
static Uint32 getLength(Uint32 opDataInfo) { return opDataInfo >> 10; };
static Uint32 getRows(Uint32 opDataInfo) { return opDataInfo & 1023;}
};
/**
* request info
*
o = received operations - 7 Bits -> Max 255 (Bit 0-7)
s = status of scan - 2 Bits -> Max ??? (Bit 8-?)
1111111111222222222233
01234567890123456789012345678901
ooooooooss
*/
#define OPERATIONS_SHIFT (0)
#define OPERATIONS_MASK (0xFF)
#define STATUS_SHIFT (8)
#define STATUS_MASK (0xFF)
/**
*
* SENDER: Dbtc
* RECIVER: API
*/
class ScanTabRef {
/**
* Reciver(s)
*/
friend class NdbConnection; // Reciver
/**
* Sender(s)
*/
friend class Dbtc;
/**
* For printing
*/
friend bool printSCANTABREF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo);
public:
/**
* Length of signal
*/
STATIC_CONST( SignalLength = 5 );
private:
// Type definitions
/**
* DATA VARIABLES
*/
UintR apiConnectPtr; // DATA 0
UintR transId1; // DATA 1
UintR transId2; // DATA 2
UintR errorCode; // DATA 3
UintR closeNeeded; // DATA 4
};
/**
*
* SENDER: API
* RECIVER: Dbtc
*/
class ScanNextReq {
/**
* Reciver(s)
*/
friend class Dbtc; // Reciver
/**
* Sender(s)
*/
friend class NdbOperation;
/**
* For printing
*/
friend bool printSCANNEXTREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo);
public:
/**
* Length of signal
*/
STATIC_CONST( SignalLength = 4 );
private:
// Type definitions
/**
* DATA VARIABLES
*/
UintR apiConnectPtr; // DATA 0
UintR stopScan; // DATA 1
UintR transId1; // DATA 2
UintR transId2; // DATA 3
// stopScan = 1, stop this scan
};
#endif