mysql transaction in stored procedure (locking/rollback) -
Do any locking to prevent any transaction tables from updating in a stored procedure?
I need to explicitly put in rollback logic or will the transaction be rolled automatically if there is an error because it never arrives till the command.
Does any locking to prevent transaction tables from updating in a stored procedure? ?
When you table an InnoDB on DML , the affected rows are closed by the end of the transaction (no difference It does not matter if it is inside a stored procedure or not).
You can modify the locked lines within the same transaction, which closes it.
To explicitly lock certain rows, issue:
Select from SELECT * UPDATE for table The situation where there is no other way to unlock the rows except for reducing the transaction or leaving the rolling
Do I need to explicitly put in rollback logic or do the transactions automatically roll If any error occurs because it never reaches the command Is.
You will need to rollback clearly.
Comments
Post a Comment