Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual Dictionary::endSchemaTrans()

Description.  Ends a schema transaction begun with beginSchemaTrans(); causes operations to be processed and either committed, or aborted and rolled back. This method combines transaction execution and closing; separate methods for these tasks are not required (or implemented). This method may be called successfully even if no schema transaction is currently active.


As with many other NDB API methods, it is entirely possible for endSchemaTrans() to overwrite any current error code. For this reason, you should first check for and save any error code that may have resulted from a previous, failed operation.


int endSchemaTrans
      Uint32 flags = 0

Parameters.  The flags determines how the completed transaction is handled. The default is 0, which causes the transaction to be committed.

Dictionary::SchemaTransFlag.  You can also use with endSchemaTrans() either of the SchemaTransFlag values shown here:

  • SchemaTransAbort (= 1): Causes the transaction to be aborted

  • SchemaTransBackground (= 2): Causes the transaction to execute in the background; the result is written to the cluster log, while the application continues without waiting for a response.

Return value.  Returns 0 on success; in the event of an error, returns -1 and sets an NdbError error code.

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.