2011-04-28 19:56:10 +03:00
|
|
|
drop table if exists t1,t2,t3;
|
|
|
|
create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
|
|
|
|
insert into t1 (a) values (1),(2),(3);
|
|
|
|
alter online table t1 modify b int default 5;
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter online table t1 change b new_name int;
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter online table t1 modify e enum('a','b','c');
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter online table t1 comment "new comment";
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter online table t1 rename to t2;
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
2011-04-28 19:56:10 +03:00
|
|
|
drop table t1;
|
|
|
|
create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
|
|
|
|
insert into t1 (a) values (1),(2),(3);
|
|
|
|
alter online table t1 modify b int default 5;
|
|
|
|
alter online table t1 change b new_name int;
|
|
|
|
alter online table t1 modify e enum('a','b','c');
|
|
|
|
alter online table t1 comment "new comment";
|
|
|
|
alter online table t1 rename to t2;
|
2013-09-25 19:42:12 +02:00
|
|
|
drop table t2;
|
2011-04-28 19:56:10 +03:00
|
|
|
create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
|
|
|
|
insert into t1 (a) values (1),(2),(3);
|
|
|
|
alter online table t1 drop column b, add b int;
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter online table t1 modify b bigint;
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter online table t1 modify e enum('c','a','b');
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter online table t1 modify c varchar(50);
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter online table t1 modify c varchar(100);
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter online table t1 add f int;
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter online table t1 engine=memory;
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED.
|
2011-04-28 19:56:10 +03:00
|
|
|
alter table t1 engine=innodb;
|
|
|
|
alter table t1 add index (b);
|
|
|
|
alter online table t1 add index c (c);
|
|
|
|
alter online table t1 drop index b;
|
|
|
|
drop table t1;
|
|
|
|
create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
|
|
|
|
insert into t1 (a) values (1),(2),(3);
|
|
|
|
alter online table t1 drop column b, add b int;
|
|
|
|
alter online table t1 modify b bigint;
|
|
|
|
alter online table t1 modify e enum('c','a','b');
|
|
|
|
alter online table t1 modify c varchar(50);
|
|
|
|
alter online table t1 modify c varchar(100);
|
|
|
|
alter online table t1 add f int;
|
|
|
|
alter online table t1 engine=memory;
|
|
|
|
alter table t1 engine=innodb;
|
|
|
|
alter table t1 add index (b);
|
|
|
|
alter online table t1 add index c (c);
|
|
|
|
alter online table t1 drop index b;
|
|
|
|
drop table t1;
|
|
|
|
create table t1 (a int not null primary key, b int, c varchar(80));
|
|
|
|
create table t2 (a int not null primary key, b int, c varchar(80));
|
|
|
|
create table t3 (a int not null primary key, b int, c varchar(80)) engine=merge UNION=(t1);
|
|
|
|
alter online table t3 union=(t1,t2);
|
2013-09-25 19:42:12 +02:00
|
|
|
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
2011-04-28 19:56:10 +03:00
|
|
|
drop table t1,t2,t3;
|