List:General Discussion« Previous MessageNext Message »
From:Carsten Pedersen Date:June 20 2013 5:32pm
Subject:Re: How can I drop a table that
is named “logs/#sql-ib203” and appeare
d after MySQL crash?
View as plain text  
This may be a naive question, but I'm not sure I can see you've covered 
this: Have you tried "USE logs" before DROP TABLE `#sql-ib203` (without 
the "logs/" bit)?

/ Carsten

On 19-06-2013 21:00, Franck Dernoncourt wrote:
> 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