Schrödingers MySQL table: exists, yet it does not

后端 未结 11 1889
野趣味
野趣味 2020-11-29 23:47

I am having the weirdest error of all.

Sometimes, when creating or altering tables, I get the \'table already exists\' error. However, DROP TABLE returns \'#1051 - u

11条回答
  •  余生分开走
    2020-11-29 23:58

    I was having this problem with one particular table. Reading the possible solutions i've did some steps like:

    • Search for orphan files: didn't exist anyone;
    • execute: show full tables in database;: didn't see the problematic one;
    • execute: describe table;: returned table doesn't exist;
    • execute: SELECT * FROM information_schema.TABLES WHERE TABLE_NAME='table';: returned Empty set;
    • Search by the phpMyAdmin manually the query above: didn't exist;

    And, after those steps, i check again with the show tables; and... vualá! the problematic table was gone. I could create it and drop it with the same problematic name with no problem, and i didn't have even to restart the server! Weird...

提交回复
热议问题