Presume I have a pretty complex database transaction being processed, but I need to execute a single write command in the middle of it, and this one should be excluded from the transaction, so it should be never rolled-back.
What is the right way to achieve this result?
Please notice, the table concerned must be an InnoDB table.
Can’t you just break the database transaction into two and execute your write command on the basis your first half executes successfully, then continue on with the remainder of your transaction?
Not really, as these are “nested” entries: only after a record in a “parent” table is created - a respected “child” record in a related table can be created, etc.