1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge mysql.com:/usr/local/home/marty/MySQL/mysql-5.0

into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new


mysql-test/r/ndb_insert.result:
  Auto merged
mysql-test/r/ndb_replace.result:
  Auto merged
storage/ndb/include/ndbapi/NdbIndexOperation.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbOperation.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbScanOperation.hpp:
  Auto merged
storage/ndb/src/ndbapi/NdbIndexOperation.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbOperation.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Keeping local and do manual merge
sql/ha_ndbcluster.h:
  Keeping local and do hand merge
This commit is contained in:
unknown
2006-03-23 22:39:30 +01:00
11 changed files with 132 additions and 18 deletions

View File

@ -129,6 +129,11 @@ public:
*/
int deleteTuple();
/**
* Get index object for this operation
*/
const NdbDictionary::Index * getIndex() const;
#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
/**
* Define the NdbIndexOperation to be a standard operation of type

View File

@ -55,10 +55,33 @@ public:
* @{
*/
/**
* Different access types (supported by sub-classes of NdbOperation)
*/
enum Type {
PrimaryKeyAccess ///< Read, insert, update, or delete using pk
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
= 0 // NdbOperation
#endif
,UniqueIndexAccess ///< Read, update, or delete using unique index
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
= 1 // NdbIndexOperation
#endif
,TableScan ///< Full table scan
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
= 2 // NdbScanOperation
#endif
,OrderedIndexScan ///< Ordered index scan
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
= 3 // NdbIndexScanOperation
#endif
};
/**
* Lock when performing read
*/
enum LockMode {
LM_Read ///< Read with shared lock
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
@ -720,6 +743,11 @@ public:
*/
const NdbDictionary::Table * getTable() const;
/**
* Get the type of access for this operation
*/
const Type getType() const;
/** @} *********************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
@ -773,7 +801,7 @@ protected:
int init(const class NdbTableImpl*, NdbTransaction* aCon);
void initInterpreter();
NdbOperation(Ndb* aNdb);
NdbOperation(Ndb* aNdb, Type aType = PrimaryKeyAccess);
virtual ~NdbOperation();
void next(NdbOperation*); // Set next pointer
NdbOperation* next(); // Get next pointer
@ -887,6 +915,8 @@ protected:
* These are the private variables that are defined in the operation objects.
*****************************************************************************/
Type m_type;
NdbReceiver theReceiver;
NdbError theError; // Errorcode
@ -1050,6 +1080,19 @@ NdbOperation::getFirstRecAttr() const
return theReceiver.theFirstRecAttr;
}
/******************************************************************************
Type getType()
Return Value Return the Type.
Remark: Gets type of access.
******************************************************************************/
inline
const NdbOperation::Type
NdbOperation::getType() const
{
return m_type;
}
/******************************************************************************
OperationStatus Status();

View File

@ -178,7 +178,8 @@ public:
int restart(bool forceSend = false);
protected:
NdbScanOperation(Ndb* aNdb);
NdbScanOperation(Ndb* aNdb,
NdbOperation::Type aType = NdbOperation::TableScan);
virtual ~NdbScanOperation();
int nextResultImpl(bool fetchAllowed = true, bool forceSend = false);