Friday, September 7, 2018

[google-cloud-sql-discuss] Alter table fails with "ERROR 1034 (HY000): Incorrect key file for table xxx"

Hi,

I am trying to alter a table in a Google Cloud SQL database that has several million records and has couple of indexes on it. 

After a while (during which the space used on the db instance goes up by several GBs), the "alter table" command fails with the error: "ERROR 1034 (HY000): Incorrect key file for table xxx".

1) I searched for it and it seems that it often happens when the tmpdir goes short of space. The suggestions seemed to be that change the location of tmpdir for the MySql database to some place on file system where more storage is available. I don't really have that option on Google Cloud SQL setup, as far as I know.

2) I ran a "check table xxx" command on the mentioned table and it showed status=OK. So, there is no real corruption of the table involved anywhere. It just seems to be going short of space behind the scenes in the "alter table" on this heavy table.

Any suggestions please? Can I increase the tmpdir space on Google Cloud Sql setup for my project somehow? Can I change its location and give it more space somehow?

Cheers,

Roshan

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f3abdae4-9636-495b-9978-39b6d451a309%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment