[Django]-Django / MySQL: How to do Autonomous Transactions (commit only sub-set of queries)?

1👍

Interesting subject, apparently there’s no such thing in mysql but a guy recommends to use (for your log table problem) a myisam table, so since it is outside transactions, the data gets posted anyway.


I am adding a second answer since I just figured out this alternative: what you could do is to handle the log transaction from another connection with another user in your database.

Mysql handles the connection pool per user so it will never use the same connection for the main operations and the log operations, allowing you to commit the logs connection independently.

👤Sebas

Leave a comment