Skip to content

Commit

Permalink
Add docs for sysvar cache (pingcap#5563)
Browse files Browse the repository at this point in the history
  • Loading branch information
morgo authored Jun 9, 2021
1 parent e99a3f7 commit d4cef37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ SET GLOBAL tidb_distsql_scan_concurrency = 10;

> **Note:**
>
> TiDB differs from MySQL in that `GLOBAL` scoped variables **persist** through TiDB server restarts. Changes are also propagated to other TiDB servers every 2 seconds [TiDB #14531](https://github.com/pingcap/tidb/issues/14531).
> Additionally, TiDB presents several MySQL variables from MySQL 5.7 as both readable and settable. This is required for compatibility, since it is common for both applications and connectors to read MySQL variables. For example: JDBC connectors both read and set query cache settings, despite not relying on the behavior.
> Executing `SET GLOBAL` applies immediately on the TiDB server where the statement was issued. A notification is then sent to all TiDB servers to refresh their system variable cache, which will start immediately as a background operation. Because there is a risk that some TiDB servers might miss the notification, the system variable cache is also refreshed automatically every 30 seconds. This helps ensure that all servers are operating with the same configuration.
>
> TiDB differs from MySQL in that `GLOBAL` scoped variables **persist** through TiDB server restarts. Additionally, TiDB presents several MySQL variables as both readable and settable. This is required for compatibility, because it is common for both applications and connectors to read MySQL variables. For example, JDBC connectors both read and set query cache settings, despite not relying on the behavior.
## Variable Reference

Expand Down

0 comments on commit d4cef37

Please sign in to comment.