2018-05-14 23:24:26 +02:00
|
|
|
create table t (a int, v int as (a)) engine=innodb;
|
|
|
|
alter table t change column a b tinyint, algorithm=inplace;
|
2019-04-11 10:49:26 +02:00
|
|
|
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
|
2018-05-14 23:24:26 +02:00
|
|
|
show create table t;
|
|
|
|
Table Create Table
|
|
|
|
t CREATE TABLE `t` (
|
|
|
|
`a` int(11) DEFAULT NULL,
|
|
|
|
`v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
|
|
drop table t;
|
2018-12-16 18:32:05 +01:00
|
|
|
create temporary table t1 (a int, v int as (a));
|
|
|
|
alter table t1 change column a b int, algorithm=inplace;
|
|
|
|
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
|
|
|
show create table t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TEMPORARY TABLE `t1` (
|
|
|
|
`a` int(11) DEFAULT NULL,
|
|
|
|
`v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
|
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
|
|
|
create temporary table t2 (a int, v int as (a));
|
|
|
|
lock table t2 write;
|
|
|
|
alter table t2 change column a b int, algorithm=inplace;
|
|
|
|
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
|
|
|
show create table t2;
|
|
|
|
Table Create Table
|
|
|
|
t2 CREATE TEMPORARY TABLE `t2` (
|
|
|
|
`a` int(11) DEFAULT NULL,
|
|
|
|
`v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
|
|
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
2019-02-03 18:40:27 +01:00
|
|
|
drop temporary table t1, t2;
|
|
|
|
create temporary table t1 (a int);
|
|
|
|
alter table t1 add column f text;
|
|
|
|
insert into t1 values ('x','foo');
|
|
|
|
ERROR 22007: Incorrect integer value: 'x' for column `test`.`t1`.`a` at row 1
|
|
|
|
drop temporary table t1;
|