MySQL Forums
Forum List  »  InnoDB

Re: Alter table killed, but change was done
Posted by: Rick James
Date: June 02, 2011 07:53PM

> perror 28
OS error code 28: No space left on device

There are several inconsistencies in what you describe.

These two statements will take less than a second:
CREATE TABLE table1_tmp like table1;
ALTER TABLE table1_tmp modify myColumn varchar(200);
So (I claim), you did not kill that ALTER. (Try them manually.)

Regardless of your AUTOCOMMIT setting (etc), this is perhaps the only statement in the script that can be rolled back:
INSERT INTO table1_tmp SELECT * FROM table1;

I believe you interrupted that. Perhaps that was creating a temp file for the SELECT, before shoveling the rows into the tmp table. This would explain the error 28, and the absence of the tmp table while the query was still running.

How could table1_tmp be removed??
CREATE TABLE table1_tmp like table1; -- This created it.
...
RENAME TABLE table1_tmp TO table1; -- This is the only thing to remove it; nothing else (in your script) will remove it.

As you say, strange.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Alter table killed, but change was done
809
June 02, 2011 07:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.