Renamed MySQL table not renamed for INSERT queries?

Posted by Austin Hyde on Stack Overflow See other posts from Stack Overflow or by Austin Hyde
Published on 2010-12-24T20:38:35Z Indexed on 2010/12/24 20:54 UTC
Read the original article Hit count: 176

Filed under:

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?

© Stack Overflow or respective owner

Related posts about mysql