Oracle 5.0 Reference Manual page 1262

Table of Contents

Advertisement

If
innodb_file_per_table
tablespace. If
innodb_file_per_table
using its own
file for storing data and indexes, rather than in the shared tablespace. See
.ibd
Section 14.2.1.1, "Using Per-Table
innodb_flush_log_at_trx_commit
Command-Line Format
Option-File Format
Option Sets Variable
Variable Name
Variable Scope
Dynamic Variable
If the value of
innodb_flush_log_at_trx_commit
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. When the value is 1 (the default), 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. When
the value is 2, 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.
The default value of 1 is the value required for ACID compliance. You can achieve better
performance by setting the value different from 1, but then you can lose at most one second worth
of transactions in a crash. With a value of 0, any
of transactions. With a value of 2, then only an operating system crash or a power outage can erase
the last second of transactions. However, InnoDB's crash recovery is not affected and thus crash
recovery does work regardless of the value.
For the greatest possible durability and consistency in a replication setup using
transactions, you should use innodb_flush_log_at_trx_commit=1, sync_binlog=1, and,
before MySQL 5.0.3,
is not needed from 5.0.3 on.)
binlog
Caution
Many operating systems and some disk hardware fool the flush-to-disk
operation. They may tell
it has not. Then the durability of transactions is not guaranteed even with the
setting 1, and in the worst case a power outage can even corrupt the
database. Using a battery-backed disk cache in the SCSI disk controller or in
the disk itself speeds up file flushes, and makes the operation safer. You can
also try using the Unix command
Startup Options and System Variables
InnoDB
Type
boolean
Default
OFF
[1241]
is disabled (the default),
Tablespaces".
--innodb_flush_log_at_trx_commit[=#]
innodb_flush_log_at_trx_commit
Yes,
innodb_flush_log_at_trx_commit
innodb_flush_log_at_trx_commit
Global
Yes
Permitted Values
Type
enumeration
Default
1
Valid
0
Values
1
2
innodb-safe-binlog
1242
InnoDB
[1241]
is enabled,
InnoDB
[1242]
is 0, the log buffer is written out to
process crash can erase the last second
mysqld
in your master server
that the flush has taken place, even though
mysqld
to disable the caching of disk writes
hdparm
creates tables in the shared
creates each new table
[1242]
with
InnoDB
file.
(innodb-safe-
my.cnf
InnoDB

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents