polardbxengine/mysql-test/suite/ndbcluster/alter_copying.result

24 lines
594 B
Plaintext

CREATE TABLE t1 (
a int PRIMARY KEY,
b varchar(255)
) ENGINE = NDB;
INSERT INTO t1 VALUES (1, "MySQL Server with NDB");
INSERT INTO t1 (a, b) VALUES (11, "Barrier effect");
INSERT INTO t1 (a, b) VALUES
(12, "The third row"),
(37, "And of course number 37");
SELECT * FROM t1 ORDER BY a;
a b
1 MySQL Server with NDB
11 Barrier effect
12 The third row
37 And of course number 37
ALTER TABLE t1 ALGORITHM=COPY, ADD COLUMN c INT NOT NULL DEFAULT 14;
SELECT * FROM t1 ORDER BY a;
a b c
1 MySQL Server with NDB 14
11 Barrier effect 14
12 The third row 14
37 And of course number 37 14
DROP TABLE t1;