Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions functions-and-operators/tidb-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,14 @@ select tidb_decode_sql_digests(@digests, 10);
SET GLOBAL tidb_enable_row_level_checksum = ON;
```

上述配置仅对新创建的会话生效,因此需要重新连接 TiDB。

创建表 `t` 并插入数据:

```sql
USE test;
CREATE TABLE t (id INT PRIMARY KEY, k INT, c int);
INSERT INTO TABLE t values (1, 10, a);
CREATE TABLE t (id INT PRIMARY KEY, k INT, c CHAR(1));
INSERT INTO t values (1, 10, 'a');
```

查询表 `t` 中 `id = 1` 的行数据的 Checksum 值:
Expand Down
1 change: 1 addition & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -2439,6 +2439,7 @@ Query OK, 0 rows affected (0.09 sec)
- 类型:布尔型
- 默认值:`OFF`
- 这个变量用于控制是否开启 [TiCDC 单行数据正确性校验](/ticdc/ticdc-integrity-check.md)功能。
- 你可以使用 [`TIDB_ROW_CHECKSUM()`](/functions-and-operators/tidb-functions.md#tidb_row_checksum) 函数查询行数据的 Checksum 值。

### `tidb_enforce_mpp` <span class="version-mark">从 v5.1 版本开始引入</span>

Expand Down