I am utilizing Mysql.Connector in my python code to do multiple inserts/updates to a DB. After performing all of the inserts/updates + other processing, I determine if it was successful or not and then perform either a db.commit() or a db.rollback(). I'm concerned about what would happen in a couple different situations. If the process is unexpectedly terminated. e.g kill -9 program.py or if the host|container that the program is running in is shutdown.
The MySQL server will roll back uncommitted transactions if the connection is terminated.
What happens to my transaction when Mysql.Connector for Python is unexpectedly terminated?