MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbDictionaryImpl Class Reference
Inheritance diagram for NdbDictionaryImpl:
Collaboration diagram for NdbDictionaryImpl:

Public Member Functions

 NdbDictionaryImpl (Ndb &ndb)
 NdbDictionaryImpl (Ndb &ndb, NdbDictionary::Dictionary &f)
bool setTransporter (class Ndb *ndb, class TransporterFacade *tf)
bool setTransporter (class TransporterFacade *tf)
int createTable (NdbTableImpl &t, NdbDictObjectImpl &)
int optimizeTable (const NdbTableImpl &t, NdbOptimizeTableHandleImpl &h)
int optimizeIndex (const NdbIndexImpl &index, NdbOptimizeIndexHandleImpl &h)
int createBlobTables (const NdbTableImpl &t)
bool supportedAlterTable (NdbTableImpl &old_impl, NdbTableImpl &impl)
int alterTable (NdbTableImpl &old_impl, NdbTableImpl &impl)
int dropTable (const char *name)
int dropTable (NdbTableImpl &)
int dropBlobTables (NdbTableImpl &)
int renameBlobTables (const NdbTableImpl &old_impl, const NdbTableImpl &impl)
int invalidateObject (NdbTableImpl &)
int removeCachedObject (NdbTableImpl &)
int createIndex (NdbIndexImpl &ix, bool offline)
int createIndex (NdbIndexImpl &ix, NdbTableImpl &tab, bool offline)
int dropIndex (const char *indexName, const char *tableName)
int dropIndex (NdbIndexImpl &, const char *tableName)
NdbTableImplgetIndexTable (NdbIndexImpl *index, NdbTableImpl *table)
int updateIndexStat (const NdbIndexImpl &, const NdbTableImpl &)
int updateIndexStat (Uint32 indexId, Uint32 indexVersion, Uint32 tableId)
int deleteIndexStat (const NdbIndexImpl &, const NdbTableImpl &)
int deleteIndexStat (Uint32 indexId, Uint32 indexVersion, Uint32 tableId)
int createEvent (NdbEventImpl &)
int createBlobEvents (NdbEventImpl &)
int dropEvent (const char *eventName, int force)
int dropEvent (const NdbEventImpl &)
int dropBlobEvents (const NdbEventImpl &)
int listEvents (List &list)
int executeSubscribeEvent (NdbEventOperationImpl &, Uint32 &buckets)
int stopSubscribeEvent (NdbEventOperationImpl &)
int forceGCPWait (int type)
int getRestartGCI (Uint32 *)
int listObjects (List &list, NdbDictionary::Object::Type type, bool fullyQualified)
int listIndexes (List &list, Uint32 indexId)
NdbTableImplgetTableGlobal (const char *tableName)
NdbIndexImplgetIndexGlobal (const char *indexName, NdbTableImpl &ndbtab)
NdbIndexImplgetIndexGlobal (const char *indexName, const char *tableName)
int alterTableGlobal (NdbTableImpl &orig_impl, NdbTableImpl &impl)
int dropTableGlobal (NdbTableImpl &)
int dropIndexGlobal (NdbIndexImpl &impl)
int releaseTableGlobal (const NdbTableImpl &impl, int invalidate)
int releaseIndexGlobal (const NdbIndexImpl &impl, int invalidate)
NdbTableImplgetTable (const char *tableName, void **data=0)
NdbTableImplgetBlobTable (const NdbTableImpl &, uint col_no)
NdbTableImplgetBlobTable (uint tab_id, uint col_no)
void putTable (NdbTableImpl *impl)
int getBlobTables (NdbTableImpl &)
Ndb_local_table_infoget_local_table_info (const BaseString &internalTableName)
NdbIndexImplgetIndex (const char *indexName, const char *tableName)
NdbIndexImplgetIndex (const char *indexName, const NdbTableImpl &prim)
NdbEventImplgetEvent (const char *eventName, NdbTableImpl *=NULL)
NdbEventImplgetBlobEvent (const NdbEventImpl &ev, uint col_no)
NdbEventImplgetEventImpl (const char *internalName)
int createDatafile (const NdbDatafileImpl &, bool force, NdbDictObjectImpl *)
int dropDatafile (const NdbDatafileImpl &)
int createUndofile (const NdbUndofileImpl &, bool force, NdbDictObjectImpl *)
int dropUndofile (const NdbUndofileImpl &)
int createTablespace (const NdbTablespaceImpl &, NdbDictObjectImpl *)
int dropTablespace (const NdbTablespaceImpl &)
int createLogfileGroup (const NdbLogfileGroupImpl &, NdbDictObjectImpl *)
int dropLogfileGroup (const NdbLogfileGroupImpl &)
int beginSchemaTrans (bool retry711=true)
int endSchemaTrans (Uint32 flags)
bool hasSchemaTrans () const
const NdbErrorgetNdbError () const
int initialiseColumnData (bool isIndex, Uint32 flags, const NdbDictionary::RecordSpecification *recSpec, Uint32 colNum, NdbRecord *rec)
NdbIndexImplgetIndexImpl (const char *externalName, const BaseString &internalName, NdbTableImpl &tab, NdbTableImpl &prim)
NdbIndexImplgetIndexImpl (const char *name, const BaseString &internalName)
int createDefaultNdbRecord (NdbTableImpl *tableOrIndex, const NdbTableImpl *baseTableForIndex)
bool validateRecordSpec (const NdbDictionary::RecordSpecification *recSpec, Uint32 length, Uint32 flags)
NdbRecordcreateRecord (const NdbTableImpl *table, const NdbDictionary::RecordSpecification *recSpec, Uint32 length, Uint32 elemSize, Uint32 flags, bool defaultRecord)
void releaseRecord_impl (NdbRecord *rec)
- Public Member Functions inherited from NdbDictionary::Dictionary
const TablegetTable (const char *name, void **data) const
void set_local_table_data_size (unsigned sz)
const IndexgetIndexGlobal (const char *indexName, const Table &ndbtab) const
const IndexgetIndexGlobal (const char *indexName, const char *tableName) const
const TablegetTableGlobal (const char *tableName) const
int alterTableGlobal (const Table &f, const Table &t)
int dropTableGlobal (const Table &ndbtab)
int dropIndexGlobal (const Index &index)
int removeIndexGlobal (const Index &ndbidx, int invalidate) const
int removeTableGlobal (const Table &ndbtab, int invalidate) const
void invalidateDbGlobal (const char *dbname)
NdbRecordcreateRecord (const Table *table, const RecordSpecification *recSpec, Uint32 length, Uint32 elemSize, Uint32 flags=0)
NdbRecordcreateRecord (const Index *index, const Table *table, const RecordSpecification *recSpec, Uint32 length, Uint32 elemSize, Uint32 flags=0)
NdbRecordcreateRecord (const Index *index, const RecordSpecification *recSpec, Uint32 length, Uint32 elemSize, Uint32 flags=0)
void releaseRecord (NdbRecord *rec)
int listObjects (List &list, Object::Type type=Object::TypeUndefined)
int listObjects (List &list, Object::Type type=Object::TypeUndefined) const
int listObjects (List &list, Object::Type type, bool fullyQualified) const
int getWarningFlags () const
const TablegetTable (const char *name) const
const TablegetBlobTable (const Table *, const char *col_name)
const TablegetBlobTable (const Table *, Uint32 col_no)
void putTable (const Table *table)
const IndexgetIndex (const char *indexName, const char *tableName) const
int listIndexes (List &list, const char *tableName)
int listIndexes (List &list, const char *tableName) const
int listIndexes (List &list, const Table &table) const
int createEvent (const Event &event)
const EventgetEvent (const char *eventName)
int listEvents (List &list) const
int createTable (const Table &table)
int createTable (const Table &table, ObjectId *objid)
int optimizeTable (const Table &t, OptimizeTableHandle &h)
int optimizeIndex (const Index &ind, OptimizeIndexHandle &h)
int dropTable (Table &table)
bool supportedAlterTable (const Table &f, const Table &t)
int alterTable (const Table &f, const Table &t)
void invalidateTable (const char *name)
void removeCachedTable (const char *table)
void removeCachedIndex (const char *index, const char *table)
int createIndex (const Index &index, bool offline=false)
int createIndex (const Index &index, const Table &table, bool offline=false)
int updateIndexStat (const Index &, const Table &)
int deleteIndexStat (const Index &, const Table &)
void removeCachedTable (const Table *table)
void removeCachedIndex (const Index *index)
void invalidateTable (const Table *table)
void invalidateIndex (const char *indexName, const char *tableName)
void invalidateIndex (const Index *index)
int forceGCPWait ()
int createHashMap (const HashMap &, ObjectId *=0)
int getHashMap (HashMap &dst, const char *name)
int getHashMap (HashMap &dst, const Table *table)
int getDefaultHashMap (HashMap &dst, Uint32 fragments)
int initDefaultHashMap (HashMap &dst, Uint32 fragments)
int prepareHashMap (const Table &oldTable, Table &newTable)
int createLogfileGroup (const LogfileGroup &, ObjectId *=0)
int dropLogfileGroup (const LogfileGroup &)
LogfileGroup getLogfileGroup (const char *name)
int createTablespace (const Tablespace &, ObjectId *=0)
int dropTablespace (const Tablespace &)
Tablespace getTablespace (const char *name)
Tablespace getTablespace (Uint32 tablespaceId)
int createDatafile (const Datafile &, bool overwrite_existing=false, ObjectId *=0)
int dropDatafile (const Datafile &)
Datafile getDatafile (Uint32 node, const char *path)
int createUndofile (const Undofile &, bool overwrite_existing=false, ObjectId *=0)
int dropUndofile (const Undofile &)
Undofile getUndofile (Uint32 node, const char *path)
int beginSchemaTrans ()

