All DDL is performed online. See also Online Schema Changes
Xpand supports standard MySQL DDL to CREATE, ALTER, and DROP objects, always with online schema changes. See below list of caveats.
Xpand also supports the following Xpand-specific DDL:
Xpand executes comments using the format:
/*$ xpand-specific comment */
These comments are ignored by other databases. Xpand does not execute any other format of comments.
Xpand does not support:
CREATE TABLE CountryLanguage (id INT, IsOfficial enum('T','F') NOT NULL default 1);
results in a default value of 'T'.
Xpand allows specifying a default value for ENUM that is not in the list of possible values, e.g. CREATE TABLE Sunny (Pig ENUM('little', 'big') DEFAULT 'pink');
Xpand does not trim trailing whitespaces in ENUM values.
Xpand does not raise an error if a NOT NULL column specifies NULL as the default value but treats the columns as NOT NULL.
Xpand does not recommend using the FLOAT data type for primary keys.
If you create a view using SELECT *, the view definition will change if the underlying table definition changes.
To drop a primary key, specify LOCK=SHARED as part of the ALTER statement:
sql> ALTER TABLE T1 DROP PRIMARY KEY, LOCK=SHARED;