mariadb/mysql-test/suite/vcol/r/upgrade.result
Sergei Golubchik 47687eef41 MDEV-12936 upgrade to 10.2.6 failed upon tables with virtual columns
when opening 10.1- table that has virtual columns:

1. don't error out if it has vcols over autoinc columns.
   just issue a warning.
2. set vcol type properly
3. in innodb: use table->s->stored_fields instead of table->s->fields,
   because that's what was stored in innodb data dictionary
2017-07-05 17:15:58 +02:00

18 lines
607 B
Text

check table vcol_autoinc for upgrade;
Table Op Msg_type Msg_text
test.vcol_autoinc check Warning Function or expression 'AUTO_INCREMENT' cannot be used in the GENERATED ALWAYS AS clause of `pk`
test.vcol_autoinc check status OK
show create table vcol_autoinc;
Table Create Table
vcol_autoinc CREATE TABLE `vcol_autoinc` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`v3` int(11) GENERATED ALWAYS AS (`pk`) VIRTUAL,
PRIMARY KEY (`pk`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from vcol_autoinc;
pk v3
insert vcol_autoinc (pk) values (1);
select * from vcol_autoinc;
pk v3
1 1
drop table vcol_autoinc;