Static Public Member Functions

static NdbDictionaryImplgetImpl (NdbDictionary::Dictionary &t)
static const NdbDictionaryImplgetImpl (const NdbDictionary::Dictionary &t)
static NdbDictionary::RecordType getRecordType (const NdbRecord *record)
static const char * getRecordTableName (const NdbRecord *record)
static const char * getRecordIndexName (const NdbRecord *record)
static bool getNextAttrIdFrom (const NdbRecord *record, Uint32 startAttrId, Uint32 &nextAttrId)
static bool getOffset (const NdbRecord *record, Uint32 attrId, Uint32 &offset)
static bool getNullBitOffset (const NdbRecord *record, Uint32 attrId, Uint32 &nullbit_byte_offset, Uint32 &nullbit_bit_in_byte)
static const char * getValuePtr (const NdbRecord *record, const char *row, Uint32 attrId)
static char * getValuePtr (const NdbRecord *record, char *row, Uint32 attrId)
static bool isNull (const NdbRecord *record, const char *row, Uint32 attrId)
static int setNull (const NdbRecord *record, char *row, Uint32 attrId, bool value)
static Uint32 getRecordRowLength (const NdbRecord *record)

Public Attributes

NdbDictInterface::Tx m_tx
NdbError m_error
int m_warn
Uint32 m_local_table_data_size
LocalDictCache m_localHash
GlobalDictCachem_globalHash
NdbDictionary::Dictionarym_facade
NdbDictInterface m_receiver
Ndbm_ndb

