2.3.36.2 Table Methods

2.3.36.2.1 Table Constructor
2.3.36.2.2 Table::addColumn()
2.3.36.2.3 Table::aggregate()
2.3.36.2.4 Table::equal()
2.3.36.2.5 Table::getDefaultNoPartitionsFlag()
2.3.36.2.6 Table::getFragmentData()
2.3.36.2.7 Table::getFragmentDataLen()
2.3.36.2.8 Table::getFrmData()
2.3.36.2.9 Table::getFrmLength()
2.3.36.2.10 Table::getColumn()
2.3.36.2.11 Table::getFragmentCount()
2.3.36.2.12 Table::getFragmentNodes()
2.3.36.2.13 Table::getFragmentType()
2.3.36.2.14 Table::getHashMap()
2.3.36.2.15 Table::getKValue()
2.3.36.2.16 Table::getLinearFlag()
2.3.36.2.17 Table::getLogging()
2.3.36.2.18 Table::getMaxLoadFactor()
2.3.36.2.19 Table::getMaxRows()
2.3.36.2.20 Table::getMinLoadFactor()
2.3.36.2.21 Table:getName()
2.3.36.2.22 Table::getNoOfCOlumns()
2.3.36.2.23 Table::getNoOfPrimaryKeys()
2.3.36.2.24 Table::getObjectId()
2.3.36.2.25 Table::getObjectStatus()
2.3.36.2.26 Table::getObjectType()
2.3.36.2.27 Table::getObjectVersion()
2.3.36.2.28 Table::getPartitionId()
2.3.36.2.29 Table::getPrimaryKey()
2.3.36.2.30 Table::getRangeListData()
2.3.36.2.31 Table::getRangeListDataLen()
2.3.36.2.32 Table::getRowChecksumIndicator()
2.3.36.2.33 Table::getRowGCIIndicator()
2.3.36.2.34 Table::getTableId()
2.3.36.2.35 Table::getTablespace()
2.3.36.2.36 Table::getTablespaceData()
2.3.36.2.37 Table::getTablespaceDataLen()
2.3.36.2.38 Table::getTablespaceNames()
2.3.36.2.39 Table::getTablespaceNamesLen()
2.3.36.2.40 Table::hasDefaultValues()
2.3.36.2.41 Table::setDefaultNoPartitionsFlag()
2.3.36.2.42 Table::setFragmentCount()
2.3.36.2.43 Table::setFragmentData()
2.3.36.2.44 Table::setFragmentType()
2.3.36.2.45 Table::setFrm()
2.3.36.2.46 Table::setHashMap()
2.3.36.2.47 Table::setKValue()
2.3.36.2.48 Table::setLinearFlag()
2.3.36.2.49 Table::setLogging()
2.3.36.2.50 Table::setMaxLoadFactor()
2.3.36.2.51 Table::setMaxRows()
2.3.36.2.52 Table::setMinLoadFactor()
2.3.36.2.53 Table::setName()
2.3.36.2.54 Table::setObjectType()
2.3.36.2.55 Table::setRangeListData()
2.3.36.2.56 Table::setRowChecksumIndicator()
2.3.36.2.57 Table::setRowGCIIndicator()
2.3.36.2.58 Table::setStatusInvalid()
2.3.36.2.59 Table::setTablespace()
2.3.36.2.60 Table::setTablespaceData()
2.3.36.2.61 Table::setTablespaceNames()
2.3.36.2.62 Table::validate()

Abstract

This section discusses the public methods of the Table class.

Note

The assignment (=) operator is overloaded for this class, so that it always performs a deep copy.

Warning

As with other database objects, Table object creation and attribute changes to existing tables done using the NDB API are not visible from MySQL. For example, if you add a new column to a table using Table::addColumn(), MySQL will not see the new column. The only exception to this rule with regard to tables is that you can change the name of an existing table using Table::setName().

2.3.36.2.1 Table Constructor

Description.  Creates a Table instance. There are two version of the Table constructor, one for creating a new instance, and a copy constructor.

Important

Tables created in the NDB API using this method are not accessible from MySQL.

Signature.  New instance:

Table
    (
      const char* name = ""
    )

Copy constructor:

Table
    (
      const Table& table
    )

Parameters.  For a new instance, the name of the table to be created. For a copy, a reference to the table to be copied.

Return value.  A Table object.

Destructor. 

virtual ~Table()

