MCPcopy Create free account
hub / github.com/mysql/mysql-connector-python / MySQL_commit

Function MySQL_commit

mysql-connector-python/src/mysql_capi.c:1087–1103  ·  view source on GitHub ↗

Commit the current transaction. Commit the current transaction. Raises MySQLInterfaceError on errors. @param self MySQL instance @return PyNone or NULL. @retval PyNone OK @retval NULL Exception. */

Source from the content-addressed store, hash-verified

1085 @retval NULL Exception.
1086*/
1087PyObject *
1088MySQL_commit(MySQL *self)
1089{
1090 int res = 0;
1091
1092 IS_CONNECTED(self);
1093
1094 Py_BEGIN_ALLOW_THREADS
1095 res = mysql_commit(&self->session);
1096 Py_END_ALLOW_THREADS
1097 if (res) {
1098 raise_with_session(&self->session, NULL);
1099 return NULL;
1100 }
1101
1102 Py_RETURN_NONE;
1103}
1104
1105/**
1106 Connect with a MySQL server.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…