Static Public Attributes

static const Uint32 m_emptyMask [MAXNROFATTRIBUTESINWORDS] = {0,0,0,0}

Additional Inherited Members

- Public Types inherited from NdbDictionary::Dictionary
enum  {
  WarnUndobufferRoundUp = 0x1, WarnUndofileRoundDown = 0x2, WarnExtentRoundUp = 0x4, WarnDatafileRoundDown = 0x8,
  WarnDatafileRoundUp = 0x10
}
enum  SchemaTransFlag { SchemaTransAbort = 1, SchemaTransBackground = 2 }
- Protected Member Functions inherited from NdbDictionary::Dictionary
 Dictionary (Ndb &ndb)

Detailed Description

Definition at line 826 of file NdbDictionaryImpl.hpp.

Member Function Documentation

NdbRecord * NdbDictionaryImpl::createRecord ( const NdbTableImpl table,
const NdbDictionary::RecordSpecification recSpec,
Uint32  length,
Uint32  elemSize,
Uint32  flags,
bool  defaultRecord 
)

createRecord Create an NdbRecord object using the table implementation and RecordSpecification array passed. The table pointer may be a proper table, or the underlying table of an Index. In any case, it is assumed that is is a global table object, which may be safely shared between multiple threads. The responsibility for ensuring that it is a global object rests with the caller

