Does mysqldump
preserve the create_time
and update_time
attributes that are output by show table status from
?
If not, is there an option that does this?
From the manual it looks like mysqldump preserves this data if you export to XML.
EDIT: Well the data is included in the export. Whether it's read in at the other end I'm not sure.
Is there a way to do this with a normal .sql
dump?
Best Answer
There is no way to reload the INFORMATION_SCHEMA manually. All the tables are dynamica entities. For instance, look at
INFORMATION_SCHEMA.TABLES
:It is a temporary table. If you restart mysql, how does it get populated? Evidently, it is popoulated during mysql startup. What would be included? Retrieve OS metadata of the table.
Let's look at mysql.user from the OS
Let's look at mysql.user from the mysql client:
Please notice the following
.frm
isJun 5 2012
CREATE_TIME: 2012-06-05 23:45:23
.MYD
isJul 15 23:29
UPDATE_TIME: 2012-07-15 23:29:05
The OS metadata for
mysql.user
is loaded intoINFORMATION_SCHEMA.TABLES
on mysql startup and is updated through INSERTs, UPDATEs and DELETEs.SUMMARY
While you can mysqldump
INFORMATION_SCHEMA.TABLES
, it is impossible to manually reload it. Theoretically, you could shutdown mysql, tweek the OS clock, tweek every file, then startup mysql. It's not worth the effort.