2.3.36.2.2 Table::addColumn()

Description.  Adds a column to a table.

Signature. 

void addColumn
    (
      const Column& column
    )

Parameters.  A reference to the column which is to be added to the table.

Return value.  None; however, it does create a copy of the original Column object.

2.3.36.2.3 Table::aggregate()

Description.  This method computes aggregate data for the table. It is required in order for aggregate methods such as getNoOfPrimaryKeys() to work properly before the table has been created and retrieved via getTableId().

Note

This method was added in MySQL 5.1.12 (see Bug #21690).

Signature. 

int aggregate
    (
      struct NdbError& error
    )

Parameters.  A reference to an NdbError object.

Return value.  An integer, whose value is 0 on success, and -1 if the table is in an inconsistent state. In the latter case, the error is also set.

2.3.36.2.4 Table::equal()

Description.  This method is used to compare one instance of Table with another.

Signature. 

bool equal
    (
      const Table& table
    ) const

Parameters.  A reference to the Table object with which the current instance is to be compared.

Return value.  true if the two tables are the same, otherwise false.

2.3.36.2.5 Table::getDefaultNoPartitionsFlag()

Description.  This method is used to find out whether the default number of partitions is used for the table.

Signature. 

Uint32 getDefaultNoPartitionsFlag
    (
      void
    ) const

Parameters.  None.

Return value.  A 32-bit unsigned integer.

2.3.36.2.6 Table::getFragmentData()

Description.  This method gets the table's fragment data (ID, state, and node group).

Signature. 

const void* getFragmentData
    (
      void
    ) const

Parameters.  None.

Return value.  A pointer to the data to be read.

2.3.36.2.7 Table::getFragmentDataLen()

Description.  Gets the length of the table fragment data to be read, in bytes.

Signature. 

Uint32 getFragmentDataLen
    (
      void
    ) const

Parameters.  None.

Return value.  The number of bytes to be read, as an unsigned 32-bit integer.

2.3.36.2.8 Table::getFrmData()

Description.  The the data from the .FRM file associated with the table.

Signature. 

const void* getFrmData
    (
      void
    ) const

Parameters.  None.

Return value.  A pointer to the .FRM data.

2.3.36.2.9 Table::getFrmLength()

Description.  Gets the length of the table's .FRM file data, in bytes.

Signature. 

Uint32 getFrmLength
    (
      void
    ) const

Parameters.  None.

Return value.  The length of the .FRM file data (an unsigned 32-bit integer).

2.3.36.2.10 Table::getColumn()

Description.  This method is used to obtain a column definition, given either the index or the name of the column.

Signature.  This method can be invoked using either the column ID or column name, as shown here:

Column* getColumn
    (
      const int AttributeId
    )

Column* getColumn
    (
      const char* name
    )

Parameters.  Either of: the column's index in the table (as it would be returned by the column's getColumnNo() method), or the name of the column.

Return value.  A pointer to the column with the specified index or name. If there is no such column, then this method returns NULL.

2.3.36.2.11 Table::getFragmentCount()

Description.  This method gets the number of fragments in the table.

Signature. 

Uint32 getFragmentCount
    (
      void
    ) const

Parameters.  None.

Return value.  The number of table fragments, as a 32-bit unsigned integer.

2.3.36.2.12 Table::getFragmentNodes()

Description.  This method retrieves a list of nodes storing a given fragment.

Signature. 

Uint32 getFragmentNodes
    (
      Uint32 fragmentId,
      Uint32* nodeIdArrayPtr,
      Uint32 arraySize
    ) const

Parameters.  This method takes the following three parameters:

  • fragmentId: The ID of the desired fragment.

  • nodeIdArrayPtr: Pointer to an array of node IDs of the nodes containing this fragment.

    Note

    Normally, the primary fragment is entry 0 in this array.

  • arraySize: The size of the array containing the node IDs. If this is less than the number of fragments, then only the first arraySize entries are written to this array.

Return value.  A return value of 0 indicates an error; otherwise, this is the number of table fragments, as a 32-bit unsigned integer.

This method was added in MySQL Cluster NDB 6.2.19, MySQL Cluster NDB 6.3.33, MySQL Cluster NDB 7.0.14, and MySQL Cluster NDB 7.1.2.

2.3.36.2.13 Table::getFragmentType()

Description.  This method gets the table's fragmentation type.

Signature. 

