mirror of
https://github.com/MariaDB/server.git
synced 2025-02-13 17:05:35 +01:00
![Sergei Golubchik](/assets/img/avatar_default.png)
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
18 lines
607 B
Text
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;
|