Skip to content

Commit

Permalink
Update use-tidb-to-read-tiflash.md (pingcap#15866) (pingcap#15887)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Dec 26, 2023
1 parent f436faf commit 9c74c7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tiflash/use-tidb-to-read-tiflash.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,7 @@ In the above three ways of reading TiFlash replicas, engine isolation specifies

> **Note:**
>
> Before v4.0.3, the behavior of reading from TiFlash replica in a non-read-only SQL statement (for example, `INSERT INTO ... SELECT`, `SELECT ... FOR UPDATE`, `UPDATE ...`, `DELETE ...`) is undefined. In v4.0.3 and later versions, internally TiDB ignores the TiFlash replica for a non-read-only SQL statement to guarantee the data correctness. That is, for [smart selection](#smart-selection), TiDB automatically selects the non-TiFlash replica; for [engine isolation](#engine-isolation) that specifies TiFlash replica **only**, TiDB reports an error; and for [manual hint](#manual-hint), TiDB ignores the hint.
> - Before v4.0.3, the behavior of reading from TiFlash replica in a non-read-only SQL statement (for example, `INSERT INTO ... SELECT`, `SELECT ... FOR UPDATE`, `UPDATE ...`, `DELETE ...`) is undefined.
> - For versions from v4.0.3 to v6.2.0, internally TiDB ignores the TiFlash replica for a non-read-only SQL statement to guarantee the data correctness. That is, for [smart selection](#smart-selection), TiDB automatically selects the non-TiFlash replica; for [engine isolation](#engine-isolation) that specifies TiFlash replica **only**, TiDB reports an error; and for [manual hint](#manual-hint), TiDB ignores the hint.
> - For versions from v6.3.0 to v7.0.0, if the TiFlash replica is enabled, you can use the [`tidb_enable_tiflash_read_for_write_stmt`](/system-variables.md#tidb_enable_tiflash_read_for_write_stmt-new-in-v630) variable to control whether TiDB uses the TiFlash replica for a non-read-only SQL statement.
> - Starting from v7.1.0, if the TiFlash replica is enabled and the [SQL Mode](/sql-mode.md) of the current session is not strict (which means the `sql_mode` value does not contain `STRICT_TRANS_TABLES` or `STRICT_ALL_TABLES`), TiDB automatically decides whether to use the TiFlash replica for a non-read-only SQL statement based on cost estimation.

0 comments on commit 9c74c7d

Please sign in to comment.