Documentation Home
MySQL NDB Cluster API Developer Guide
Download this Manual

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

Note

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.

Signature. 

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
Sign Up Login You must be logged in to post a comment.