Documentation Home
MySQL 9.4 C API Developer Guide
Download this Manual
PDF (US Ltr) - 1.4Mb
PDF (A4) - 1.4Mb


5.4.7 mysql_commit()

boolmysql_commit(MYSQL *mysql)

Description

Commits the current transaction.

The action of this function is subject to the value of thecompletion_type system variable. In particular, if the value ofcompletion_type isRELEASE (or 2), the server performs a release after terminating a transaction and closes the client connection. Callmysql_close() from the client program to close the connection from the client side.

Return Values

Zero for success. Nonzero if an error occurred.

Errors

None.