InnoDB incomplete transactions - code transferability
Example of transaction(s, no code):
1 считать строку из тбл ожидания регистрации
2 записать в тбл юзерс одну строку
3 записать в тбл опции настройки пользователя
I have a code now for MyISAM. After each step (1,2-3), the results of the implementation verified. If it's a mistake, call a function er($x); , which will say "all are missing" and exit;
And if the code works with InnoDB (if the transaction starts / ends), what will happen to the tables (with lines) where (when working with) errors have arisen and the function er($x) has arisen?
Will this be a dead transaction? I don't really know what "dead transaction" means.
Yeah, you'll also be getting back on reports of mistakes, but before.
exit()You'll be doing another request.
ROLLBACK- who will inform the server that the transaction cannot be successfully completed and all changes in the transaction will simply not be recorded in your database. As a result, the database will be in the same condition as before the transaction starts.
If you've successfully reached the final request, you're sending.
COMMITafter which the DSB will record changes to the tables.