by itake · 4y ago · 0 comments
Probably not worth the hassle though.
In this case, RENAME TABLE x TO y, and watch or wait for a process to fail in test/QA/UAT/etc.
Have a DROP ready, but also a RENAME back.
A production quality MySQL or MariaDB installation should have enabled binary logging and maybe delayed replication to handle any issues.
(I just wanted to win the prize for the most HNey comment ever!)
The code change may of landed the day before that disabled accessing that table, but the tool would warn that the table was still in use.
A quarterly cron job may access the table and go undetected if you look purely at the recency.
The rename strategy protects the data and offers easy rollback. This is a false heuristic.