FragmentType getFragmentType
    (
      void
    ) const

Parameters.  None.

Return value.  A FragmentType value, as defined in Section 2.3.30.1.1, “The Object::FragmentType Type”.

2.3.36.2.14 Table::getHashMap()

Description.  Get the hash map used for this table. Introduced in MySQL Cluster NDB 7.1.23 and MySQL Cluster NDB 7.2.7.

Signature. 

bool getHashMap
    (
      Uint32* id = 0, 
      Uint32* version = 0
    ) const

Parameters.  The table ID and version.

Return value.  True if the table has a hash map, otherwise false.

2.3.36.2.15 Table::getKValue()

Description.  This method gets the KValue, a hashing parameter which is currently restricted to the value 6. In a future release, it may become feasible to set this parameter to other values.

Signature. 

int getKValue
    (
      void
    ) const

Parameters.  None.

Return value.  An integer (currently always 6).

2.3.36.2.16 Table::getLinearFlag()

Description.  This method retrieves the value of the table's linear hashing flag.

Signature. 

bool getLinearFlag
    (
      void
    ) const

Parameters.  None.

Return value.  true if the flag is set, and false if it is not.

2.3.36.2.17 Table::getLogging()

Description.  This class is used to check whether a table is logged to disk—that is, whether it is permanent or temporary.

Signature. 

bool getLogging
    (
      void
    ) const

Parameters.  None.

Return value.  Returns a Boolean value. If this method returns true, then full checkpointing and logging are done on the table. If false, then the table is a temporary table and is not logged to disk; in the event of a system restart the table still exists and retains its definition, but it will be empty. The default logging value is true.

2.3.36.2.18 Table::getMaxLoadFactor()

Description.  This method returns the load factor (a hashing parameter) when splitting of the containers in the local hash tables begins.

Signature. 

int getMaxLoadFactor
    (
      void
    ) const

Parameters.  None.

Return value.  An integer whose maximum value is 100. When the maximum value is returned, this means that memory usage is optimised. Smaller values indicate that less data is stored in each container, which means that keys are found more quickly; however, this also consumes more memory.

2.3.36.2.19 Table::getMaxRows()

Description.  This method gets the maximum number of rows that the table can hold. This is used for calculating the number of partitions.

Signature. 

Uint64 getMaxRows
    (
      void
    ) const

Parameters.  None.

Return value.  The maximum number of table rows, as a 64-bit unsigned integer.

2.3.36.2.20 Table::getMinLoadFactor()

Description.  This method gets the value of the load factor when reduction of the hash table begins. This should always be less than the value returned by getMaxLoadFactor().

Signature. 

int getMinLoadFactor
    (
      void
    ) const

Parameters.  None.

Return value.  An integer (actually, a percentage expressed as an integer; see Section 2.3.36.2.18, “Table::getMaxLoadFactor()”).

2.3.36.2.21 Table:getName()

Description.  Gets the name of a table.

Signature. 

const char* getName
    (
      void
    ) const

Parameters.  None.

Return value.  The name of the table (a string).

2.3.36.2.22 Table::getNoOfCOlumns()

Description.  This method is used to obtain the number of columns in a table.

Signature. 

int getNoOfColumns
    (
      void
    ) const

Parameters.  None.

Return value.  An integer representing the number of columns in the table.

2.3.36.2.23 Table::getNoOfPrimaryKeys()

Description.  This method finds the number of primary key columns in the table.

Signature. 

int getNoOfPrimaryKeys
    (
      void
    ) const

Parameters.  None.

Return value.  An integer representing the number of primary key columns in the table.

2.3.36.2.24 Table::getObjectId()

Description.  This method gets the table's object ID.

Signature. 

virtual int getObjectId
    (
      void
    ) const

Parameters.  None.

Return value.  The object ID is returned as an integer.

2.3.36.2.25 Table::getObjectStatus()

Description.  This method gets the table's status—that is, its Object::Status.

Signature. 

virtual Object::Status getObjectStatus
    (
      void
    ) const

Parameters.  None.

Return value.  A Status value. For possible values, see Section 2.3.30.1.3, “The Object::Status Type”.

2.3.36.2.26 Table::getObjectType()

Description.  This method is used to obtain the table's type—that is, its Object::Type value

Signature. 

Object::Type getObjectType
    (
      void
    ) const

Parameters.  None.

