MySQL Lists are EOL. Please join:

List:Cluster« Previous MessageNext Message »
From:Jonathan Haddad Date:November 14 2007 1:51am
Subject:Re: Alter table in 5.0.45
View as plain text  
So I assume I would need enough data memory to make the temporary table - so
if I have 6GB allocated to ndbd, and 3.2 GB used, I will not be able to add
another column, even in single user mode?

On 11/13/07, Matthew Montgomery <mmontgomery@stripped> wrote:
> Hello Jonathan,
> On Tue, 2007-11-13 at 12:07 -0800, Jonathan Haddad wrote:
> > I'm setting up my first mysql cluster, and just wanted some
> clarification on
> > a few things.
> >
> > In the manual, it says:
> >    -
> >    *Online schema changes. * It is not possible to make online schema
> >    changes such as those accomplished using ALTER TABLE or CREATE INDEX,
> >    as the NDB Cluster engine does not support autodiscovery of such
> >    changes. (However, you can import or create a table that uses a
> different
> >    storage engine, and then convert it to NDB using ALTER TABLE
> *tbl_name
> >    * ENGINE=NDBCLUSTER. In such a case, you must issue a FLUSH
> >    TABLES statement to force the cluster to pick up the change.)
> >
> >
> >
> > However, on the cluster limitations page, it says:
> >
> > *DDL operations. * DDL operations (such as CREATE TABLE or ALTER TABLE)
> are
> > not safe from data node failures. If a data node fails while trying to
> > peform one of these, the data dictionary is locked and no further DDL
> > statements can be executed without restarting the cluster.
> >
> > It's not clear to me whether or not I can alter tables.  Can I add
> columns
> > and indexes once the cluster is being used?  Thanks.
> Yes, you can alter the table.  However, In 5.0 it is not an online
> operation.  NDB will need to lock the target table, create a temporary
> table, copy all rows into it and rename the new on to the original ones
> name.  Also, The other mysqld nodes in the cluster will not
> auto-discover the schema changes.  You should put the cluster into
> single user mode when doing schema changes.  This will force all the SQL
> nodes where the change was not issued on to reconnect and regenerate
> their local cached copy of the table schemas.
> --
> Matthew Montgomery, Support Engineer
> San Antonio, TX
> MySQL Inc,

Jon Haddad

Alter table in 5.0.45Jonathan Haddad13 Nov
  • Re: Alter table in 5.0.45Matthew Montgomery14 Nov
    • Re: Alter table in 5.0.45Jonathan Haddad14 Nov
      • Re: Alter table in 5.0.45Stewart Smith14 Nov
  • Re: Alter table in 5.0.45Stewart Smith14 Nov