mysql_commit — Commits the currenct transaction

my_bool mysql_commit(MYSQL * mysql);

Commits the current transaction for the specified database connection.

Parameters

mysql

A mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().

Return value

Zero on success, nonzero if an error occured.

[Note]

Executing mysql_commit() will not affected the behaviour of autocommit. This means, any upsert statements following mysql_commit() will be rolled back, when the connection gets closed

See also

mysql_rollback()