innodb_locks_unsafe_for_binlog
2011-06-13 12:50
519 查看
disable next-key lock
This variable affects how
By default, the value of
The effect of enabling
Enabling
This variable affects how
InnoDBuses gap locking for searches and index scans. Normally,
InnoDBuses an algorithm called next-key locking that combines index-row locking with gap locking.
InnoDBperforms row-level locking in such a way that when it searches or scans a table index, it sets shared or exclusive locks on the index records it encounters. Thus, the row-level locks are actually index-record locks. In addition, a next-key lock on an index record also affects the “gap” before that index record. That is, a next-key lock is an index-record lock plus a gap lock on the gap preceding the index record. If one session has a shared or exclusive lock on record
Rin an index, another session cannot insert a new index record in the gap immediately before
Rin the index order.
By default, the value of
innodb_locks_unsafe_for_binlogis 0 (disabled), which means that gap locking is enabled:
InnoDBuses next-key locks for searches and index scans. To enable the variable, set it to 1. This causes gap locking to be disabled:
InnoDBuses only index-record locks for searches and index scans.
The effect of enabling
innodb_locks_unsafe_for_binlogis similar to but not identical to setting the transaction isolation level to
READ COMMITTED:
Enabling
innodb_locks_unsafe_for_binlogis a global setting and affects all sessions, whereas the isolation level can be set globally for all sessions, or individually per session.
innodb_locks_unsafe_for_binlogcan be set only at server startup, whereas the isolation level can be set at startup or changed at runtime.
相关文章推荐
- innodb_locks_unsafe_for_binlog参数解析
- innodb_locks_unsafe_for_binlog && transaction isolation level
- innodb_locks_unsafe_for_binlog
- MYSQL:Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
- Jira的 Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'错误的解决 原创 2
- Jira的 Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'错误的解决
- error LNK2026: module unsafe for SAFESEH image
- MYSQL INNODB的REDO LOG与BINLOG的区别
- 解决MySQL : InnoDB: Cannot allocate memory for the buffer pool
- innodb_flush_log_at_trx_commit & sync_binlog
- 【MySQL】sync_binlog innodb_flush_log_at_trx_commit 浅析
- sync_binlog innodb_flush_log_at_trx_commit 浅析
- error LNK2026: module unsafe for SAFESEH image
- 8.5.1 Optimizing Storage Layout for InnoDB Tables InnoDB表的存储布局优化
- Introduction to Transaction Locks in InnoDB Storage Engine
- MySQL:Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT...
- TOO MANY LOCKS PRINTED FOR THIS TRX: SUPPRESSING FURTHER PRINTS
- You have an error MySQL server version for the right syntax to use near 'TYPE=InnoDB' at line 20
- 8.5.1 Optimizing Storage Layout for InnoDB Tables
- A quest for the full InnoDB status