6 messages in com.mysql.lists.clusterRe: Alter table clarification
FromSent OnAttachments
Nathan McCall05 May 2005 12:12 
Jonas Oreland06 May 2005 00:51 
Kris Buytaert17 May 2005 08:07 
Jon Stephens17 May 2005 08:29 
Stewart Smith17 May 2005 19:51 
Jon Stephens17 May 2005 23:47 
Subject:Re: Alter table clarification
From:Jonas Oreland (jona@mysql.com)
Date:05/06/2005 12:51:23 AM
List:com.mysql.lists.cluster

Hi Nathan,

The problem with our current impl. of alter table is the following. If using 2 mysqld's. * One can start the the alter table. * But since it does not lock the table, the other can continue making
insert/update/delete. * The first mysqld can then miss some insert/update/deletes made by the second
mysqld.

And the new table (after the alter table) will be inconsistent. So if you're only running one mysqld, your fine. If you're using more than one, be careful when using alter table.

/Jonas

Folks,

I would like to ask for a clarification regarding the ramifications of ALTER TABLE commands against NDB tables.

In chapter 16, section 8 of the reference manual, it seems pretty clear that on-line ALTER commands are not supported:

"It is not possible to make online schema changes such as those accomplished using ALTER TABLE or CREATE INDEX."

Yet a few bullet points above this it states:

"ALTER TABLE is not fully locking when running multiple MySQL servers (no distributed table lock)."

I also found this bit from a few days ago on this list:

"When you do an alter table, a new copy of the table is created and the is copied to that table, which is later renamed to the original, and the original table is removed." (http://lists.mysql.com/cluster/1864)

I did a few experiments with alterations that seemed to work and propagate fine. Please clarify for me what the limitations are on table alterations. Other than this small bit of confusion, I have been quite pleased with the NDB cluster engine!

Cheers,

Nathan

----------------------------------- Nathan McCall Senior Software Engineer SunRocket, Inc.

-----------------------------------