Wrong CREATE_TIME for partitioned table

Bug #1730510 reported by Sveta Smirnova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Triaged
Medium
Unassigned
5.6
Triaged
Medium
Unassigned
5.7
Triaged
Medium
Unassigned
8.0
Triaged
Medium
Unassigned

Bug Description

information_schema.partitions table contains has wrong CREATE_TIME and UPDATE_TIME for partitioned tables.

How to repeat.

CREATE TABLE t1 (
id INT,
year_col INT
)
PARTITION BY RANGE (year_col) (
PARTITION p0 VALUES LESS THAN (1991),
PARTITION p1 VALUES LESS THAN (1995),
PARTITION p2 VALUES LESS THAN (1999)
);
select TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, CREATE_TIME, UPDATE_TIME from information_schema.partitions where table_schema='test';
TABLE_SCHEMA TABLE_NAME PARTITION_NAME CREATE_TIME UPDATE_TIME
test t1 p0 2017-11-06 23:11:28 NULL
test t1 p1 2017-11-06 23:11:28 NULL
test t1 p2 2017-11-06 23:11:28 NULL
ALTER TABLE t1 ADD PARTITION (PARTITION p3 VALUES LESS THAN (2002));
select TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, CREATE_TIME, UPDATE_TIME from information_schema.partitions where table_schema='test';
TABLE_SCHEMA TABLE_NAME PARTITION_NAME CREATE_TIME UPDATE_TIME
test t1 p0 2017-11-06 23:11:39 NULL
test t1 p1 2017-11-06 23:11:39 NULL
test t1 p2 2017-11-06 23:11:39 NULL
test t1 p3 2017-11-06 23:11:39 NULL

You see what CREATE_TIME updated for all partitions when I added only one.

This can be result of bad fix for https://bugs.mysql.com/bug.php?id=69990

Suggested fix: display time when each of partitions was created

summary: - Wrong CREATE_TIME and UPDATE_TIME for partitioned table
+ Wrong CREATE_TIME for partitioned table
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1825

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.