List:General Discussion« Previous MessageNext Message »
From:Franck Dernoncourt Date:June 19 2013 7:00pm
Subject:How can I drop a table that is named “logs/#sql-ib
203” and appeared after MySQL crash?
View as plain text  
Hi all,

A table `logs/#sql-ib203` appeared after a MySQL crash due to disk space
shortage while deleting some attributes in a table in the `logs` database
and adding an index.

`USE logs; SHOW TABLES;` does not list the table `logs/#sql-ib203`, but
when trying to `ALTER` the table that was being changed during the crash
MySQL complains about the existence of the table `logs/#sql-ib203`:

> ERROR 1050: Table 'logs/#sql-ib203' already exists
>
> SQL Statement:
>
> ALTER TABLE `logs`.`srv_logs` DROP COLUMN `filenum` , DROP COLUMN
> `agent` , DROP COLUMN `ip` , DROP COLUMN `event_source`

DROP TABLE `logs/#sql-ib203`; does not work, neither do some name variants
`/#sql-ib203`, `#sql-ib203`, `sql-ib203`. (respectively Error Code: 1051.
Unknown table 'logs.logs/#sql-ib203',  Error Code: 1051. Unknown table
'logs./#sql-ib203', Error Code: 1051. Unknown table 'logs.#sql-ib203' and
Error Code: 1051. Unknown table 'logs.sql-ib203'). Interestingly none of
these error messages display 'logs/#sql-ib203', which is the table name
MySQL complains it exists when I try to do ALTER.

I use innodb_file_per_table. There was a "mysql_datadir/logs/#sql-ib203.ibd"
file (or maybe .frm, sorry I forgot) that I deleted.

Any idea how to get rid of this ghostly table `logs/#sql-ib203`?

I use MySQL 5.6.12-winx64 and InnoDB.

Thanks,

----
Franck Dernoncourt
francky@stripped
http://francky.me

Thread
How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Franck Dernoncourt19 Jun
  • Re: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Reindl Harald19 Jun
    • RE: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Rick James20 Jun
      • Re: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Reindl Harald20 Jun
        • RE: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Rick James25 Jun
          • Re: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Reindl Harald25 Jun
      • Re: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Franck Dernoncourt20 Jun
  • Re: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Denis Jedig20 Jun
  • Re: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Carsten Pedersen20 Jun
    • Re: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Franck Dernoncourt20 Jun
  • Re: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?Jesper Wisborg Krogh21 Jun