Skip to content

Commit

Permalink
system variable: add tidb_lock_unchanged_keys
Browse files Browse the repository at this point in the history
Signed-off-by: Aolin <[email protected]>
  • Loading branch information
Oreoxmt committed Jul 14, 2023
1 parent fe78f58 commit 8e6ab68
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -2797,6 +2797,17 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified
</CustomContent>
### `tidb_lock_unchanged_keys` <span class="version-mark">New in v7.1.1</span>
- Scope: SESSION | GLOBAL
- Persists to cluster: Yes
- Type: Boolean
- Default value: `ON`
- This variable is used to control whether to lock specific keys in the following scenarios. When the value is set to `ON`, these keys are locked. When the value is set to `OFF`, no keys are locked.
- Duplicate keys in `INSERT IGNORE` and `REPLACE` statements. Before v6.1.6, these keys were not locked. This issue has been fixed in [#42121](https://github.com/pingcap/tidb/issues/42121).
- Unique keys in `UPDATE` statements when the values of the keys are not changed. Before v6.5.2, these keys were not locked. This issue has been fixed in [#36438](https://github.com/pingcap/tidb/issues/36438).
- To maintain the consistency and rationality of the transaction, it is not recommended to change this value. If upgrading TiDB causes severe performance issues due to these two fixes, and the unlocked behavior is acceptable (see the preceding issues), you can set this variable to `OFF`.
### tidb_log_file_max_days <span class="version-mark">New in v5.3.0</span>
- Scope: GLOBAL
Expand Down

0 comments on commit 8e6ab68

Please sign in to comment.