Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.37.37 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.


User Comments
Sign Up Login You must be logged in to post a comment.