From eb8f74b8a3db86ea97133cb79f34c6d005842e5c Mon Sep 17 00:00:00 2001 From: Hangjie Mo Date: Fri, 22 Nov 2024 14:39:26 +0800 Subject: [PATCH] system-variable: add a warning message for `tidb_partition_prune_mode` variable (#18857) --- partitioned-table.md | 2 +- system-variables.md | 4 ++++ tiflash/use-tiflash-mpp-mode.md | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/partitioned-table.md b/partitioned-table.md index da7bb15257e4..d85aee94456f 100644 --- a/partitioned-table.md +++ b/partitioned-table.md @@ -2034,7 +2034,7 @@ mysql> create table t2 (id int, code int); Query OK, 0 rows affected (0.01 sec) mysql> set @@tidb_partition_prune_mode = 'static'; -Query OK, 0 rows affected (0.00 sec) +Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> explain select /*+ TIDB_INLJ(t1, t2) */ t1.* from t1, t2 where t2.code = 0 and t2.id = t1.id; +--------------------------------+----------+-----------+------------------------+------------------------------------------------+ diff --git a/system-variables.md b/system-variables.md index 93eae17e05d4..456c63f469df 100644 --- a/system-variables.md +++ b/system-variables.md @@ -4192,6 +4192,10 @@ SHOW WARNINGS; ### `tidb_partition_prune_mode` 从 v5.1 版本开始引入 +> **警告:** +> +> 从 v8.5.0 开始,将该变量设置为 `static` 或 `static-only` 时会产生警告。该变量将在未来版本中废弃。 + - 作用域:SESSION | GLOBAL - 是否持久化到集群:是 - 是否受 Hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value) 控制:是 diff --git a/tiflash/use-tiflash-mpp-mode.md b/tiflash/use-tiflash-mpp-mode.md index b48fc2658915..18ccda230420 100644 --- a/tiflash/use-tiflash-mpp-mode.md +++ b/tiflash/use-tiflash-mpp-mode.md @@ -132,7 +132,7 @@ Query OK, 0 rows affected (0.10 sec) mysql> ALTER table test.employees SET tiflash replica 1; Query OK, 0 rows affected (0.09 sec) mysql> SET tidb_partition_prune_mode=static; -Query OK, 0 rows affected (0.00 sec) +Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> explain SELECT count(*) FROM test.employees; +----------------------------------+----------+-------------------+-------------------------------+-----------------------------------+ | id | estRows | task | access object | operator info |