Renamed MySQL table not renamed for INSERT queries?
- by Austin Hyde
After renaming one of my MySQL MyISAM tables from test_tablename to tablename, I have found that if I try to execute an INSERT (or REPLACE) query, I get the following message:
1146: Table 'dbname.test_tablename' doesn't exist
I have triple-checked my database abstraction code, and verified this by running the query directly on the server.
According to the MySQL server, the CREATE TABLE syntax is tablename, as expected, and when I run SHOW TABLES, it lists tablename as expected.
Is there any reason for this to happen?
More importantly, is there an easier way to fix this than dumping, dropping, re-creating, and reloading the table?