"/tmp"+"#" (pound) problem -> ERROR 126 (HY000): Incorrect key file for table '/tmp/#sql_9cd_0.MYI'; try to repair it
Hi everyone,
I got the following message while running a command:
mysql> create table snp_mart_58_2.TEMP468 as select distinct size_2019,name_2019,variation_id_2025_key,sample_id_2023,description_2019,display_2019,allele from snp_mart_58_2.TEMP467;
ERROR 126 (HY000): Incorrect key file for table '/tmp/#sql_9cd_0.MYI'; try to repair it
I'm not even sure if (1) I can access the tables in /tmp, (2) there's a way to get around that "#" character in the table name. I tried the following unsuccessfully:
mysql> repair table /tmp/#sql_9cd_0.MYI;
-> thinks the "#" is a comment and therefore ask me for ";"
mysql> repair table "/tmp/#sql_9cd_0.MYI";
mysql> repair table '/tmp/#sql_9cd_0.MYI';
mysql> repair table /tmp/\#sql_9cd_0.MYI;
mysql> repair table "#sql_9cd_0.MYI";
mysql> repair table '#sql_9cd_0.MYI';
-> You have an error in your SQL syntax...
mysql> repair table \#sql_9cd_0.MYI;
mysql> repair table please_repair_my_table_i_ll_get_you_more_ram; # clearly bribing doesn't work either :P
-> Table ... doesn't exist
A "desc" or "check" with all these combinations give the same output.
mysql> show tables like '%sql_9cd_0.MYI';
mysql> show tables like '%/tmp/%';
-> Empty set (0.00 sec)
Any help would be appreciated!
Thanks,
Anthony