Return value.  Returns a Type value. For possible values, see Section 2.3.30.1.5, “The Object::Type Type”.

2.3.36.2.27 Table::getObjectVersion()

Description.  This method gets the table's object version (see Section 8.6, “NDB Schema Object Versions”).

Signature. 

virtual int getObjectVersion
    (
      void
    ) const

Parameters.  None.

Return value.  The table's object version, as an integer.

2.3.36.2.28 Table::getPartitionId()

Description.  Gets a table partition ID given its hash value.

Signature. 

Uint32 getPartitionId
    (
      Uint32 hashvalue
    ) const

Parameters.  A hashvalue. Note that if the table has not actually been retrieved (using, for example, getTableId()), then the result is likely not to be accurate or useful.

Return value.  The identifier of the partition corresponding to the hashvalue.

2.3.36.2.29 Table::getPrimaryKey()

Description.  This method is used to obtain the name of the table's primary key.

Signature. 

const char* getPrimaryKey
    (
      int no
    ) const

Parameters.  None.

Return value.  The name of the primary key, a string (character pointer).

2.3.36.2.30 Table::getRangeListData()

Description.  This method gets the range or list data associated with the table.

Signature. 

const void* getRangeListData
    (
      void
    ) const

Parameters.  None.

Return value.  A pointer to the data.

2.3.36.2.31 Table::getRangeListDataLen()

Description.  This method gets the size of the table's range or list array.

Signature. 

Uint32 getRangeListDataLen
    (
      void
    ) const

Parameters.  None.

Return value.  The length of the list or range array, as an integer.

2.3.36.2.32 Table::getRowChecksumIndicator()

Description.  Check whether the row checksum indicator has been set.

Signature. 

bool getRowChecksumIndicator
    (
      void
    ) const

Parameters.  None.

Return value.  A true or false value.

2.3.36.2.33 Table::getRowGCIIndicator()

Description.  Checks whether the row GCI indicator has been set.

Signature. 

bool getRowGCIIndicator
    (
      void
    ) const

Parameters.  None.

Return value.  A true or false value.

2.3.36.2.34 Table::getTableId()

Description.  This method gets a table's ID.

Signature. 

int getTableId
    (
      void
    ) const

Parameters.  None.

Return value.  An integer.

2.3.36.2.35 Table::getTablespace()

Description.  This method is used in two ways: to obtain the name of the tablespace to which this table is assigned; to verify that a given tablespace is the one being used by this table.

Signatures.  To obtain the name of the tablespace, invoke without any arguments:

const char* getTablespace
    (
      void
    ) const

To determine whether the tablespace is the one indicated by the given ID and version, supply these as arguments, as shown here:

bool getTablespace
    (
      Uint32* id      = 0,
      Uint32* version = 0
    ) const

Parameters.  The number and types of parameters depend on how this method is being used:

  1. When used to obtain the name of the tablespace in use by the table, it is called without any arguments.

  2. When used to determine whether the given tablespace is the one being used by this table, then getTablespace() takes two parameters:

    • The tablespace id, given as a pointer to a 32-bit unsigned integer

    • The tablespace version, also given as a pointer to a 32-bit unsigned integer

    The default value for both id and version is 0.

Return value.  The return type depends on how the method is called.

  1. When getTablespace() is called without any arguments, it returns a Tablespace object instance.

  2. When called with two arguments, it returns true if the tablespace is the same as the one having the ID and version indicated; otherwise, it returns false.

2.3.36.2.36 Table::getTablespaceData()

Description.  This method gets the table's tablespace data (ID and version).

Signature. 

const void* getTablespaceData
    (
      void
    ) const

Parameters.  None.

Return value.  A pointer to the data.

2.3.36.2.37 Table::getTablespaceDataLen()

Description.  This method is used to get the length of the table's tablespace data.

Signature. 

Uint32 getTablespaceDataLen
    (
      void
    ) const

Parameters.  None.

Return value.  The length of the data, as a 32-bit unsigned integer.

2.3.36.2.38 Table::getTablespaceNames()

Description.  This method gets a pointer to the names of the tablespaces used in the table fragments.

Signature. 

const void* getTablespaceNames
    (
      void
    )

Parameters.  None.

Return value.  Returns a pointer to the tablespace name data.

2.3.36.2.39 Table::getTablespaceNamesLen()

Description.  This method gets the length of the tablespace name data returned by getTablespaceNames(). (See Section 2.3.36.2.38, “Table::getTablespaceNames()”.)

