tags:

views:

53

answers:

1

I've set mysql parameter innodb_flush_log_at_trx_commit=0. It means that mysql flushes transactions to HDD 1 time per second. Is it true that if mysql will fail with this flush (because of power off) i will lose my data from these transactions. Or mysql will save them in data file (ibdata1) after each transaction regardless of binlog flush?

Thanks.

A: 

Here is the entry in the MySQL reference manual for innodb_flush_log_at_trx_commit. You can lose the last second of transactions with the value set to 0.

Note that the binlog is actually something different that is independent innodb and is used for all storage engines. Here is the chapter on the binary log in the MySQL reference manual.

Mark