Skip to content
2 changes: 1 addition & 1 deletion check-before-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ sysctl -p

## Check and stop the firewall service of target machines

In TiDB clusters, the access ports between nodes must be open to ensure the transmission of information such as read and write requests and data heartbeats. In common online scenarios, the data interaction between the database and the application service and between the database nodes are all made within a secure network. Therefore, if there are no special security requirements, it is recommended to stop the firewall of the target machine. Otherwise, refer to [the port usage](/hardware-and-software-requirements.md#network-requirements) and add the needed port information to the whitelist of the firewall service.
In TiDB clusters, the access ports between nodes must be open to ensure the transmission of information such as read and write requests and data heartbeats. In common online scenarios, the data interaction between the database and the application service and between the database nodes are all made within a secure network. Therefore, if there are no special security requirements, it is recommended to stop the firewall of the target machine. Otherwise, refer to [the port usage](/hardware-and-software-requirements.md#network-requirements) and add the needed port information to the allowlist of the firewall service.

The rest of this section describes how to stop the firewall service of a target machine.

Expand Down
2 changes: 1 addition & 1 deletion configure-time-zone.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ In this example, no matter how you adjust the value of the time zone, the value
> **Note:**
>
> - Time zone is involved during the conversion of the value of Timestamp and Datetime, which is handled based on the current `time_zone` of the session.
> - For data migration, you need to pay special attention to the time zone setting of the master database and the slave database.
> - For data migration, you need to pay special attention to the time zone setting of the primary database and the secondary database.
26 changes: 13 additions & 13 deletions functions-and-operators/expressions-pushed-down.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aliases: ['/docs/dev/functions-and-operators/expressions-pushed-down/','/docs/de

# List of Expressions for Pushdown

When TiDB reads data from TiKV, TiDB tries to push down some expressions (including calculations of functions or operators) to be processed to TiKV. This reduces the amount of transferred data and offloads processing from a single TiDB node. This document introduces the expressions that TiDB already supports pushing down and how to prohibit specific expressions from being pushed down using blacklist.
When TiDB reads data from TiKV, TiDB tries to push down some expressions (including calculations of functions or operators) to be processed to TiKV. This reduces the amount of transferred data and offloads processing from a single TiDB node. This document introduces the expressions that TiDB already supports pushing down and how to prohibit specific expressions from being pushed down using blocklist.

## Supported expressions for pushdown

Expand All @@ -19,9 +19,9 @@ When TiDB reads data from TiKV, TiDB tries to push down some expressions (includ
| [JSON functions](/functions-and-operators/json-functions.md) | [JSON_TYPE(json_val)][json_type],<br/> [JSON_EXTRACT(json_doc, path[, path] ...)][json_extract],<br/> [JSON_UNQUOTE(json_val)][json_unquote],<br/> [JSON_OBJECT(key, val[, key, val] ...)][json_object],<br/> [JSON_ARRAY([val[, val] ...])][json_array],<br/> [JSON_MERGE(json_doc, json_doc[, json_doc] ...)][json_merge],<br/> [JSON_SET(json_doc, path, val[, path, val] ...)][json_set],<br/> [JSON_INSERT(json_doc, path, val[, path, val] ...)][json_insert],<br/> [JSON_REPLACE(json_doc, path, val[, path, val] ...)][json_replace],<br/> [JSON_REMOVE(json_doc, path[, path] ...)][json_remove] |
| [Date and time functions](/functions-and-operators/date-and-time-functions.md) | [`DATE_FORMAT()`](https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date-format) |

## Blacklist specific expressions
## Blocklist specific expressions

If unexpected behavior occurs during the calculation of a function caused by its pushdown, you can quickly restore the application by blacklisting that function. Specifically, you can prohibit an expression from being pushed down by adding the corresponding functions or operator to the blacklist `mysql.expr_pushdown_blacklist`.
If unexpected behavior occurs during the calculation of a function caused by its pushdown, you can quickly restore the application by blocklisting that function. Specifically, you can prohibit an expression from being pushed down by adding the corresponding functions or operator to the blocklist `mysql.expr_pushdown_blacklist`.

The schema of `mysql.expr_pushdown_blacklist` is as follows:

Expand All @@ -41,29 +41,29 @@ Field description:

+ `name`: the name of the function that is prohibited from being pushed down.
+ `store_type`: specifies to which storage engine the function is prohibited from being pushed down. Currently, TiDB supports the three storage engines: `tikv`, `tidb`, and `tiflash`. `store_type` is case-insensitive. If a function is prohibited from being pushed down to multiple storage engines, use a comma to separate each engine.
+ `reason` : The reason why the function is blacklisted.
+ `reason` : The reason why the function is blocklisted.

### Add to the blacklist
### Add to the blocklist

To add one or more functions or operators to the blacklist, perform the following steps:
To add one or more functions or operators to the blocklist, perform the following steps:

1. Insert the function or operator name and the collection of storage types to be prohibited from the function pushdown to `mysql.expr_pushdown_blacklist`.

2. Execute the `admin reload expr_pushdown_blacklist;` command.
Comment on lines 50 to 52
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that we need to modify words in the two steps first, to keep consistency and avoid confusion.


### Remove from the blacklist
### Remove from the blocklist

To remove one or more functions or operators from the blacklist, perform the following steps:
To remove one or more functions or operators from the blocklist, perform the following steps:

1. Delete the function or operator name in `mysql.expr_pushdown_blacklist`.

2. Execute the `admin reload expr_pushdown_blacklist;` command.

### Blacklist usage examples
### Blocklist usage examples

The following example demonstrates how to add the `<` and `>` operators to the blacklist, then remove `>` from the blacklist.
The following example demonstrates how to add the `<` and `>` operators to the blocklist, then remove `>` from the blocklist.

You can see whether the blacklist takes effect by checking the results returned by `EXPLAIN` statement (See [Understanding `EXPLAIN` results](/query-execution-plan.md)).
You can see whether the blocklist takes effect by checking the results returned by `EXPLAIN` statement (See [Understanding `EXPLAIN` results](/query-execution-plan.md)).

```sql
tidb> create table t(a int);
Expand Down Expand Up @@ -117,8 +117,8 @@ tidb> explain select * from t where a < 2 and a > 2;
> **Note:**
>
> - `admin reload expr_pushdown_blacklist` only takes effect on the TiDB server that executes this SQL statement. To make it apply to all TiDB servers, execute the SQL statement on each TiDB server.
> - The feature of blacklisting specific expressions is supported in TiDB 3.0.0 or later versions.
> - TiDB 3.0.3 or earlier versions does not support adding some of the operators (such as ">", "+", "is null") to the blacklist by using their original names. You need to use their aliases (case-sensitive) instead, as shown in the following table:
> - The feature of blocklisting specific expressions is supported in TiDB 3.0.0 or later versions.
> - TiDB 3.0.3 or earlier versions does not support adding some of the operators (such as ">", "+", "is null") to the blocklist by using their original names. You need to use their aliases (case-sensitive) instead, as shown in the following table:

| Operator Name | Aliases |
| :-------- | :---------- |
Expand Down
8 changes: 4 additions & 4 deletions information-schema/information-schema-inspection-result.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ select * from information_schema.inspection_rules where type='inspection';

In the `config` diagnostic rule, the following two diagnostic rules are executed by querying the `CLUSTER_CONFIG` system table:

* Check whether the configuration values of the same component are consistent. Not all configuration items has this consistency check. The white list of consistency check is as follows:
* Check whether the configuration values of the same component are consistent. Not all configuration items has this consistency check. The allowlist of consistency check is as follows:

```go
// The whitelist of the TiDB configuration consistency check
// The allowlist of the TiDB configuration consistency check
port
status.status-port
host
Expand All @@ -200,7 +200,7 @@ In the `config` diagnostic rule, the following two diagnostic rules are executed
log.slow-query-file
tmp-storage-path

// The whitelist of the PD configuration consistency check
// The allowlist of the PD configuration consistency check
advertise-client-urls
advertise-peer-urls
client-urls
Expand All @@ -211,7 +211,7 @@ In the `config` diagnostic rule, the following two diagnostic rules are executed
name
peer-urls

// The whitelist of the TiKV configuration consistency check
// The allowlist of the TiKV configuration consistency check
server.addr
server.advertise-addr
server.status-addr
Expand Down
12 changes: 6 additions & 6 deletions migrate-from-aurora-mysql-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,20 @@ mysql-instances:
-
# ID of the upstream instance or the replication group. Refer to the configuration of `source_id` in the `inventory.ini` file or configuration of `source-id` in the `dm-master.toml` file.
source-id: "mysql-replica-01"
# The configuration item name of the black and white lists of the schema or table to be replicated, used to quote the global black and white lists configuration. For global configuration, see the `black-white-list` below.
black-white-list: "global"
# The configuration item name of the block and allow lists of the schema or table to be replicated, used to quote the global block and allow lists configuration. For global configuration, see the `block-allow-list` below.
block-allow-list: "global"
# The configuration item name of Mydumper, used to quote the global Mydumper configuration.
mydumper-config-name: "global"

-
source-id: "mysql-replica-02"
black-white-list: "global"
block-allow-list: "global"
mydumper-config-name: "global"

# The global configuration of black and white lists. Each instance can quote it by the configuration item name.
black-white-list:
# The global configuration of block and allow lists. Each instance can quote it by the configuration item name.
block-allow-list:
global:
do-tables: # The white list of the upstream table to be replicated
do-tables: # The allow list of the upstream table to be replicated
- db-name: "test_db" # The database name of the table to be replicated
tbl-name: "test_table" # The name of the table to be replicated

Expand Down
2 changes: 1 addition & 1 deletion online-deployment-using-ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ To enable the following control variables, use the capitalized `True`. To disabl
| tidb_version | the version of TiDB, configured by default in TiDB Ansible branches |
| process_supervision | the supervision way of processes, `systemd` by default, `supervise` optional |
| timezone | the global default time zone configured when a new TiDB cluster bootstrap is initialized; you can edit it later using the global `time_zone` system variable and the session `time_zone` system variable as described in [Time Zone Support](/configure-time-zone.md); the default value is `Asia/Shanghai` and see [the list of time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for more optional values |
| enable_firewalld | to enable the firewall, closed by default; to enable it, add the ports in [network requirements](/hardware-and-software-requirements.md#network-requirements) to the white list |
| enable_firewalld | to enable the firewall, closed by default; to enable it, add the ports in [network requirements](/hardware-and-software-requirements.md#network-requirements) to the allowlist |
| enable_ntpd | to monitor the NTP service of the managed node, True by default; do not close it |
| set_hostname | to edit the hostname of the managed node based on the IP, False by default |
| enable_binlog | whether to deploy Pump and enable the binlog, False by default, dependent on the Kafka cluster; see the `zookeeper_addrs` variable |
Expand Down
2 changes: 1 addition & 1 deletion releases/release-3.0-ga.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ On June 28, 2019, TiDB 3.0 GA is released. The corresponding TiDB Ansible versio
- Improve the performance of `admin show ddl jobs` by supporting scanning data in reverse order
- Add the `split table region` statement to manually split the table Region to alleviate hotspot issues
- Add the `split index region` statement to manually split the index Region to alleviate hotspot issues
- Add a blacklist to prohibit pushing down expressions to Coprocessor
- Add a blocklist to prohibit pushing down expressions to Coprocessor
- Optimize the `Expensive Query` log to print the SQL query in the log when it exceeds the configured limit of execution time or memory
+ DDL
- Support migrating from character set `utf8` to `utf8mb4`
Expand Down
2 changes: 1 addition & 1 deletion releases/release-3.0.0-rc.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ On June 21, 2019, TiDB 3.0.0-rc.3 is released. The corresponding TiDB Ansible ve
- Add the `split table region` statement to manually split the table Region to alleviate the hotspot issue [#10765](https://github.com/pingcap/tidb/pull/10765)
- Add the `split index region` statement to manually split the index Region to alleviate the hotspot issue [#10764](https://github.com/pingcap/tidb/pull/10764)
- Fix the incorrect execution issue when you execute multiple statements such as `create user`, `grant`, or `revoke` consecutively [#10737](https://github.com/pingcap/tidb/pull/10737)
- Add a blacklist to prohibit pushing down expressions to Coprocessor [#10791](https://github.com/pingcap/tidb/pull/10791)
- Add a blocklist to prohibit pushing down expressions to Coprocessor [#10791](https://github.com/pingcap/tidb/pull/10791)
- Add the feature of printing the `expensive query` log when a query exceeds the memory configuration limit [#10849](https://github.com/pingcap/tidb/pull/10849)
- Add the `bind-info-lease` configuration item to control the update time of the modified binding execution plan [#10727](https://github.com/pingcap/tidb/pull/10727)
- Fix the OOM issue in high concurrent scenarios caused by the failure to quickly release Coprocessor resources, resulted from the `execdetails.ExecDetails` pointer [#10832](https://github.com/pingcap/tidb/pull/10832)
Expand Down
2 changes: 1 addition & 1 deletion releases/release-3.0.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ TiDB Ansible version: 3.0.4
- Support using aliases for tables in the point queries (for example, `select * from t tmp where a = "aa"`) [#12282](https://github.com/pingcap/tidb/pull/12282)
- Fix the error occurred when not handling negative values as unsigned when inserting negative numbers into BIT type columns [#12423](https://github.com/pingcap/tidb/pull/12423)
- Fix the incorrectly rounding of time (for example, `2019-09-11 11:17:47.999999666` should be rounded to `2019-09-11 11:17:48`.) [#12258](https://github.com/pingcap/tidb/pull/12258)
- Refine the usage of expression blacklist (for example, `<` is equivalent to `It`.) [#11975](https://github.com/pingcap/tidb/pull/11975)
- Refine the usage of expression blocklist (for example, `<` is equivalent to `It`.) [#11975](https://github.com/pingcap/tidb/pull/11975)
- Add the database prefix to the message of non-existing function error (for example, `[expression:1305]FUNCTION test.std_samp does not exist`) [#12111](https://github.com/pingcap/tidb/pull/12111)
- Server
- Add the `Prev_stmt` field in slow query logs to output the previous statement when the last statement is `COMMIT` [#12180](https://github.com/pingcap/tidb/pull/12180)
Expand Down
2 changes: 1 addition & 1 deletion sql-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Ensure that you have `SUPER` privilege when setting SQL mode at `GLOBAL` level,
| `IGNORE_SPACE` | If this mode is enabled, the system ignores space. For example: "user" and "user " are the same. (full support)|
| `ONLY_FULL_GROUP_BY` | If a non-aggregated column that is referred to in `SELECT`, `HAVING`, or `ORDER BY` is absent in `GROUP BY`, this SQL statement is invalid, because it is abnormal for a column to be absent in `GROUP BY` but displayed by query. (full support) |
| `NO_UNSIGNED_SUBTRACTION` | Does not mark the result as `UNSIGNED` if an operand has no symbol in subtraction. (full support)|
| `NO_DIR_IN_CREATE` | Ignores all `INDEX DIRECTORY` and `DATA DIRECTORY` directives when a table is created. This option is only useful for slave replication servers (syntax support only) |
| `NO_DIR_IN_CREATE` | Ignores all `INDEX DIRECTORY` and `DATA DIRECTORY` directives when a table is created. This option is only useful for secondary replication servers (syntax support only) |
| `NO_KEY_OPTIONS` | When you use the `SHOW CREATE TABLE` statement, MySQL-specific syntaxes such as `ENGINE` are not exported. Consider this option when migrating across DB types using mysqldump. (syntax support only)|
| `NO_FIELD_OPTIONS` | When you use the `SHOW CREATE TABLE` statement, MySQL-specific syntaxes such as `ENGINE` are not exported. Consider this option when migrating across DB types using mysqldump. (syntax support only) |
| `NO_TABLE_OPTIONS` | When you use the `SHOW CREATE TABLE` statement, MySQL-specific syntaxes such as `ENGINE` are not exported. Consider this option when migrating across DB types using mysqldump. (syntax support only)|
Expand Down
4 changes: 2 additions & 2 deletions sql-statements/sql-statement-admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ The above statement is used to get the 64-bit checksum value of `tbl_name`. This
ADMIN RELOAD expr_pushdown_blacklist;
```

The above statement is used to reload the blacklist pushed down by the expression.
The above statement is used to reload the blocklist pushed down by the expression.

{{< copyable "sql" >}}

```sql
ADMIN RELOAD opt_rule_blacklist;
```

The above statement is used to reload the blacklist of logic optimization rules.
The above statement is used to reload the blocklist of logic optimization rules.

## `ADMIN PLUGINS` related statement

Expand Down
4 changes: 2 additions & 2 deletions sql-statements/sql-statement-flashback-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ If a table is dropped and the GC lifetime has passed, you can no longer use the

Pay attention to the following conditions and requirements when you enable TiDB Binlog and use the `FLASHBACK TABLE` statement:

* The downstream slave cluster must also support `FLASHBACK TABLE`.
* The GC lifetime of the slave cluster must be longer than that of the master cluster.
* The downstream secondary cluster must also support `FLASHBACK TABLE`.
* The GC lifetime of the secondary cluster must be longer than that of the primary cluster.
* The delay of replication between the upstream and downstream might also cause the failure to recover data to the downstream.
* If an error occurs when TiDB Binlog is replicating a table, you need to filter that table in TiDB Binlog and manually import all data of that table.

Expand Down
2 changes: 1 addition & 1 deletion sql-statements/sql-statement-recover-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ RECOVER TABLE BY JOB ddl_job_id
>
> - Binglog version is 3.0.1 or later.
> - TiDB 3.0 is used both in the upstream cluster and the downstream cluster.
> - The GC life time of the slave cluster must be longer than that of the master cluster. However, as latency occurs during data replication between upstream and downstream databases, data recovery might fail in the downstream.
> - The GC life time of the secondary cluster must be longer than that of the primary cluster. However, as latency occurs during data replication between upstream and downstream databases, data recovery might fail in the downstream.

### Troubleshoot errors during TiDB Binlog replication

Expand Down
2 changes: 1 addition & 1 deletion syncer-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ Before replicating data using Syncer, check the following items:

> **Note:**
>
> If there is a master-slave replication structure between the upstream MySQL/MariaDB servers, then choose the following version.
> If there is a source-replica replication structure between the upstream MySQL/MariaDB servers, then choose the following version.
>
> - 5.7.1 < MySQL version < 8.0
> - MariaDB version >= 10.1.3
Expand Down
Loading