Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot create index on virtual generated column. #18061

Closed
GMHDBJD opened this issue Jun 16, 2020 · 1 comment · Fixed by #18114
Closed

cannot create index on virtual generated column. #18061

GMHDBJD opened this issue Jun 16, 2020 · 1 comment · Fixed by #18114
Assignees
Labels
sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@GMHDBJD
Copy link
Contributor

GMHDBJD commented Jun 16, 2020

Bug Report

Cannot create index on virtual generated column gened by primary key after #18045 merge.

1. Minimal reproduce step (Required)

drop database if exists `db`;
create database `db`;
use `db`;
create table t1 (id int, PRIMARY KEY (id));
insert into t1 values(1);
alter table t1 add column gen_id int as (id+1);
alter table t1 add index idx(`gen_id`);

2. What did you expect to see? (Required)

no error

3. What did you see instead (Required)

ERROR 8202 (HY000): Cannot decode index value, because Miss column

4. Affected version (Required)

Server version: 5.7.25-TiDB-v4.0.0-beta.2-636-gc19018e06

5. Root Cause Analysis

@GMHDBJD GMHDBJD added the type/bug The issue is confirmed as a bug. label Jun 16, 2020
@AndreMouche AndreMouche added the sig/sql-infra SIG: SQL Infra label Jun 17, 2020
@zimulala
Copy link
Contributor

@wjhuang2016 PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
4 participants