Signature. 

Uint32 getTablespaceNamesLen
    (
      void
    ) const

Parameters.  None.

Return value.  Returns the length of the name data, in bytes, as a 32-but unsigned integer.

2.3.36.2.40 Table::hasDefaultValues()

Description.  Used to determine whether the table has any columns that are defined with non-NULL default values.

This method was added in MySQL Cluster NDB 7.0.15 and MySQL Cluster NDB 7.1.4.

To read and write default column values, use Column::getDefaultValue() and Column::setDefaultValue().

Signature. 

bool hasDefaultValues
    (
      void
    ) const

Parameters.  None.

Return value.  Returns true if the table has any non-NULL columns with default values, otherwise false.

2.3.36.2.41 Table::setDefaultNoPartitionsFlag()

Description.  This method sets an indicator that determines whether the default number of partitions is used for the table.

Signature. 

void setDefaultNoPartitionsFlag
    (
      Uint32 indicator
    ) const

Parameters.  This method takes a single argument indicator, a 32-bit unsigned integer.

Return value.  None.

2.3.36.2.42 Table::setFragmentCount()

Description.  Sets the number of table fragments.

Signature. 

void setFragmentCount
    (
      Uint32 count
    )

Parameters.  count is the number of fragments to be used for the table.

Return value.  None.

2.3.36.2.43 Table::setFragmentData()

Description.  This method writes an array containing the following fragment information:

  • Fragment ID

  • Node group ID

  • Fragment State

Signature. 

void setFragmentData
    (
      const void* data,
      Uint32      len
    )

Parameters.  This method takes the following two parameters:

  • A pointer to the fragment data to be written

  • The length (len) of this data, in bytes, as a 32-bit unsigned integer

Return value.  None.

2.3.36.2.44 Table::setFragmentType()

Description.  This method sets the table's fragmentation type.

Signature. 

void setFragmentType
    (
      FragmentType fragmentType
    )

Parameters.  This method takes one argument, a FragmentType value. See Section 2.3.30.1.1, “The Object::FragmentType Type”, for more information.

Return value.  None.

2.3.36.2.45 Table::setFrm()

Description.  This method is used to write data to this table's .FRM file.

Signature. 

void setFrm
    (
      const void* data,
      Uint32      len
    )

Parameters.  This method takes the following two arguments:

  • A pointer to the data to be written.

  • The length (len) of the data.

Return value.  None.

2.3.36.2.46 Table::setHashMap()

Description.  Set a hash map for the table. Introduced in MySQL Cluster NDB 7.1.23 and MySQL Cluster NDB 7.2.7.

Signature. 

int setHashMap
    (
      const class HashMap &
    )

Parameters.  A reference to the hash map.

Return value.  Returns 0 on success; on failure, returns -1 and sets error.

2.3.36.2.47 Table::setKValue()

Description.  This sets the KValue, a hashing parameter.

Signature. 

void setKValue
    (
      int kValue
    )

Parameters.  kValue is an integer. Currently the only permitted value is 6. In a future version this may become a variable parameter.

Return value.  None.

2.3.36.2.48 Table::setLinearFlag()

Description. 

Signature. 

void setLinearFlag
    (
      Uint32 flag
    )

Parameters.  The flag is a 32-bit unsigned integer.

Return value.  None.

2.3.36.2.49 Table::setLogging()

Description.  Toggles the table's logging state. See Section 2.3.36.2.17, “Table::getLogging()”.

Signature. 

void setLogging
    (
      bool enable
    )

Parameters.  If enable is true, then logging for this table is enabled; if it is false, then logging is disabled.

Return value.  None.

2.3.36.2.50 Table::setMaxLoadFactor()

Description.  This method sets the maximum load factor when splitting the containers in the local hash tables.

Signature. 

void setMaxLoadFactor
    (
      int max
    )

Parameters.  This method takes a single parameter max, an integer representation of a percentage (for example, 45 represents 45 percent). For more information, see Section 2.3.36.2.18, “Table::getMaxLoadFactor()”.

Caution

This should never be greater than the minimum load factor.

Return value.  None.

2.3.36.2.51 Table::setMaxRows()

Description.  This method sets the maximum number of rows that can be held by the table.

Signature. 

void setMaxRows
    (
      Uint64 maxRows
    )

