Repository navigation
truncate one partition ,the 'create_time' of all partition tables has been updated #59238
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create partition table
CREATE TABLE t ( a INT, b INT, INDEX idx(b))
PARTITION BY RANGE( a ) (
PARTITION p1 VALUES LESS THAN (10000),
PARTITION p2 VALUES LESS THAN (20000),
PARTITION p3 VALUES LESS THAN (MAXVALUE) ) ;check the create_time
select table_name,partition_name,tidb_partition_id,create_time from information_schema.partitions where table_name = 't';truncate one partition p1
alter table t truncate partition p1;check the create_time ,
select table_name,partition_name,tidb_partition_id,create_time from information_schema.partitions where table_name = 't';2. What did you expect to see? (Required)
'create_time' of partition p1 was updated, and create_time of other partitions was not updated.
3. What did you see instead (Required)
The 'creat_time' of all partition tables has been updated

4. What is your TiDB version? (Required)
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v7.5.3
Edition: Community
Git Commit Hash: 70bfd90
Git Branch: HEAD
UTC Build Time: 2024-07-31 13:17:12
GoVersion: go1.21.10
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Activity
lance6716 commentedon Feb 5, 2025
Currently we didn't write these values as MySQL's definition https://dev.mysql.com/doc/refman/8.4/en/information-schema-partitions-table.html
[-]truncate one partition ,the 'creat_time' of all partition tables has been updated[/-][+]truncate one partition ,the 'create_time' of all partition tables has been updated[/+]ddl, meta: don't update `tblInfo.UpdateTS` for exchangePartition and …
ddl, meta: don't update `tblInfo.UpdateTS` for exchangePartition and …