List:Cluster« Previous MessageNext Message »
From:Jim Hoadley Date:March 30 2005 6:58pm
Subject:Cluster Limitations and schema changes
View as plain text  
Under Section 16.8 of the Cluster documentation (Cluster Limitations in MySQL
4.1) it is stated:

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

What is the recommended procedure for adding a COLUMN to a database table,
then, when the storage engine is ndbcluster?

-- Jim Hoadley
   Sr Software Eng
   Dealer Fusion INc


P.S. I've found that COLUMNs added to one ndbcluster node aren't visible on
another node immediately, but that issuing a SELECT resolves this issue. Is
this a "recommended" way?

mysql> DESC dog;
+---------------+-------------+------+-----+---------+----------------+
| Field         | Type        | Null | Key | Default | Extra          |
+---------------+-------------+------+-----+---------+----------------+
| id            | int(11)     |      | PRI | NULL    | auto_increment |
| name          | varchar(20) | YES  |     | NULL    |                |
| breed         | varchar(50) | YES  |     | NULL    |                |
| textfield     | text        | YES  |     | NULL    |                |
| resource_test | varchar(10) | YES  |     | NULL    |                |
+---------------+-------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

mysql> SELECT * FROM dog LIMIT 1;
ERROR 1146 (42S02): Table 'test.dog' doesn't exist

mysql> DESC dog;
+---------------+-------------+------+-----+---------+----------------+
| Field         | Type        | Null | Key | Default | Extra          |
+---------------+-------------+------+-----+---------+----------------+
| id            | int(11)     |      | PRI | NULL    | auto_increment |
| name          | varchar(20) | YES  |     | NULL    |                |
| breed         | varchar(50) | YES  |     | NULL    |                |
| textfield     | text        | YES  |     | NULL    |                |
| resource_test | varchar(10) | YES  |     | NULL    |                |
| woof          | varchar(10) | YES  |     | NULL    |                |
+---------------+-------------+------+-----+---------+----------------+
6 rows in set (0.04 sec)

mysql> SELECT * FROM dog LIMIT 1;
+------+-------+-------+-----------+---------------+------+
| id   | name  | breed | textfield | resource_test | woof |
+------+-------+-------+-----------+---------------+------+
| 1848 | Rover | Mutt  | NULL      | NULL          | NULL |
+------+-------+-------+-----------+---------------+------+
1 row in set (0.00 sec)







		
__________________________________ 
Do you Yahoo!? 
Make Yahoo! your home page 
http://www.yahoo.com/r/hs
Thread
Cluster Limitations and schema changesJim Hoadley30 Mar