Definition at line 6869 of file NdbDictionaryImpl.cpp.

int NdbDictionaryImpl::dropEvent ( const char *  eventName,
int  force 
)

Drop event with given name

Parameters
eventNameName of event to drop.
Returns
0 if successful otherwise -1.

Reimplemented from NdbDictionary::Dictionary.

Definition at line 5221 of file NdbDictionaryImpl.cpp.

Here is the call graph for this function:

int NdbDictionaryImpl::dropIndex ( const char *  indexName,
const char *  tableName 
)

Drop index with given name

Parameters
indexNameName of index to drop.
tableNameName of table that index belongs to.
Returns
0 if successful otherwise -1.

Reimplemented from NdbDictionary::Dictionary.

Definition at line 4441 of file NdbDictionaryImpl.cpp.

int NdbDictionaryImpl::dropTable ( const char *  name)

Drop table given table name

Parameters
nameName of table to drop
Returns
0 if successful otherwise -1.

Reimplemented from NdbDictionary::Dictionary.

Definition at line 3882 of file NdbDictionaryImpl.cpp.

int NdbDictionaryImpl::endSchemaTrans ( Uint32  flags)

End schema transaction, with commit or with abort. Combines execute and close which do not exist separately. May be called and succeeds even if no transaction is active.

Note
Like any method, may overwrite current error code. First save error code from any failed operation.
Parameters
flagsBitmask of options. Default 0 commits the transaction. Including option 1 aborts the transaction. See SchemaTransFlag for others.
Returns
0 on success, -1 on error

Reimplemented from NdbDictionary::Dictionary.

Definition at line 8348 of file NdbDictionaryImpl.cpp.

const NdbError & NdbDictionaryImpl::getNdbError ( ) const

Get the latest error

Returns
Error object.

Reimplemented from NdbDictionary::Dictionary.

Definition at line 45 of file Ndberr.cpp.

Here is the caller graph for this function:

int NdbDictionaryImpl::getRestartGCI ( Uint32 *  gci)

Get restart gci

Reimplemented from NdbDictionary::Dictionary.

Definition at line 6121 of file NdbDictionaryImpl.cpp.

bool NdbDictionaryImpl::hasSchemaTrans ( ) const
inline

Check if a schema transaction exists currently.

Reimplemented from NdbDictionary::Dictionary.

Definition at line 918 of file NdbDictionaryImpl.hpp.

int NdbDictionaryImpl::listEvents ( List list)

List defined events

Parameters
listList of events returned in the dictionary
Returns
0 if successful otherwise -1.

Reimplemented from NdbDictionary::Dictionary.

Definition at line 5517 of file NdbDictionaryImpl.cpp.

Here is the call graph for this function:

Member Data Documentation

const Uint32 NdbDictionaryImpl::m_emptyMask = {0,0,0,0}
static

NdbDictionaryImpl

Definition at line 995 of file NdbDictionaryImpl.hpp.


The documentation for this class was generated from the following files: