作者retsamsu (haha)
看板Database
标题Re: [SQL ] 当在下SQL指令的时候…电脑当机?
时间Tue Feb 6 20:54:10 2007
※ 引述《grassboy2 (天才小胖子-活力花俏草儿)》之铭言:
: 噗…和上一串作个区隔^^"
: 耶逗…就是…我资料库是用MySQL的…
: 如果我在UPDATE一个table的时候…
: 一次可能会UPDATE好几笔资料…
: 有没有一种状况…
: 在指令执行的过程中…电脑突然断电or当机…
: 然後重新开机後…会发生某些资料已更新,某些资料未更新的状况?
: 还是说MySQL本身有考虑到这种状况,所以重新开机时…
: 会继续把未更新的地方更新完毕呢?
: -------
: 同样一个问题…另外一个状况…
: 如果我用其他动态伺服器语言…
: 利用For回圈去逐笔更改资料,
: 中途遇上断电or当机…
: 重新开机後…会发生某些资料更新、某些资料没有的状况吗?
帮你找一下,参考看看
http://dev.mysql.com/tech-resources/articles/storage-engine/part_2.html
MySQL Storage Engine Architecture, Part 2: An In-Depth Look
...
InnoDB
...
InnoDB's adherence to consistency and durability ensures that any committed
transaction is stored somewhere on disk, either in InnoDB's internal "redo
log", or inside the tablespace. On startup, recovery (after a system crash)
is automatic: previously committed transactions that are still in the redo
log are applied to the tablespace, and any uncommitted transactions are
rolled back.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.113.209.4