Bug #30205 NDB: Dynamic on-line add column TEXT cause schema corruption
Submitted: 2 Aug 2007 15:47 Modified: 23 Nov 2007 10:11
Reporter: Jonathan Miller
Status: Closed
Category:Server: Cluster Severity:S2 (Serious)
Version:mysql-5.1-telco-6.2 OS:Linux
Assigned to: Martin Skold Target Version:6.0

[2 Aug 2007 15:47] Jonathan Miller
Description:
Once you add a Text column to a Dynamic table you are no longer able to access or drop
the table. If you try to access or drop the table you are told it does not exist. If you
do a "show tables" or an NDB_SHOW_TABLES it shows that the table exists.

Returns "Does not exist"
SELECT
INSERT
DROP
UPDATE
ndb_desc
ndb_drop_table

Returns that it does "exist"
SHOW TABLES;
ndb_show_tables

How to repeat:
CREATE TABLE t1 (a INT UNSIGNED KEY, b INT COLUMN_FORMAT DYNAMIC) ENGINE NDB;
INSERT INTO t1 values (1,1);
ALTER TABLE t1 ADD c TEXT;
INSERT INTO t1 values (2,1,"Test");
SELECT * FROM t1 ORDER BY a;
DROP TABLE t1;
[2 Aug 2007 16:07] Jonathan Miller
Assigning to Pekka per Pekka's request
[2 Aug 2007 18:48] Jonathan Miller
This also happens with LONGTEXT and BLOB
[23 Nov 2007 10:11] Jon Stephens
Thank you for your bug report. This issue has already been fixed in the latest released
version of that product, which you can download at

  http://www.mysql.com/downloads/

Documented as follows in 5.1.22-ndb-6.2.9 and 6.0.3 changelogs:

      After adding a new column of one of the TEXT or
      BLOB types to an NDB table
      which used COLUMN_FORMAT = DYNAMIC, it was no
      longer possible to access or drop the table using SQL.