Inserting unrelated data while a transaction is occuring I'm thinking about implementing transactions to my app to help with consistency issues. I'm using MySQL.

I'm wondering what might happen if while inserting several rows as a transaction, the server will also need to insert a single row, that is completely unrelated.

To be more clear, I will present a scenario (hypothetical) of a store:

The application server in running nodejs, and connected to a MySQL server. It then receives a request to add a stock of 50 new computers, and needs to insert the 50 rows representing their SN to a table stock, plus a row in another table shipments, all 51 rows must be inserted in an atomic manner (all or none). While this is happening, the same nodejs server receives a request to register a new customer, and is required to add one row to a table customers.

In that scenario, what will happen if the transaction fails and must be rolled-back? Will the row in customers be ommited as well? Is this scenario even possible? Or maybe it depends on the implementation, and if so, how to implement it so that this scenario is garanteed never to happen?
If you can handle all the writes in a single connection, then Plan A.  Note:  Moving from one "page" to another in a browser necessarily leads to another connection, hence Plan B.

Plan A:  BEGIN; write...; COMMIT;  And check for errors.  ROLLBACK on errors and retry the entire transaction.  If not successful, tell the user that his seat on the plane was taken and he must start over.

Plan B:  You must set up another table to keep track of "transactions" and be ready to rollback (etc) things outside of what InnoDB (much less MyISAM) can do for you.

Note:  If Plan A takes more than a few seconds, you are asking for trouble and for failures.  If it takes longer, switch to Plan B.