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

admin check table report "Error 1105 (HY000): invalid data type: Unsupported datum flag 10 for Bytes vector" #48304

Closed
seiya-annie opened this issue Nov 6, 2023 · 3 comments · Fixed by #48594
Labels
affects-7.5 component/ddl This issue is related to DDL of TiDB. severity/major type/bug This issue is a bug.

Comments

@seiya-annie
Copy link

seiya-annie commented Nov 6, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

DDL = "create table t(pk bigint primary key auto_increment ,j json, i bigint, c char(64)) partition by hash(pk) PARTITIONS 10;"

			"alter table t add index ((cast(j->'$.number' as signed array)))",
			"alter table t add index (i, (cast(j->'$.number' as signed array)), c)",
			"alter table t add index ((cast(j->'$.string' as char(64) array)))",
			"alter table t add index (c, (cast(j->'$.string' as char(64) array)), i)",

admin check table t

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

test successfully

3. What did you see instead (Required)

2023/11/05 17:28:31.467 +00:00] [INFO] [conn.go:1097] ["command dispatched failed"] [conn=1281360020] [session_alias=] [connInfo="id:1281360020, addr:10.233.78.72:54544 status:10, collation:utf8mb4_general_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="admin check table t"] [txn_mode=PESSIMISTIC] [timestamp=445436378403045390] [err="[tikv:10000]invalid data type: Unsupported datum flag 10 for Bytes vector\ngithub.com/pingcap/errors.AddStack\n\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/errors.go:174\ngithub.com/pingcap/errors.Trace\n\t/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20221009092201-b66cddb77c32/juju_adaptor.go:15\ngithub.com/pingcap/tidb/pkg/executor.(*indexWorker).extractTaskHandles\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/executor/distsql.go:1068\ngithub.com/pingcap/tidb/pkg/executor.(*indexWorker).fetchHandles\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/executor/distsql.go:1003\ngithub.com/pingcap/tidb/pkg/executor.(*IndexLookUpExecutor).startIndexWorker.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/pkg/executor/distsql.go:754\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1650"]

4. What is your TiDB version? (Required)

master

@seiya-annie seiya-annie added type/bug This issue is a bug. component/ddl This issue is related to DDL of TiDB. labels Nov 6, 2023
@seiya-annie
Copy link
Author

tidb (2).log

@ti-chi-bot ti-chi-bot bot added may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Nov 6, 2023
@wjhuang2016
Copy link
Member

Same as #46917

@tangenta
Copy link
Contributor

Minimum reproduce step:

set global tidb_ddl_enable_fast_reorg=1;
drop table if exists t;
create table t(j json);
insert into t(j) values ('{"string":[]}');
alter table t add index ((cast(j->'$.string' as char(10) array)));
admin check table t;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 component/ddl This issue is related to DDL of TiDB. severity/major type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants