1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-18712 InnoDB indexes are inconsistent with what defined in .frm for table after rebuilding table with index on blob

when auto-adding a virtual LONG_UNIQUE_HASH_FIELD, fill in
a Virtual_column_info for it, so that fill_alter_inplace_info()
would know we're adding a virtual field (ALTER_ADD_VIRTUAL_COLUMN).
This commit is contained in:
Sergei Golubchik
2019-02-27 03:36:37 +01:00
parent 5adf11250a
commit 20c89f9f37
4 changed files with 24 additions and 1 deletions

View File

@@ -10,3 +10,13 @@ create temporary table tmp (a varchar(1024), b int, c int, d int, e linestring,
load data infile 'load.data' into table tmp;
delete from tmp;
drop table t1;
create table t1 (b blob) engine=innodb;
alter table t1 add unique (b);
alter table t1 force;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` blob DEFAULT NULL,
UNIQUE KEY `b` (`b`) USING HASH
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;