Skip to content

Commit b8f7c37

Browse files
authored
tidb_row_checksum(): Update docs (#17633) (#17699)
1 parent ba966f0 commit b8f7c37

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

functions-and-operators/tidb-functions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,14 @@ To enable the checksum feature of single-row data in TiDB (controlled by the sys
333333
SET GLOBAL tidb_enable_row_level_checksum = ON;
334334
```
335335

336+
This configuration only takes effect for newly created sessions, so you need to reconnect to TiDB.
337+
336338
Create table `t` and insert data:
337339

338340
```sql
339341
USE test;
340-
CREATE TABLE t (id INT PRIMARY KEY, k INT, c int);
341-
INSERT INTO TABLE t values (1, 10, a);
342+
CREATE TABLE t (id INT PRIMARY KEY, k INT, c CHAR(1));
343+
INSERT INTO t values (1, 10, 'a');
342344
```
343345

344346
The following statement shows how to query the checksum value of the row where `id = 1` in table `t`:

system-variables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,6 +2770,8 @@ Query OK, 0 rows affected (0.09 sec)
27702770
27712771
</CustomContent>
27722772
2773+
- You can use the [`TIDB_ROW_CHECKSUM()`](/functions-and-operators/tidb-functions.md#tidb_row_checksum) function to get the checksum value of a row.
2774+
27732775
### tidb_enforce_mpp <span class="version-mark">New in v5.1</span>
27742776
27752777
- Scope: SESSION

0 commit comments

Comments
 (0)