系统崩溃后,mysql事务会回滚吗?
我的问题主要是:如果系统在执行mysql事务时崩溃了,系统重启后事务会回滚吗?
My question baliscally is: if the sytem crashes right when a mysql transaction is executed, will the transaction rollback after system restart?
mysql如何执行事务?
How are the transactions executed by mysql?
重启后,MySQL是否会检查未完成的事务?
Will MySQL check for unfinished transactions after restart?
之所以问这个问题,是因为我用php制作了一个交易系统,但是我没有将最终结果存储在任何地方,以防将来系统崩溃时回滚...
I'm asking this because I made a transaction system in php, but I'm not storing the final results anywhere for a future rollback in case of a system crash...
有不同类型的崩溃. MySQL服务器可能崩溃(如将其杀死),或者整个操作系统可能崩溃(如将计算机拔出电源).
There are different kind of crashes. The MySQL server can crash (like if you kill it) or the whole Operating system can crash (like if you unplug the machine).
您应该从哪里开始阅读有关 二进制日志 及其工作方式以及 InnoDB引擎的恢复过程
Where you should start reading is about the Binary Log and how it works and about the Recovery process for InnoDB engine