Skip to content

Commit aca5929

Browse files
authored
add explaination for log densitive feat (#16705)
1 parent 994def2 commit aca5929

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

system-variables.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4784,10 +4784,17 @@ SHOW WARNINGS;
47844784
- Scope: SESSION | GLOBAL
47854785
- Persists to cluster: Yes
47864786
- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No
4787-
- Type: Boolean
4787+
- Type: Enumeration
47884788
- Default value: `OFF`
4789-
- This variable controls whether to hide user information in the SQL statement being recorded into the TiDB log and slow log.
4790-
- When you set the variable to `1`, user information is hidden. For example, if the executed SQL statement is `insert into t values (1,2)`, the statement is recorded as `insert into t values (?,?)` in the log.
4789+
- Possible values: `OFF`, `ON`, `MARKER`
4790+
- This variable controls whether to hide the user information in the SQL statement being recorded into the TiDB log and slow log.
4791+
- The default value is `OFF`, which means that the user information is not processed in any way.
4792+
- When you set the variable to `ON`, the user information is hidden. For example, if the executed SQL statement is `INSERT INTO t VALUES (1,2)`, the statement is recorded as `INSERT INTO t VALUES (?,?)` in the log.
4793+
- When you set the variable to `MARKER`, the user information is wrapped in `‹ ›`. For example, if the executed SQL statement is `INSERT INTO t VALUES (1,2)`, the statement is recorded as `INSERT INTO t VALUES (‹1›,‹2›)` in the log. If the input has `‹`, it is escaped as `‹‹`, and `›` is escaped as `››`. Based on the marked logs, you can decide whether to desensitize the marked information when the logs are displayed.
4794+
4795+
> **Warning:**
4796+
>
4797+
> The `MARKER` option is experimental. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub.
47914798
47924799
### tidb_regard_null_as_point <span class="version-mark">New in v5.4.0</span>
47934800

0 commit comments

Comments
 (0)