-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/tablepartitionThis issue is related to Table Partition of TiDB.This issue is related to Table Partition of TiDB.impact/panicseverity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
CREATE TABLE IF NOT EXISTS `testPartition` (
`OrderDate` DATETIME
) PARTITION BY HASH(
YEAR(`OrderDate`) * 10000 + MONTH(`OrderDate`) * 100 + DAYOFMONTH(`OrderDate`)
) PARTITIONS 50;
insert into `testPartition` value (NULL);
select * from `testPartition` where `OrderDate` is null;
2. What did you expect to see? (Required)
mysql> select * from `testPartition` where `OrderDate` is null;
+-----------+
| OrderDate |
+-----------+
| NULL |
+-----------+
1 row in set (0.00 sec)
3. What did you see instead (Required)
select * from `smartbimpp`.`testPartition` where `OrderDate` is null;
ERROR 1105 (HY000): runtime error: index out of range [2] with length 2
4. What is your TiDB version? (Required)
mysql> select tidb_version();
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.5.0-alpha-375-g1405c5e1a5
Edition: Community
Git Commit Hash: 1405c5e1a5ec86941f5c06d82a8502267c4740a6
Git Branch: master
UTC Build Time: 2024-12-18 07:44:22
GoVersion: go1.23.4
Race Enabled: false
Check Table Before Drop: false
Store: unistore |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
Metadata
Metadata
Assignees
Labels
affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/tablepartitionThis issue is related to Table Partition of TiDB.This issue is related to Table Partition of TiDB.impact/panicseverity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.