-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-8.0affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.component/dumplingThis is related to Dumpling of TiDB.This is related to Dumpling of TiDB.severity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
mysql> create table t (a int, b varchar(255), primary key (a)) partition by hash(a) partitions 2;
Query OK, 0 rows affected (0.02 sec)
mysql> insert into t values (1, '1'), (2, '2'), (3, '3');
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> set @@tidb_partition_prune_mode='static';
Query OK, 0 rows affected (0.00 sec)
mysql> select * from t tablesample regions();
+---+------+
| a | b |
+---+------+
| 2 | 2 |
| 1 | 1 |
| 2 | 2 |
| 1 | 1 |
+---+------+
4 rows in set (0.00 sec)
mysql> set @@tidb_partition_prune_mode='dynamic';
Query OK, 0 rows affected, 2 warnings (0.00 sec)
mysql> select * from t tablesample regions();
+---+------+
| a | b |
+---+------+
| 2 | 2 |
| 1 | 1 |
+---+------+
2 rows in set (0.00 sec)
2. What did you expect to see? (Required)
Return the same result no matter whether it is dynamic or static node
3. What did you see instead (Required)
Dynamic and static mode return different results
4. What is your TiDB version? (Required)
Master
Metadata
Metadata
Assignees
Labels
affects-8.0affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.component/dumplingThis is related to Dumpling of TiDB.This is related to Dumpling of TiDB.severity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression