Home  Home  Home  Kontakt  Kontakt  Kontakt  Inhalt  Inhalt  Inhalt  Blog  Blog  Blog  FAQ  FAQ  FAQ

Flush

FLUSH TABLES

FLUSH LOGS;
FLUSH TABLES WITH READ LOCK;
UNLOCK TABLES;

Transaction => Binlog Flush

innodb_flush_log_at_trx_commit=1

The default value of 1 is required for full ACID compliance. With this value, the log buffer is written out to the log file at each transaction commit and the flush to disk operation is performed on the log file.

innodb_flush_log_at_trx_commit=0

With a value of 0, any mysqld process crash can erase the last second of transactions. The log buffer is written out to the log file once per second and the flush to disk operation is performed on the log file, but nothing is done at a transaction commit.

innodb_flush_log_at_trx_commit=2

With a value of 2, an operating system crash or a power outage can erase the last second of commit records. The log buffer is written out to the file at each commit, but the flush to disk operation is not performed on it. However, the flushing on the log file takes place once per second also when the value is 2. Note that the once-per-second flushing is not 100% guaranteed to happen every second, due to process scheduling issues.

Ähnliche Seiten