| 1 |
check table vcol_autoinc for upgrade; |
| 2 |
Table Op Msg_type Msg_text |
| 3 |
test.vcol_autoinc check Warning Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk` |
| 4 |
test.vcol_autoinc check status OK |
| 5 |
show create table vcol_autoinc; |
| 6 |
Table Create Table |
| 7 |
vcol_autoinc CREATE TABLE `vcol_autoinc` ( |
| 8 |
`pk` int(11) NOT NULL AUTO_INCREMENT, |
| 9 |
`v3` int(11) GENERATED ALWAYS AS (`pk`) STORED, |
| 10 |
PRIMARY KEY (`pk`) |
| 11 |
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci |
| 12 |
select * from vcol_autoinc; |
| 13 |
pk v3 |
| 14 |
insert vcol_autoinc (pk) values (1); |
| 15 |
select * from vcol_autoinc; |
| 16 |
pk v3 |
| 17 |
1 1 |
| 18 |
drop table vcol_autoinc; |
| 19 |
check table t1 for upgrade; |
| 20 |
Table Op Msg_type Msg_text |
| 21 |
test.t1 check status OK |
| 22 |
flush tables; |
| 23 |
show create table t1; |
| 24 |
Table Create Table |
| 25 |
t1 CREATE TABLE `t1` ( |
| 26 |
`Date` datetime(6) NOT NULL, |
| 27 |
`Data` varbinary(2000) NOT NULL, |
| 28 |
`a` varchar(100) GENERATED ALWAYS AS (column_get(`Data`,1 as char(100) charset latin1)) VIRTUAL, |
| 29 |
PRIMARY KEY (`Date`) |
| 30 |
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci |
| 31 |
PARTITION BY RANGE (to_days(`Date`)) |
| 32 |
(PARTITION `p20181029` VALUES LESS THAN (737361) ENGINE = MyISAM, |
| 33 |
PARTITION `p20181128` VALUES LESS THAN (737391) ENGINE = MyISAM) |
| 34 |
drop table t1; |