Parameters.  maxRows is a 64-bit unsigned integer that represents the maximum number of rows to be held in the table.

Return value.  None.

2.3.36.2.52 Table::setMinLoadFactor()

Description.  This method sets the minimum load factor when reduction of the hash table begins.

Signature. 

void setMinLoadFactor
    (
      int min
    )

Parameters.  This method takes a single parameter min, an integer representation of a percentage (for example, 45 represents 45 percent). For more information, see Section 2.3.36.2.20, “Table::getMinLoadFactor()”.

Return value.  None.

2.3.36.2.53 Table::setName()

Description.  This method sets the name of the table.

Note

This is the only set*() method of Table whose effects are visible to MySQL.

Signature. 

void setName
    (
      const char* name
    )

Parameters.  name is the (new) name of the table.

Return value.  None.

2.3.36.2.54 Table::setObjectType()

Description.  This method sets the table's object type.

Signature. 

void setObjectType
    (
      Object::Type type
    )

Parameters.  The desired object type. This must be one of the Type values listed in Section 2.3.30.1.5, “The Object::Type Type”.

Return value.  None.

2.3.36.2.55 Table::setRangeListData()

Description.  This method sets an array containing information that maps range values and list values to fragments. This is essentially a sorted map consisting of fragment-ID/value pairs. For range partitions there is one pair per fragment. For list partitions it could be any number of pairs, but at least as many pairs as there are fragments.

Signature. 

void setRangeListData
    (
      const void* data,
      Uint32      len
    )

Parameters.  This method requires the following two parameters:

  • A pointer to the range or list data containing the ID/value pairs

  • The length (len) of this data, as a 32-bit unsigned integer.

Return value.  None.

2.3.36.2.56 Table::setRowChecksumIndicator()

Description.  Set the row checksum indicator.

Signature. 

void setRowChecksumIndicator
    (
      bool value
    ) const

Parameters.  A true/false value.

Return value.  None.

2.3.36.2.57 Table::setRowGCIIndicator()

Description.  Sets the row GCI indicator.

Signature. 

void setRowGCIIndicator
    (
      bool value
    ) const

Parameters.  A true/false value.

Return value.  None.

2.3.36.2.58 Table::setStatusInvalid()

Description.  Forces the table's status to be invalidated.

Signature. 

void setStatusInvalid
    (
      void
    ) const

Parameters.  None.

Return value.  None.

2.3.36.2.59 Table::setTablespace()

Description.  This method sets the tablespace for the table.

Signatures.  Using the name of the tablespace:

void setTablespace
    (
      const char* name
    )

Using a Tablespace object:

void setTablespace
    (
      const class Tablespace& tablespace
    )

Parameters.  This method can be called with a single argument, which can be of either one of these two types:

  1. The name of the tablespace (a string).

  2. A reference to an existing Tablespace instance.

See Section 2.3.37, “The Tablespace Class”.

Return value.  None.

2.3.36.2.60 Table::setTablespaceData()

Description.  This method sets the tablespace information for each fragment, and includes a tablespace ID and a tablespace version.

Signature. 

void setTablespaceData
    (
      const void* data,
      Uint32      len
    )

Parameters.  This method requires the following two parameters:

  • A pointer to the data containing the tablespace ID and version

  • The length (len) of this data, as a 32-bit unsigned integer.

Return value.  None.

2.3.36.2.61 Table::setTablespaceNames()

Description.  Sets the names of the tablespaces used by the table fragments.

Signature. 

void setTablespaceNames
    (
      const void* data
      Uint32      len
    )

Parameters.  This method takes the following two parameters:

  • A pointer to the tablespace names data

  • The length (len) of the names data, as a 32-bit unsigned integer.

Return value.  None.

2.3.36.2.62 Table::validate()

Description.  This method validates the definition for a new table prior to its being created, and executes the Table::aggregate() method, as well as performing additional checks. validate() is called automatically when a table is created or retrieved. For this reason, it is usually not necessary to call aggregate() or validate() directly.

Warning

Even after the validate() method is called, there may still exist errors which can be detected only by the NDB kernel when the table is actually created.

Note

This method was added in MySQL 5.1.12 (see Bug #21690).

Signature. 

int validate
    (
      struct NdbError& error
    )

Parameters.  A reference to an NdbError object.

Return value.  An integer, whose value is 0 on success, and -1 if the table is in an inconsistent state. In the latter case, the error is also set.