Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

2.3.29 The Undofile Class

This section provides information about the Undofile class.

Undofile Class Overview

Parent class

NdbDictionary

Child classes

None

Description

The Undofile class models an NDB Cluster Disk Data undo file, which stores data used for rolling back transactions.

Only unindexed column data can be stored on disk. Indexes and indexes columns are always stored in memory.

Methods

The following table lists the public methods of this class and the purpose or use of each method:

Table 2.81 Undofile class methods and descriptions

Name Description
Undofile() Class constructor
~Undofile() Virtual destructor
getFileNo() Removed in NDB 7.5.0 (Bug #47960, Bug #11756088)
getLogfileGroup() Gets the name of the log file group to which the undo file belongs
getLogfileGroupId() Gets the ID of the log file group to which the undo file belongs
getNode() Removed in NDB 7.5.0 (Bug #47960, Bug #11756088)
getObjectId() Gets the undo file's object ID
getObjectStatus() Gets the undo file's Status
getObjectVersion() Gets the undo file's object version
getPath() Gets the undo file's file system path
getSize() Gets the size of the undo file
setLogfileGroup() Sets the undo file's log file group using the name of the log file group or a reference to the corresponding LogfileGroup object
setNode() Removed in NDB 7.5.0 (Bug #47960, Bug #11756088)
setPath() Sets the file system path for the undo file
setSize() Sets the undo file's size

Types

The Undofile class defines no public types.

Undofile Constructor

Description

The class constructor can be used to create a new Undofile instance, or to copy an existing one.

Signatures

Create a new instance:

Undofile
    (
      void
    )

Copy constructor:

Undofile
    (
      const Undofile& undoFile
    )
Parameters

New instance: None. The copy constructor takes a single argument—a reference to the Undofile object to be copied.

Return value

An Undofile object.

Destructor.  The class defines a virtual destructor which takes no arguments and has the return type void.

Undofile::getFileNo() (OBSOLETE)

Description

This method did not work as intended, and was removed in NDB 7.5.0 (Bug #47960, Bug #11756088).

Signature
Uint32 getFileNo
    (
      void
    ) const
Parameters

None.

Return value

The number of the undo file, as an unsigned 32-bit integer.

Undofile::getLogfileGroup()

Description

This method retrieves the name of the log file group to which the undo file belongs.

Signature
const char* getLogfileGroup
    (
      void
    ) const
Parameters

None.

Return value

The name of the log file group, a string value (as a character pointer).

Undofile::getLogfileGroupId()

Description

This method retrieves the ID of the log file group to which the undo file belongs.

It is also possible to obtain the name of the log file group directly. See Undofile::getLogfileGroup()

Signature
Uint32 getLogfileGroupId
    (
      void
    ) const
Parameters

None.

Return value

The ID of the log file group, as an unsigned 32-bit integer.

Undofile::getNode() (OBSOLETE)

Description

This method did not work as intended, and was removed in NDB 7.5.0 (Bug #47960, Bug #11756088).

Signature
Uint32 getNode
    (
      void
    ) const
Parameters

None.

Return value

The node ID, as an unsigned 32-bit integer.

Undofile::getObjectId()

Description

This method retrieves the undo file's object ID.

Signature
virtual int getObjectId
    (
      void
    ) const
Parameters

None.

Return value

The object ID, as an integer.

Undofile::getObjectStatus()

Description

This method is used to retrieve the object status of an undo file.

Signature
virtual Object::Status getObjectStatus
    (
      void
    ) const
Parameters

None.

Return value

An Object::Status value.

Undofile::getObjectVersion()

Description

This method gets the undo file's object version (see NDB Schema Object Versions).

Signature
virtual int getObjectVersion
  (
    void
  ) const
Parameters

None.

Return value

The object version, as an integer.

Undofile::getPath()

Description

This method retrieves the path matching the location of the undo file on the data node's file system.

Signature
const char* getPath
    (
      void
    ) const
Parameters

None.

Return value

The file system path, a string (as a character pointer).

Undofile::getSize()

Description

This method gets the size of the undo file in bytes.

Signature
Uint64 getSize
    (
      void
    ) const
Parameters

None.

Return value

The size in bytes of the undo file, as an unsigned 64-bit integer.

Undofile::setLogfileGroup()

Description

Given either a name or an object reference to a log file group, the setLogfileGroup() method assigns the undo file to that log file group.

Signature

Using a log file group name:

void setLogfileGroup
    (
      const char* name
    )

Using a reference to an instance of LogfileGroup:

void setLogfileGroup
    (
      const class LogfileGroup & logfileGroup
    )
Parameters

The name of the log file group (a character pointer), or a reference to a LogfileGroup instance.

Return value

None.

Undofile::setNode() (OBSOLETE)

Description

This method did not work as intended, and was removed in NDB 7.5.0 (Bug #47960, Bug #11756088).

Signature
 void setNode
    (
      Uint32 nodeId
    )
Parameters

The nodeId of the data node where the undo file is to be placed; this is an unsigned 32-bit integer.

Return value

None.

Undofile::setPath()

Description

This method is used to set the file system path of the undo file on the data node where it resides.

Signature
void setPath
    (
      const char* path
    )
Parameters

The desired path to the undo file.

Return value

None.

Undofile::setSize()

Description

Sets the size of the undo file in bytes.

Signature
void setSize
    (
      Uint64 size
    )
Parameters

The intended size of the undo file in bytes, as an unsigned 64-bit integer.

Return value

None.