I want to know whether the following sql statement will be auto rollback to state before start transaction should there is error occur in any of the insert/update. Or do I manually need to do rollback to initial state before start transaction? If I need to manually do rollback, how should I do it?
START TRANSACTION;
INSERT INTO TABLE 1 ...
UPDATE TABLE 1 ...
UPDATE TABLE 2 ...
INSERT TABLE 3 ...
COMMIT;