MySQLOnRocksDB/mysql-5.6
forked from facebook/mysql-5.6

Loading…
Check consistency between frm and MyRocks data dictionary at startup #91
I have this working to check the number of keys in the table. I thought about attempting to compare the table names, but wondered if that would run into problems when aliases were used. What other information do we store in the MyRocks data dictionary that you would like to see compared?
We store database_name.table_name in MyRocks data dictionary idx_id=0x1 (https://github.com/MySQLOnRocksDB/mysql-5.6/wiki/MyRocks-data-dictionary-format). We don't store aliases in MyRocks data dictionary.
Okay. I'll look into the table name further. Besides these two things, what should we check the consistency of?
Sorry I missed the last comment. I think checking database_name.table_name for all tables is fine. Checking indexes will need to parse frm file itself, which will make things more complex.
Optionally, check consistency between all frm files and all MyRocks data dictionary entries, and aborting if there is any mismatch.