PDF (US Ltr)
- 5.2Mb
PDF (A4)
- 5.2Mb
HTML Download (TGZ)
- 2.7Mb
HTML Download (Zip)
- 2.7Mb
This property returns True
or
False
to indicate whether a transaction is
active for the connection. The value is True
regardless of whether you start a transaction using the
start_transaction()
API call or by directly executing an SQL statement such as
START
TRANSACTION
or
BEGIN
.
>>> cnx.start_transaction()
>>> cnx.in_transaction
True
>>> cnx.commit()
>>> cnx.in_transaction
False
in_transaction
was added in MySQL Connector/Python 1.1.0.