MySQL 5.6.14 Source Code Document
|
Public Member Functions | |
NdbTableImpl () | |
NdbTableImpl (NdbDictionary::Table &) | |
void | init () |
int | setName (const char *name) |
const char * | getName () const |
void | setFragmentCount (Uint32 count) |
Uint32 | getFragmentCount () const |
int | setFrm (const void *data, Uint32 len) |
const void * | getFrmData () const |
Uint32 | getFrmLength () const |
int | setFragmentData (const Uint32 *data, Uint32 cnt) |
const Uint32 * | getFragmentData () const |
Uint32 | getFragmentDataLen () const |
int | setRangeListData (const Int32 *data, Uint32 cnt) |
const Int32 * | getRangeListData () const |
Uint32 | getRangeListDataLen () const |
Uint32 | getFragmentNodes (Uint32 fragmentId, Uint32 *nodeIdArrayPtr, Uint32 arraySize) const |
const char * | getMysqlName () const |
int | updateMysqlName () |
bool | matchDb (const char *name, size_t len) const |
int | aggregate (NdbError &error) |
int | validate (NdbError &error) |
int | getDbName (char *buf, size_t len) const |
int | getSchemaName (char *buf, size_t len) const |
void | setDbSchema (const char *db, const char *schema) |
void | computeAggregates () |
int | buildColumnHash () |
NdbColumnImpl * | getColumn (unsigned attrId) |
NdbColumnImpl * | getColumn (const char *name) |
const NdbColumnImpl * | getColumn (unsigned attrId) const |
const NdbColumnImpl * | getColumn (const char *name) const |
bool | equal (const NdbTableImpl &) const |
int | assign (const NdbTableImpl &) |
Uint32 | get_nodes (Uint32 partitionId, const Uint16 **nodes) const |
Public Member Functions inherited from NdbDictionary::Table | |
void | setRowGCIIndicator (bool value) |
bool | getRowGCIIndicator () const |
void | setRowChecksumIndicator (bool value) |
bool | getRowChecksumIndicator () const |
void | setStoredTable (bool x) |
bool | getStoredTable () const |
int | getRowSizeInBytes () const |
int | createTableInDb (Ndb *, bool existingEqualIsOk=true) const |
int | getReplicaCount () const |
bool | getTemporary () const |
void | setTemporary (bool) |
bool | getForceVarPart () const |
void | setForceVarPart (bool) |
int | checkColumns (const Uint32 *bitmap, unsigned len_in_bytes) const |
void | assignObjId (const ObjectId &) |
void | setStorageType (Column::StorageType) |
Column::StorageType | getStorageType () const |
void | setExtraRowGciBits (Uint32) |
Uint32 | getExtraRowGciBits () const |
void | setExtraRowAuthorBits (Uint32) |
Uint32 | getExtraRowAuthorBits () const |
Uint32 | getPartitionId (Uint32 hashvalue) const |
bool | hasDefaultValues () const |
int | getTableId () const |
Column * | getColumn (const int attributeId) |
const Column * | getColumn (const int attributeId) const |
bool | getLogging () const |
FragmentType | getFragmentType () const |
int | getKValue () const |
int | getMinLoadFactor () const |
int | getMaxLoadFactor () const |
int | getNoOfColumns () const |
int | getNoOfAutoIncrementColumns () const |
int | getNoOfPrimaryKeys () const |
const char * | getPrimaryKey (int no) const |
bool | equal (const Table &) const |
const NdbRecord * | getDefaultRecord () const |
Table (const char *name="") | |
Table (const Table &table) | |
virtual | ~Table () |
Table & | operator= (const Table &table) |
int | addColumn (const Column &) |
void | setLogging (bool) |
void | setLinearFlag (Uint32 flag) |
bool | getLinearFlag () const |
void | setFragmentType (FragmentType) |
void | setKValue (int kValue) |
void | setMinLoadFactor (int) |
void | setMaxLoadFactor (int) |
int | setTablespaceName (const char *name) |
const char * | getTablespaceName () const |
int | setTablespace (const class Tablespace &) |
bool | getTablespace (Uint32 *id=0, Uint32 *version=0) const |
bool | getHashMap (Uint32 *id=0, Uint32 *version=0) const |
int | setHashMap (const class HashMap &) |
Object::Type | getObjectType () const |
virtual Object::Status | getObjectStatus () const |
void | setStatusInvalid () const |
virtual int | getObjectVersion () const |
void | setDefaultNoPartitionsFlag (Uint32 indicator) |
Uint32 | getDefaultNoPartitionsFlag () const |
virtual int | getObjectId () const |
void | setObjectType (Object::Type type) |
void | setMaxRows (Uint64 maxRows) |
Uint64 | getMaxRows () const |
void | setMinRows (Uint64 minRows) |
Uint64 | getMinRows () const |
void | setSingleUserMode (enum SingleUserMode) |
enum SingleUserMode | getSingleUserMode () const |
Public Member Functions inherited from NdbDictObjectImpl | |
bool | change () |
Static Public Member Functions | |
static NdbTableImpl & | getImpl (NdbDictionary::Table &t) |
static NdbTableImpl & | getImpl (const NdbDictionary::Table &t) |
Static Public Member Functions inherited from NdbDictObjectImpl | |
static NdbDictObjectImpl & | getImpl (NdbDictionary::ObjectId &t) |
static const NdbDictObjectImpl & | getImpl (const NdbDictionary::ObjectId &t) |
Public Attributes | |
Uint32 | m_primaryTableId |
BaseString | m_internalName |
BaseString | m_externalName |
BaseString | m_mysqlName |
UtilBuffer | m_frm |
Vector< Uint32 > | m_fd |
Vector< Int32 > | m_range |
NdbDictionary::Object::FragmentType | m_fragmentType |
Uint32 | m_columnHashMask |
Vector< Uint32 > | m_columnHash |
Vector< NdbColumnImpl * > | m_columns |
Uint32 | m_noOfAutoIncColumns |
Uint32 | m_hashValueMask |
Uint32 | m_hashpointerValue |
Vector< Uint16 > | m_fragments |
Vector< Uint8 > | m_hash_map |
Uint64 | m_max_rows |
Uint64 | m_min_rows |
Uint32 | m_default_no_part_flag |
bool | m_linear_flag |
bool | m_logging |
bool | m_temporary |
bool | m_row_gci |
bool | m_row_checksum |
bool | m_force_var_part |
bool | m_has_default_values |
int | m_kvalue |
int | m_minLoadFactor |
int | m_maxLoadFactor |
Uint16 | m_keyLenInWords |
Uint16 | m_fragmentCount |
Uint8 | m_single_user_mode |
Uint8 | m_storageType |
Uint8 | m_extra_row_gci_bits |
Uint8 | m_extra_row_author_bits |
NdbIndexImpl * | m_index |
BaseString | m_primaryTable |
NdbDictionary::Object::Type | m_indexType |
Uint8 | m_noOfKeys |
Uint8 | m_noOfDistributionKeys |
Uint8 | m_noOfBlobs |
Uint8 | m_noOfDiskColumns |
Uint8 | m_replicaCount |
NdbRecord * | m_ndbrecord |
const unsigned char * | m_pkMask |
NdbDictionary::Table * | m_facade |
BaseString | m_tablespace_name |
Uint32 | m_tablespace_id |
Uint32 | m_tablespace_version |
Uint32 | m_hash_map_id |
Uint32 | m_hash_map_version |
Public Attributes inherited from NdbDictObjectImpl | |
int | m_id |
Uint32 | m_version |
NdbDictionary::Object::Type | m_type |
NdbDictionary::Object::Status | m_status |
Additional Inherited Members | |
Public Types inherited from NdbDictionary::Table | |
enum | SingleUserMode { SingleUserModeLocked = NDB_SUM_LOCKED, SingleUserModeReadOnly = NDB_SUM_READONLY, SingleUserModeReadWrite = NDB_SUM_READ_WRITE } |
Protected Member Functions inherited from NdbDictObjectImpl | |
NdbDictObjectImpl (NdbDictionary::Object::Type type) |
Definition at line 152 of file NdbDictionaryImpl.hpp.
NdbTableImpl::NdbTableImpl | ( | ) |
Definition at line 570 of file NdbDictionaryImpl.cpp.
int NdbTableImpl::aggregate | ( | NdbError & | error | ) |
This method is not needed in normal usage.
Compute aggregate data on table being defined. Required for aggregate methods such as getNoOfPrimaryKeys() to work before table has been created and retrieved via getTable().
May adjust some column flags. If no PK is so far marked as distribution key then all PK's will be marked.
Returns 0 on success. Returns -1 and sets error if an inconsistency is detected.
Reimplemented from NdbDictionary::Table.
Definition at line 1107 of file NdbDictionaryImpl.cpp.
bool NdbTableImpl::equal | ( | const NdbTableImpl & | obj | ) | const |
Equality/assign
Definition at line 667 of file NdbDictionaryImpl.cpp.
Uint32 NdbTableImpl::get_nodes | ( | Uint32 | partitionId, |
const Uint16 ** | nodes | ||
) | const |
Return count
Definition at line 1296 of file NdbDictionaryImpl.cpp.
|
inline |
Get column definition via name.
Reimplemented from NdbDictionary::Table.
Definition at line 1166 of file NdbDictionaryImpl.hpp.
|
inline |
Get column definition via name.
Reimplemented from NdbDictionary::Table.
Definition at line 1224 of file NdbDictionaryImpl.hpp.
Uint32 NdbTableImpl::getFragmentCount | ( | ) | const |
Get fragment count
Reimplemented from NdbDictionary::Table.
Definition at line 1126 of file NdbDictionaryImpl.cpp.
const Uint32 * NdbTableImpl::getFragmentData | ( | ) | const |
Get Fragment Data (array of node groups)
Reimplemented from NdbDictionary::Table.
Definition at line 1155 of file NdbDictionaryImpl.cpp.
Uint32 NdbTableImpl::getFragmentNodes | ( | Uint32 | fragmentId, |
Uint32 * | nodeIdArrayPtr, | ||
Uint32 | arraySize | ||
) | const |
Get list of nodes storing given fragment, primary is normally entry 0 Returns : 0 for error, > 0 for fragment count If fragment count is > arraySize param, only arraySize entries are written.
Reimplemented from NdbDictionary::Table.
Definition at line 1185 of file NdbDictionaryImpl.cpp.
const void * NdbTableImpl::getFrmData | ( | ) | const |
Get frm file stored with this table
Reimplemented from NdbDictionary::Table.
Definition at line 1137 of file NdbDictionaryImpl.cpp.
const char * NdbTableImpl::getName | ( | ) | const |
Get table name
Reimplemented from NdbDictionary::Table.
Definition at line 977 of file NdbDictionaryImpl.cpp.
const Int32 * NdbTableImpl::getRangeListData | ( | ) | const |
Get Range or List Array (value, partition)
Reimplemented from NdbDictionary::Table.
Definition at line 1173 of file NdbDictionaryImpl.cpp.
void NdbTableImpl::setFragmentCount | ( | Uint32 | count | ) |
Set fragment count
Reimplemented from NdbDictionary::Table.
Definition at line 1121 of file NdbDictionaryImpl.cpp.
int NdbTableImpl::setFragmentData | ( | const Uint32 * | nodegroups, |
Uint32 | cnt | ||
) |
Set fragmentation One Uint32 per fragment, containing nodegroup of fragment nodegroups[0] - correspondce to fragment 0
Note: This calls also modifies setFragmentCount
Reimplemented from NdbDictionary::Table.
Definition at line 1149 of file NdbDictionaryImpl.cpp.
int NdbTableImpl::setFrm | ( | const void * | data, |
Uint32 | len | ||
) |
Set frm file to store with this table
Reimplemented from NdbDictionary::Table.
Definition at line 1131 of file NdbDictionaryImpl.cpp.
int NdbTableImpl::setName | ( | const char * | name | ) |
Name of table
name | Name of table |
Reimplemented from NdbDictionary::Table.
Definition at line 971 of file NdbDictionaryImpl.cpp.
int NdbTableImpl::setRangeListData | ( | const Int32 * | data, |
Uint32 | cnt | ||
) |
Set array of information mapping range values and list values to fragments.
For range, this is a sorted list of range values For list, this is a list of pairs { value, partition }
Reimplemented from NdbDictionary::Table.
Definition at line 1167 of file NdbDictionaryImpl.cpp.
int NdbTableImpl::validate | ( | NdbError & | error | ) |
This method is not needed in normal usage.
Validate new table definition before create. Does aggregate() and additional checks. There may still be errors which are detected only by NDB kernel at create table.
Create table and retrieve table do validate() automatically.
Returns 0 on success. Returns -1 and sets error if an inconsistency is detected.
Reimplemented from NdbDictionary::Table.
Definition at line 1113 of file NdbDictionaryImpl.cpp.
Uint32 NdbTableImpl::m_hashValueMask |
Fragment info
Definition at line 219 of file NdbDictionaryImpl.hpp.
NdbRecord* NdbTableImpl::m_ndbrecord |
Default NdbRecord for this table or index Currently used by old-Api scans to use NdbRecord API internally.
Definition at line 270 of file NdbDictionaryImpl.hpp.
Uint8 NdbTableImpl::m_noOfKeys |
Aggregates
Definition at line 259 of file NdbDictionaryImpl.hpp.
const unsigned char* NdbTableImpl::m_pkMask |
Bitmask describing PK column positions for this table Currently used by old-Api scans to use NdbRecord API internally.
Definition at line 276 of file NdbDictionaryImpl.hpp.
BaseString NdbTableImpl::m_primaryTable |
Index only stuff
Definition at line 253 of file NdbDictionaryImpl.hpp.
BaseString NdbTableImpl::m_tablespace_name |
Disk stuff
Definition at line 296 of file NdbDictionaryImpl.hpp.