Skip to content

Commit

Permalink
system variable: add tidb_lock_unchanged_keys (pingcap#14222) (pingca…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Aug 7, 2023
1 parent b79d940 commit 7091385
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 @@ -2938,6 +2938,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 and v7.3.0</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`, these keys are not 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 behavior without locks 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 7091385

Please sign in to comment.