From b92a1d3644d807fb4e1300ef46db261176fcc2a2 Mon Sep 17 00:00:00 2001 From: bb7133 Date: Thu, 22 Sep 2022 23:07:32 +0800 Subject: [PATCH 1/4] system-variables: add documents for `error_count` and `max_connections` --- system-variables.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/system-variables.md b/system-variables.md index e637185b1609a..6afdcb8e26fdc 100644 --- a/system-variables.md +++ b/system-variables.md @@ -184,6 +184,12 @@ mysql> SELECT * FROM t1; - Range: `[0, 7]` - Sets the week format used by the `WEEK()` function. +### error_count + +- Scope: NONE +- Type: Integer +- A read-only variable that indicates the number of errors that resulted from the last statement that generated messages. + ### foreign_key_checks - Scope: SESSION | GLOBAL @@ -267,6 +273,16 @@ mysql> SELECT * FROM t1; - Range: `[1024, 1073741824]` - The maximum size of a packet for the MySQL protocol. +### max_connections + +- Scope: GLOBAL +- Persists to cluster: No +- Type: Integer +- Default value: `0` +- Range: `[0, 100000]` +- The maximum number of connections for a single TiDB instance. +- The value of `0` means no limit. + ### max_execution_time - Scope: SESSION | GLOBAL @@ -348,19 +364,19 @@ mysql> SELECT * FROM t1; - Scope: NONE - Default value: "" -- The location of the certificate authority file (if there is one). +- The location of the certificate authority file (if there is one), the value of this variable is defined by [`ssl-ca` configuration](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#ssl-ca). ### ssl_cert - Scope: NONE - Default value: "" -- The location of the certificate file (if there is a file) that is used for SSL/TLS connections. +- The location of the certificate file (if there is a file) that is used for SSL/TLS connections, the value of this variable is defined by [`ssl-cert` configuration](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#ssl-cert). ### ssl_key - Scope: NONE - Default value: "" -- The location of the private key file (if there is one) that is used for SSL/TLS connections. +- The location of the private key file (if there is one) that is used for SSL/TLS connections, the value of this variable is defined by [`ssl-key` configuration](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#ssl-cert). ### system_time_zone From 2b0749546870b594136c57a3def207984431ee7c Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Sat, 8 Oct 2022 14:27:52 +0800 Subject: [PATCH 2/4] Apply suggestions from code review --- system-variables.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system-variables.md b/system-variables.md index 6afdcb8e26fdc..b6cffeb3360b5 100644 --- a/system-variables.md +++ b/system-variables.md @@ -280,7 +280,7 @@ mysql> SELECT * FROM t1; - Type: Integer - Default value: `0` - Range: `[0, 100000]` -- The maximum number of connections for a single TiDB instance. +- The maximum number of connections permitted for a single TiDB instance. - The value of `0` means no limit. ### max_execution_time @@ -364,19 +364,19 @@ mysql> SELECT * FROM t1; - Scope: NONE - Default value: "" -- The location of the certificate authority file (if there is one), the value of this variable is defined by [`ssl-ca` configuration](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#ssl-ca). +- The location of the certificate authority file (if there is one), the value of this variable is defined by the TiDB configuration item [`ssl-ca`](/tidb-configuration-file.md#ssl-ca). ### ssl_cert - Scope: NONE - Default value: "" -- The location of the certificate file (if there is a file) that is used for SSL/TLS connections, the value of this variable is defined by [`ssl-cert` configuration](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#ssl-cert). +- The location of the certificate file (if there is a file) that is used for SSL/TLS connections, the value of this variable is defined by the TiDB configuration item [`ssl-cert`](/tidb-configuration-file.md#ssl-cert). ### ssl_key - Scope: NONE - Default value: "" -- The location of the private key file (if there is one) that is used for SSL/TLS connections, the value of this variable is defined by [`ssl-key` configuration](https://docs.pingcap.com/tidb/dev/tidb-configuration-file#ssl-cert). +- The location of the private key file (if there is one) that is used for SSL/TLS connections, the value of this variable is defined by TiDB configuration item [`ssl-key`](/tidb-configuration-file.md#ssl-cert). ### system_time_zone From 992879abe83b4ea48a678dd125b0172fb2c3f498 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Sat, 8 Oct 2022 14:43:40 +0800 Subject: [PATCH 3/4] add custom content --- system-variables.md | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/system-variables.md b/system-variables.md index b6cffeb3360b5..12a17e2229ad7 100644 --- a/system-variables.md +++ b/system-variables.md @@ -362,21 +362,57 @@ mysql> SELECT * FROM t1; ### ssl_ca + + +- Scope: NONE +- Default value: "" +- The location of the certificate authority file (if there is one). The value of this variable is defined by the TiDB configuration item [`ssl-ca`](/tidb-configuration-file.md#ssl-ca). + + + + + - Scope: NONE - Default value: "" -- The location of the certificate authority file (if there is one), the value of this variable is defined by the TiDB configuration item [`ssl-ca`](/tidb-configuration-file.md#ssl-ca). +- The location of the certificate authority file (if there is one). The value of this variable is defined by the TiDB configuration item [`ssl-ca`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#ssl-ca). + + ### ssl_cert + + - Scope: NONE - Default value: "" -- The location of the certificate file (if there is a file) that is used for SSL/TLS connections, the value of this variable is defined by the TiDB configuration item [`ssl-cert`](/tidb-configuration-file.md#ssl-cert). +- The location of the certificate file (if there is a file) that is used for SSL/TLS connections. The value of this variable is defined by the TiDB configuration item [`ssl-cert`](/tidb-configuration-file.md#ssl-cert). + + + + + +- Scope: NONE +- Default value: "" +- The location of the certificate file (if there is a file) that is used for SSL/TLS connections. The value of this variable is defined by the TiDB configuration item [`ssl-cert`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#ssl-cert). + + ### ssl_key + + +- Scope: NONE +- Default value: "" +- The location of the private key file (if there is one) that is used for SSL/TLS connections. The value of this variable is defined by TiDB configuration item [`ssl-key`](/tidb-configuration-file.md#ssl-cert). + + + + + - Scope: NONE - Default value: "" -- The location of the private key file (if there is one) that is used for SSL/TLS connections, the value of this variable is defined by TiDB configuration item [`ssl-key`](/tidb-configuration-file.md#ssl-cert). +- The location of the private key file (if there is one) that is used for SSL/TLS connections. The value of this variable is defined by TiDB configuration item [`ssl-key`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#ssl-key). + + ### system_time_zone From 701681302c3dfd1b4fa557fea52dcd280d902cad Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Sat, 8 Oct 2022 16:21:09 +0800 Subject: [PATCH 4/4] Update system-variables.md --- system-variables.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/system-variables.md b/system-variables.md index 12a17e2229ad7..61cf7e86e49c0 100644 --- a/system-variables.md +++ b/system-variables.md @@ -362,58 +362,22 @@ mysql> SELECT * FROM t1; ### ssl_ca - - - Scope: NONE - Default value: "" - The location of the certificate authority file (if there is one). The value of this variable is defined by the TiDB configuration item [`ssl-ca`](/tidb-configuration-file.md#ssl-ca). - - - - - -- Scope: NONE -- Default value: "" -- The location of the certificate authority file (if there is one). The value of this variable is defined by the TiDB configuration item [`ssl-ca`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#ssl-ca). - - ### ssl_cert - - - Scope: NONE - Default value: "" - The location of the certificate file (if there is a file) that is used for SSL/TLS connections. The value of this variable is defined by the TiDB configuration item [`ssl-cert`](/tidb-configuration-file.md#ssl-cert). - - - - - -- Scope: NONE -- Default value: "" -- The location of the certificate file (if there is a file) that is used for SSL/TLS connections. The value of this variable is defined by the TiDB configuration item [`ssl-cert`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#ssl-cert). - - ### ssl_key - - - Scope: NONE - Default value: "" - The location of the private key file (if there is one) that is used for SSL/TLS connections. The value of this variable is defined by TiDB configuration item [`ssl-key`](/tidb-configuration-file.md#ssl-cert). - - - - -- Scope: NONE -- Default value: "" -- The location of the private key file (if there is one) that is used for SSL/TLS connections. The value of this variable is defined by TiDB configuration item [`ssl-key`](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#ssl-key). - - - ### system_time_zone - Scope: NONE