-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
sig/plannerSIG: PlannerSIG: Plannertype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Description
Enhancement
mysql> show create table t;
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t | CREATE TABLE `t` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
KEY `a` (`a`,`b`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> explain select * from t where a<=>null and b=1;
+--------------------------+---------+-----------+------------------------+---------------------------------------------------+
| id | estRows | task | access object | operator info |
+--------------------------+---------+-----------+------------------------+---------------------------------------------------+
| IndexReader_7 | 0.01 | root | | index:Selection_6 |
| └─Selection_6 | 0.01 | cop[tikv] | | eq(test.t.b, 1) |
| └─IndexRangeScan_5 | 10.00 | cop[tikv] | table:t, index:a(a, b) | range:[NULL,NULL], keep order:false, stats:pseudo |
+--------------------------+---------+-----------+------------------------+---------------------------------------------------+
3 rows in set (0.00 sec)
The range should be [NULL 1, NULL 1]
.
Metadata
Metadata
Assignees
Labels
sig/plannerSIG: PlannerSIG: Plannertype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.