diff --git a/best-practices/haproxy-best-practices.md b/best-practices/haproxy-best-practices.md index 53cb29f6c5f7d..7601c86b7928e 100644 --- a/best-practices/haproxy-best-practices.md +++ b/best-practices/haproxy-best-practices.md @@ -113,18 +113,18 @@ haproxy --help | `-vv` | Displays the version, build options, libraries versions and usable pollers. | | `-d` | Enables debug mode. | | `-db` | Disables background mode and multi-process mode. | -| `-dM []` | Forces memory poisoning, which means that each and every memory region allocated with malloc() or pool_alloc2() will be filled with \ before being passed to the caller. | +| `-dM []` | Forces memory poisoning, which means that each and every memory region allocated with malloc() or pool_alloc2() will be filled with `` before being passed to the caller. | | `-V` | Enables verbose mode (disables quiet mode). | | `-D` | Starts as a daemon.| -| `-C ` | Changes to directory \ before loading configuration files. | +| `-C ` | Changes to directory `` before loading configuration files. | | `-W` | Master-worker mode. | | `-q` | Sets "quiet" mode: This disables some messages during the configuration parsing and during startup. | | `-c` | Only performs a check of the configuration files and exits before trying to bind. | -| `-n ` | Limits the per-process connection limit to \. | -| `-m ` | Limits the total allocatable memory to \ megabytes across all processes. | -| `-N ` | Sets the default per-proxy maxconn to \ instead of the builtin default value (usually 2000). | -| `-L ` | Changes the local peer name to \, which defaults to the local hostname. | -| `-p ` | Writes all processes' PIDs into \ during startup. | +| `-n ` | Limits the per-process connection limit to ``. | +| `-m ` | Limits the total allocatable memory to `` megabytes across all processes. | +| `-N ` | Sets the default per-proxy maxconn to `` instead of the builtin default value (usually 2000). | +| `-L ` | Changes the local peer name to ``, which defaults to the local hostname. | +| `-p ` | Writes all processes' PIDs into `` during startup. | | `-de` | Disables the use of epoll(7). epoll(7) is available only on Linux 2.6 and some custom Linux 2.4 systems. | | `-dp` | Disables the use of poll(2). select(2) might be used instead. | | `-dS` | Disables the use of splice(2), which is broken on older kernels. | diff --git a/functions-and-operators/expressions-pushed-down.md b/functions-and-operators/expressions-pushed-down.md index 4cc035b3fec0c..ae7c8adfae97d 100644 --- a/functions-and-operators/expressions-pushed-down.md +++ b/functions-and-operators/expressions-pushed-down.md @@ -14,10 +14,10 @@ When TiDB reads data from TiKV, TiDB tries to push down some expressions (includ | Expression Type | Operations | | :-------------- | :------------------------------------- | | [Logical operators](/functions-and-operators/operators.md#logical-operators) | AND (&&), OR (||), NOT (!) | -| [Comparison functions and operators](/functions-and-operators/operators.md#comparison-functions-and-operators) | <, <=, =, != (<>), >, >=, [`<=>`](https://v3.1.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_equal-to), [`IN()`](https://v3.1.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_in), IS NULL, LIKE, IS TRUE, IS FALSE, [`COALESCE()`](https://v3.1.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_coalesce) | +| [Comparison functions and operators](/functions-and-operators/operators.md#comparison-functions-and-operators) | `<`, `<=`, `=`, `!=` (`<>`), `>`, `>=`, [`<=>`](https://v3.1.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_equal-to), [`IN()`](https://v3.1.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_in), IS NULL, LIKE, IS TRUE, IS FALSE, [`COALESCE()`](https://v3.1.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_coalesce) | | [Numeric functions and operators](/functions-and-operators/numeric-functions-and-operators.md) | +, -, *, /, [`ABS()`](https://v3.1.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_abs), [`CEIL()`](https://v3.1.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_ceil), [`CEILING()`](https://v3.1.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_ceiling), [`FLOOR()`](https://v3.1.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_floor) | | [Control flow functions](/functions-and-operators/control-flow-functions.md) | [`CASE`](https://v3.1.mysql.com/doc/refman/5.7/en/control-flow-functions.html#operator_case), [`IF()`](https://v3.1.mysql.com/doc/refman/5.7/en/control-flow-functions.html#function_if), [`IFNULL()`](https://v3.1.mysql.com/doc/refman/5.7/en/control-flow-functions.html#function_ifnull) | -| [JSON functions](/functions-and-operators/json-functions.md) | [JSON_TYPE(json_val)][json_type],
[JSON_EXTRACT(json_doc, path[, path] ...)][json_extract],
[JSON_UNQUOTE(json_val)][json_unquote],
[JSON_OBJECT(key, val[, key, val] ...)][json_object],
[JSON_ARRAY([val[, val] ...])][json_array],
[JSON_MERGE(json_doc, json_doc[, json_doc] ...)][json_merge],
[JSON_SET(json_doc, path, val[, path, val] ...)][json_set],
[JSON_INSERT(json_doc, path, val[, path, val] ...)][json_insert],
[JSON_REPLACE(json_doc, path, val[, path, val] ...)][json_replace],
[JSON_REMOVE(json_doc, path[, path] ...)][json_remove] | +| [JSON functions](/functions-and-operators/json-functions.md) | [JSON_TYPE(json_val)][json_type],
[JSON_EXTRACT(json_doc, path[, path] ...)][json_extract],
[JSON_UNQUOTE(json_val)][json_unquote],
[JSON_OBJECT(key, val[, key, val] ...)][json_object],
[JSON_ARRAY([val[, val] ...])][json_array],
[JSON_MERGE(json_doc, json_doc[, json_doc] ...)][json_merge],
[JSON_SET(json_doc, path, val[, path, val] ...)][json_set],
[JSON_INSERT(json_doc, path, val[, path, val] ...)][json_insert],
[JSON_REPLACE(json_doc, path, val[, path, val] ...)][json_replace],
[JSON_REMOVE(json_doc, path[, path] ...)][json_remove] | | [Date and time functions](/functions-and-operators/date-and-time-functions.md) | [`DATE_FORMAT()`](https://v3.1.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date-format) | ## Blacklist specific expressions @@ -103,14 +103,14 @@ tidb> explain select * from t where a < 2 and a > 2; | Operator Name | Aliases | | :-------- | :---------- | -| < | lt | -| > | gt | -| <= | le | -| >= | ge | -| = | eq | -| != | ne | -| <> | ne | -| <=> | nulleq | +| `<` | lt | +| `>` | gt | +| `<=` | le | +| `>=` | ge | +| `=` | eq | +| `!=` | ne | +| `<>` | ne | +| `<=>` | nulleq | | | | bitor | | && | bitand| | || | or | diff --git a/functions-and-operators/operators.md b/functions-and-operators/operators.md index 31454e5633264..dbd8eac3f190e 100644 --- a/functions-and-operators/operators.md +++ b/functions-and-operators/operators.md @@ -29,7 +29,7 @@ This document describes the operators precedence, comparison functions and opera | [DIV](https://dev.mysql.com/doc/refman/5.7/en/arithmetic-functions.html#operator_div) | Integer division | | [/](https://dev.mysql.com/doc/refman/5.7/en/arithmetic-functions.html#operator_divide) | Division operator | | [=](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_equal) | Equal operator | -| [<=>](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_equal-to) | NULL-safe equal to operator | +| [`<=>`](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_equal-to) | NULL-safe equal to operator | | [>](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_greater-than) | Greater than operator | | [>=](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_greater-than-or-equal) | Greater than or equal operator | | [IS](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_is) | Test a value against a boolean | @@ -46,7 +46,7 @@ This document describes the operators precedence, comparison functions and opera | [%, MOD](https://dev.mysql.com/doc/refman/5.7/en/arithmetic-functions.html#operator_mod) | Modulo operator | | [NOT, !](https://dev.mysql.com/doc/refman/5.7/en/logical-operators.html#operator_not) | Negates value | | [NOT BETWEEN ... AND ...](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_not-between) | Check whether a value is not within a range of values | -| [!=, <>](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_not-equal) | Not equal operator | +| [!=, `<>`](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_not-equal) | Not equal operator | | [NOT LIKE](https://dev.mysql.com/doc/refman/5.7/en/string-comparison-functions.html#operator_not-like) | Negation of simple pattern matching | | [NOT REGEXP](https://dev.mysql.com/doc/refman/5.7/en/regexp.html#operator_not-regexp) | Negation of REGEXP | | [\|\|, OR](https://dev.mysql.com/doc/refman/5.7/en/logical-operators.html#operator_or) | Logical OR | @@ -92,7 +92,7 @@ For details, see [Operator Precedence](https://dev.mysql.com/doc/refman/5.7/en/o | [BETWEEN ... AND ...](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_between) | Check whether a value is within a range of values | | [COALESCE()](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_coalesce) | Return the first non-NULL argument | | [=](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_equal) | Equal operator | -| [<=>](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_equal-to) | NULL-safe equal to operator | +| [`<=>`](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_equal-to) | NULL-safe equal to operator | | [>](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_greater-than) | Greater than operator | | [>=](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_greater-than-or-equal) | Greater than or equal operator | | [GREATEST()](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_greatest) | Return the largest argument | @@ -108,7 +108,7 @@ For details, see [Operator Precedence](https://dev.mysql.com/doc/refman/5.7/en/o | [<=](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_less-than-or-equal) | Less than or equal operator | | [LIKE](https://dev.mysql.com/doc/refman/5.7/en/string-comparison-functions.html#operator_like) | Simple pattern matching | | [NOT BETWEEN ... AND ...](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_not-between) | Check whether a value is not within a range of values | -| [!=, <>](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_not-equal) | Not equal operator | +| [!=, `<>`](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_not-equal) | Not equal operator | | [NOT IN()](https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_not-in) | Check whether a value is not within a set of values | | [NOT LIKE](https://dev.mysql.com/doc/refman/5.7/en/string-comparison-functions.html#operator_not-like) | Negation of simple pattern matching | | [STRCMP()](https://dev.mysql.com/doc/refman/5.7/en/string-comparison-functions.html#function_strcmp) | Compare two strings | diff --git a/sql-mode.md b/sql-mode.md index f2e082934c07a..f1d7fdf7ec5c4 100644 --- a/sql-mode.md +++ b/sql-mode.md @@ -43,7 +43,7 @@ Ensure that you have `SUPER` privilege when setting SQL mode at `GLOBAL` level, | `NO_ZERO_IN_DATE` | Strict mode, where dates with a month or day part of `0` are not accepted. If you use the `IGNORE` option, TiDB inserts '0000-00-00' for a similar date. In non-strict mode, this date is accepted but a warning is returned. (full support) | `NO_ZERO_DATE` | Does not use '0000-00-00' as a legal date in strict mode. You can still insert a zero date with the `IGNORE` option. In non-strict mode, this date is accepted but a warning is returned. (full support)| | `ALLOW_INVALID_DATES` | In this mode, the system does not check the validity of all dates. It only checks the month value ranging from `1` to `12` and the date value ranging from `1` to `31`. The mode only applies to `DATE` and `DATATIME` columns. All `TIMESTAMP` columns need a full validity check. (full support) | -| `ERROR_FOR_DIVISION_BY_ZERO` | If this mode is enabled, the system returns an error when handling division by `0` in data-change operations (`INSERT` or `UPDATE`).
If this mode is not enabled, the system returns a warning and `NULL` is used instead. (full support) | +| `ERROR_FOR_DIVISION_BY_ZERO` | If this mode is enabled, the system returns an error when handling division by `0` in data-change operations (`INSERT` or `UPDATE`).
If this mode is not enabled, the system returns a warning and `NULL` is used instead. (full support) | | `NO_AUTO_CREATE_USER` | Prevents `GRANT` from automatically creating new users, except for the specified password (full support)| | `HIGH_NOT_PRECEDENCE` | The precedence of the NOT operator is such that expressions such as `NOT a BETWEEN b AND c` are parsed as `NOT (a BETWEEN b AND c)`. In some older versions of MySQL, this expression is parsed as `(NOT a) BETWEEN b AND c`. (full support) | | `NO_ENGINE_SUBSTITUTION` | Prevents the automatic replacement of storage engines if the required storage engine is disabled or not compiled. (syntax support only)| diff --git a/sql-statements/sql-statement-grant-privileges.md b/sql-statements/sql-statement-grant-privileges.md index 0f9f81feb6dee..c611fc0a1d935 100644 --- a/sql-statements/sql-statement-grant-privileges.md +++ b/sql-statements/sql-statement-grant-privileges.md @@ -1,11 +1,11 @@ --- -title: GRANT | TiDB SQL Statement Reference -summary: An overview of the usage of GRANT for the TiDB database. +title: `GRANT ` | TiDB SQL Statement Reference +summary: An overview of the usage of GRANT `` for the TiDB database. category: reference aliases: ['/docs/v3.1/reference/sql/statements/grant-privileges/'] --- -# GRANT +# `GRANT ` This statement allocates privileges to a pre-existing user in TiDB. The privilege system in TiDB follows MySQL, where credentials are assigned based on a database/table pattern. @@ -66,6 +66,6 @@ mysql> SHOW GRANTS FOR 'newuser'; ## See also -* [REVOKE ](/sql-statements/sql-statement-revoke-privileges.md) +* [`REVOKE `](/sql-statements/sql-statement-revoke-privileges.md) * [SHOW GRANTS](/sql-statements/sql-statement-show-grants.md) * [Privilege Management](/privilege-management.md) diff --git a/sql-statements/sql-statement-revoke-privileges.md b/sql-statements/sql-statement-revoke-privileges.md index 22207e0554801..f8dfd954843ba 100644 --- a/sql-statements/sql-statement-revoke-privileges.md +++ b/sql-statements/sql-statement-revoke-privileges.md @@ -1,11 +1,11 @@ --- -title: REVOKE | TiDB SQL Statement Reference -summary: An overview of the usage of REVOKE for the TiDB database. +title: `REVOKE ` | TiDB SQL Statement Reference +summary: An overview of the usage of `REVOKE ` for the TiDB database. category: reference aliases: ['/docs/v3.1/reference/sql/statements/revoke-privileges/'] --- -# REVOKE +# `REVOKE ` This statement removes privileges from an existing user. @@ -81,6 +81,6 @@ This statement is understood to be fully compatible with MySQL. Any compatibilit ## See also -* [GRANT ](/sql-statements/sql-statement-grant-privileges.md) +* [`GRANT `](/sql-statements/sql-statement-grant-privileges.md) * [SHOW GRANTS](/sql-statements/sql-statement-show-grants.md) * [Privilege Management](/privilege-management.md) diff --git a/sql-statements/sql-statement-set-names.md b/sql-statements/sql-statement-set-names.md index 335a1b886a9ea..4a77ce358702c 100644 --- a/sql-statements/sql-statement-set-names.md +++ b/sql-statements/sql-statement-set-names.md @@ -76,6 +76,6 @@ This statement is understood to be fully compatible with MySQL. Any compatibilit ## See also -* [SHOW \[GLOBAL|SESSION\] VARIABLES](/sql-statements/sql-statement-show-variables.md) -* [SET ](/sql-statements/sql-statement-set-variable.md) +* [`SHOW [GLOBAL|SESSION] VARIABLES`](/sql-statements/sql-statement-show-variables.md) +* [`SET `](/sql-statements/sql-statement-set-variable.md) * [Character Set Support](/character-set-and-collation.md) diff --git a/sql-statements/sql-statement-set-transaction.md b/sql-statements/sql-statement-set-transaction.md index e55d900e82812..ed8989430f562 100644 --- a/sql-statements/sql-statement-set-transaction.md +++ b/sql-statements/sql-statement-set-transaction.md @@ -65,5 +65,5 @@ mysql> SHOW SESSION VARIABLES like 'transaction_isolation'; ## See also -* [SET \[GLOBAL|SESSION\] ](/sql-statements/sql-statement-set-variable.md) +* [`SET [GLOBAL|SESSION] `](/sql-statements/sql-statement-set-variable.md) * [Isolation Levels](/transaction-isolation-levels.md) diff --git a/sql-statements/sql-statement-set-variable.md b/sql-statements/sql-statement-set-variable.md index 1e52454ce762d..34e9122b12bba 100644 --- a/sql-statements/sql-statement-set-variable.md +++ b/sql-statements/sql-statement-set-variable.md @@ -1,11 +1,11 @@ --- -title: SET [GLOBAL|SESSION] | TiDB SQL Statement Reference -summary: An overview of the usage of SET [GLOBAL|SESSION] for the TiDB database. +title: `SET [GLOBAL|SESSION] ` | TiDB SQL Statement Reference +summary: An overview of the usage of `SET [GLOBAL|SESSION] ` for the TiDB database. category: reference aliases: ['/docs/v3.1/reference/sql/statements/set-variable/'] --- -# SET [GLOBAL|SESSION] +# `SET [GLOBAL|SESSION] ` The statement `SET [GLOBAL|SESSION]` modifies one of TiDB's built in variables, of either `SESSION` or `GLOBAL` scope. Note that similar to MySQL, changes to `GLOBAL` variables will not apply to either existing connections, or the local connection. Only new sessions will reflect the changes to the value. diff --git a/sql-statements/sql-statement-show-privileges.md b/sql-statements/sql-statement-show-privileges.md index 3332175b13a63..237c23f7a5ef4 100644 --- a/sql-statements/sql-statement-show-privileges.md +++ b/sql-statements/sql-statement-show-privileges.md @@ -65,4 +65,4 @@ This statement is understood to be fully compatible with MySQL. Any compatibilit ## See also * [SHOW GRANTS](/sql-statements/sql-statement-show-grants.md) -* [GRANT ](/sql-statements/sql-statement-grant-privileges.md) +* [`GRANT `](/sql-statements/sql-statement-grant-privileges.md) diff --git a/tidb-lightning/tidb-lightning-checkpoints.md b/tidb-lightning/tidb-lightning-checkpoints.md index fd86dd7192b79..069d5e37b8b35 100644 --- a/tidb-lightning/tidb-lightning-checkpoints.md +++ b/tidb-lightning/tidb-lightning-checkpoints.md @@ -7,7 +7,7 @@ aliases: ['/docs/v3.1/reference/tools/tidb-lightning/checkpoints/'] # TiDB Lightning Checkpoints -Importing a large database usually takes hours or days, and if such long running processes spuriously crashes, it can be very time-wasting to redo the previously completed tasks. To solve this, Lightning uses *checkpoints* to store the import progress, so that `tidb-lightning` continues importing from where it lefts off after restarting. +It usually takes hours or days to import a large database , and if such long running processes spuriously crashes, it can be very time-wasting to redo the previously completed tasks. To solve this, Lightning uses *checkpoints* to store the import progress, so that `tidb-lightning` continues importing from where it lefts off after restarting. This document describes how to enable, configure, store, and control *checkpoints*. diff --git a/tidb-lightning/tidb-lightning-tidb-backend.md b/tidb-lightning/tidb-lightning-tidb-backend.md index 9565e5a290f73..e6bed893e882a 100644 --- a/tidb-lightning/tidb-lightning-tidb-backend.md +++ b/tidb-lightning/tidb-lightning-tidb-backend.md @@ -100,7 +100,7 @@ on-duplicate = "replace" # or "error" or "ignore" TiDB Lightning using the TiDB-backend can completely replace functions of [Loader](/loader-overview.md). The following list shows how to translate Loader configurations into [TiDB Lightning configurations](/tidb-lightning/deploy-tidb-lightning.md#step-4-start-tidb-lightning). - +
LoaderTiDB Lightning
LoaderTiDB Lightning
diff --git a/tiflash/maintain-tiflash.md b/tiflash/maintain-tiflash.md index 76e213a08c24f..92457862a5d20 100644 --- a/tiflash/maintain-tiflash.md +++ b/tiflash/maintain-tiflash.md @@ -170,9 +170,9 @@ Take the following steps to handle the data file corruption: | Log Information | Log Description | |---------------|-------------------| -| [ 23 ] KVStore: Start to persist [region 47, applied: term 6 index 10] | Data starts to be replicated (the number in the square brackets at the start of the log refers to the thread ID | -| [ 30 ] CoprocessorHandler: grpc::Status DB::CoprocessorHandler::execute() | Handling DAG request, that is, TiFlash starts to handle a Coprocessor request | -| [ 30 ] CoprocessorHandler: grpc::Status DB::CoprocessorHandler::execute() | Handling DAG request done, that is, TiFlash finishes handling a Coprocessor request | +| [ 23 ] `` KVStore: Start to persist [region 47, applied: term 6 index 10] | Data starts to be replicated (the number in the square brackets at the start of the log refers to the thread ID | +| [ 30 ] `` CoprocessorHandler: grpc::Status DB::CoprocessorHandler::execute() | Handling DAG request, that is, TiFlash starts to handle a Coprocessor request | +| [ 30 ] `` CoprocessorHandler: grpc::Status DB::CoprocessorHandler::execute() | Handling DAG request done, that is, TiFlash finishes handling a Coprocessor request | You can find the beginning or the end of a Coprocessor request, and then locate the related logs of the Coprocessor request through the thread ID printed at the start of the log.