mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge mysql.com:/home/marty/MySQL/mysql-5.0
into mysql.com:/home/marty/MySQL/mysql-5.1 mysql-test/t/ndb_lock.test: Auto merged sql/ha_ndbcluster.h: Auto merged sql/handler.h: Auto merged storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp: Auto merged storage/ndb/include/ndbapi/NdbScanOperation.hpp: Auto merged mysql-test/r/ndb_lock.result: Merge sql/ha_ndbcluster.cc: Merge storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Merge storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Merge storage/ndb/src/ndbapi/NdbScanOperation.cpp: Merge storage/ndb/src/ndbapi/ndberror.c: Merge
This commit is contained in:
@ -62,11 +62,14 @@ public:
|
||||
Uint32 parallel,
|
||||
bool order_by,
|
||||
bool order_desc = false,
|
||||
bool read_range_no = false) {
|
||||
bool read_range_no = false,
|
||||
bool keyinfo = false) {
|
||||
Uint32 scan_flags =
|
||||
(SF_OrderBy & -(Int32)order_by) |
|
||||
(SF_Descending & -(Int32)order_desc) |
|
||||
(SF_ReadRangeNo & -(Int32)read_range_no);
|
||||
(SF_ReadRangeNo & -(Int32)read_range_no) |
|
||||
(SF_KeyInfo & -(Int32)keyinfo);
|
||||
|
||||
return readTuples(lock_mode, scan_flags, parallel);
|
||||
}
|
||||
#endif
|
||||
|
@ -45,7 +45,8 @@ public:
|
||||
SF_TupScan = (1 << 16), // scan TUP - only LM_CommittedRead
|
||||
SF_OrderBy = (1 << 24), // index scan in order
|
||||
SF_Descending = (2 << 24), // index scan in descending order
|
||||
SF_ReadRangeNo = (4 << 24) // enable @ref get_range_no
|
||||
SF_ReadRangeNo = (4 << 24), // enable @ref get_range_no
|
||||
SF_KeyInfo = 1 // request KeyInfo to be sent back
|
||||
};
|
||||
|
||||
/**
|
||||
@ -62,15 +63,14 @@ public:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
|
||||
/**
|
||||
* readTuples
|
||||
*
|
||||
* @param lock_mode Lock mode
|
||||
* @param batch No of rows to fetch from each fragment at a time
|
||||
* @param parallel No of fragments to scan in parallell
|
||||
* @note specifying 0 for batch and parallall means max performance
|
||||
* @note specifying 0 for batch and parallell means max performance
|
||||
*/
|
||||
#ifdef ndb_readtuples_impossible_overload
|
||||
int readTuples(LockMode lock_mode = LM_Read,
|
||||
Uint32 batch = 0, Uint32 parallel = 0);
|
||||
Uint32 batch = 0, Uint32 parallel = 0, bool keyinfo = false);
|
||||
#endif
|
||||
|
||||
inline int readTuples(int parallell){
|
||||
@ -142,6 +142,20 @@ public:
|
||||
*/
|
||||
void close(bool forceSend = false, bool releaseOp = false);
|
||||
|
||||
/**
|
||||
* Lock current tuple
|
||||
*
|
||||
* @return an NdbOperation or NULL.
|
||||
*/
|
||||
NdbOperation* lockCurrentTuple();
|
||||
/**
|
||||
* Lock current tuple
|
||||
*
|
||||
* @param lockTrans Transaction that should perform the lock
|
||||
*
|
||||
* @return an NdbOperation or NULL.
|
||||
*/
|
||||
NdbOperation* lockCurrentTuple(NdbTransaction* lockTrans);
|
||||
/**
|
||||
* Update current tuple
|
||||
*
|
||||
@ -251,6 +265,19 @@ protected:
|
||||
bool m_executed; // Marker if operation should be released at close
|
||||
};
|
||||
|
||||
inline
|
||||
NdbOperation*
|
||||
NdbScanOperation::lockCurrentTuple(){
|
||||
return lockCurrentTuple(m_transConnection);
|
||||
}
|
||||
|
||||
inline
|
||||
NdbOperation*
|
||||
NdbScanOperation::lockCurrentTuple(NdbTransaction* takeOverTrans){
|
||||
return takeOverScanOp(NdbOperation::ReadRequest,
|
||||
takeOverTrans);
|
||||
}
|
||||
|
||||
inline
|
||||
NdbOperation*
|
||||
NdbScanOperation::updateCurrentTuple(){
|
||||
|
Reference in New Issue
Block a user