Skip to content

system-variable: add a warning message for tidb_partition_prune_mode variable #18857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion partitioned-table.md
Original file line number Diff line number Diff line change
@@ -2033,7 +2033,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;
+--------------------------------+----------+-----------+------------------------+------------------------------------------------+
4 changes: 4 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
@@ -4174,6 +4174,10 @@ SHOW WARNINGS;

### `tidb_partition_prune_mode` <span class="version-mark">从 v5.1 版本开始引入</span>

> **警告:**
>
> 从 v8.5.0 开始,将该变量设置为 `static` 或 `static-only` 时会产生警告。该变量将在未来版本中废弃。

- 作用域:SESSION | GLOBAL
- 是否持久化到集群:是
- 是否受 Hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value) 控制:是
2 changes: 1 addition & 1 deletion tiflash/use-tiflash-mpp-mode.md
Original file line number Diff line number Diff line change
@@ -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 |