24 lines
453 B
Plaintext
24 lines
453 B
Plaintext
--source include/have_ndb.inc
|
|
|
|
#
|
|
# Test adding an index using inplace alter table
|
|
#
|
|
CREATE TABLE t1 (
|
|
a int PRIMARY KEY,
|
|
b varchar(32),
|
|
c int NOT NULL
|
|
) ENGINE = NDB;
|
|
|
|
INSERT INTO t1 VALUES
|
|
(1, "MySQL Server with NDB", 3),
|
|
(3, "The third row", 9),
|
|
(37, "And of course number 37", 37);
|
|
|
|
SELECT a FROM t1 WHERE c > 8 ORDER by c;
|
|
|
|
ALTER TABLE t1 ALGORITHM=INPLACE, ADD INDEX c_idx1(c);
|
|
|
|
SELECT a FROM t1 WHERE c > 8 ORDER by c;
|
|
|
|
DROP TABLE t1;
|