Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Currently the CREATE_TIME column in SHOW TABLE STATUS output and in INFORMATION_SCHEMA.TABLES is populated from file system ctime information returned by the stat() system call.
ctime does not really contain a files creation time, but rather the last time the files metadata got changed. As this is often not changed after a file got created it may show the creation time, but it is not guaranteed.
Newer file systems like e.g. ext4 add another time field for the actual creating time, often also named birth time / btime. This additional field is available via the newer statx() variant of the classic stat() system call.
So the feature request is to use statx() instead of stat() where it is available, and to populate CREATE_TIME with the btime value if set, and to only fall back to ctime where btime is not available.
See also e.g.: https://man7.org/linux/man-pages/man2/statx.2.html
Attachments
Issue Links
- relates to
-
MDEV-29200 CREATE_TIME is newer than UPDATE_TIME in information_schema.TABLES
- Confirmed