Skip to content

Commit

Permalink
system-variable: add a warning message for `tidb_partition_prune_mode…
Browse files Browse the repository at this point in the history
…` variable (#18857)
  • Loading branch information
Defined2014 authored Nov 22, 2024
1 parent 4145fbf commit eb8f74b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion partitioned-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
+--------------------------------+----------+-----------+------------------------+------------------------------------------------+
Expand Down
4 changes: 4 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -4192,6 +4192,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) 控制:是
Expand Down
2 changes: 1 addition & 1 deletion tiflash/use-tiflash-mpp-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit eb8f74b

Please sign in to comment.