MySQL 5.1.x | Windows Server 2008
Data Directory is on a different partition.
I have an innodb database (innodb_file_per_table is set) that I'm trying to optimize and I don't appear to have enough space. When I run the optimize command, I see:
foodb.foo_table
note : Table does not support optimize, doing recreate + analyze instead
error : The table '#sql-123_foo' is full
status : Operation failed
My understanding is that when I run OPTIMIZE TABLE
, it's essentially running ALTER TABLE
behind the scenes and that usually needs to make a copy of the table. My question is, where is the table being created?
Best Answer
From the MySQL manual for 5.1:
In newer MySQL versions it gets a bit more complicated to explain because there is also an in-place fast ALTER TABLE, but for 5.1 the answer to your question is simply "in the table's directory".