A
A
Aleks_ja2012-05-03 09:44:42
MySQL
Aleks_ja, 2012-05-03 09:44:42

MySQL: Alter Table script aborting (something bad might happen)?

I fell into the same rake again ...

I did not combine Alter Table in sql script into one instruction. And now I have been waiting for 6 hours and only 2 alter tables have been completed. But there are still 9 of them left :)

If you forcibly interrupt the execution of the script, can the table crash (I use MyIsam)? Or is something else bad going to happen?

Backup, of course, is. But in the plate there are 200 million records and a backup of the entire database - several tens of gigs.

What do you advise?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2012-05-03
@Aleks_ja

IMHO nothing crashes, with alter table a temporary table is created.

R
rPman, 2012-05-03
@rPman

If I'm not mistaken, almost any DDL operations with myisam in mysql are almost complete copying, i.e. a temporary table is created, data is poured there, after that the old ones are deleted and the created ones are renamed.
So there shouldn't be any problems.
ps backup/restoration of myisam tables is possible simply in the form of the files of the tables themselves (copy the entire /var/lib/mysql/database folder)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question