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

Runtime error occurs when analyzing table #57448

Open
apollodafoni opened this issue Nov 18, 2024 · 3 comments · May be fixed by #57464
Open

Runtime error occurs when analyzing table #57448

apollodafoni opened this issue Nov 18, 2024 · 3 comments · May be fixed by #57464

Comments

@apollodafoni
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `IDT_25727` (
  `COL102` float DEFAULT NULL,
  `COL103` float DEFAULT NULL,
  `COL1` float GENERATED ALWAYS AS (`COL102` % 10) STORED,
  `COL2` varchar(20) DEFAULT NULL,
  `COL4` datetime DEFAULT NULL,
  `COL3` bigint DEFAULT NULL,
  `COL5` float DEFAULT NULL,
  KEY `UK_COL1` (`COL1`) /*!80000 INVISIBLE */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin

insert some values as follows:
test_data.csv

analyze table IDT_25727;

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

analyse success

3. What did you see instead (Required)

ERROR 1105 (HY000): runtime error: slice bounds out of range [11:10]

[2024/11/18 03:16:55.452 +00:00] [ERROR] [analyze_col_v2.go:679] ["analyze worker panicked"] [recover="runtime error: slice bounds out of range [11:10]"] [stack="github.com/pingcap/tidb/pkg/executor.(*AnalyzeColumnsExecV2).subBuildWorker.func1\n\t/workspace/source/tidb/pkg/executor/analyze_col_v2.go:679\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:785\nruntime.goPanicSliceBU\n\t/usr/local/go/src/runtime/panic.go:161\ngithub.com/pingcap/tidb/pkg/statistics.BuildHistAndTopN\n\t/workspace/source/tidb/pkg/statistics/builder.go:461\ngithub.com/pingcap/tidb/pkg/executor.(*AnalyzeColumnsExecV2).subBuildWorker\n\t/workspace/source/tidb/pkg/executor/analyze_col_v2.go:818\ngithub.com/pingcap/tidb/pkg/executor.(*AnalyzeColumnsExecV2).buildSamplingStats.func6\n\t/workspace/source/tidb/pkg/executor/analyze_col_v2.go:363\ngithub.com/pingcap/tidb/pkg/executor.(*notifyErrorWaitGroupWrapper).Run.func1\n\t/workspace/source/tidb/pkg/executor/analyze_utils.go:172"]
[2024/11/18 03:16:55.452 +00:00] [ERROR] [analyze.go:455] ["receive error when saving analyze results"] [error="runtime error: slice bounds out of range [11:10]"]

4. What is your TiDB version? (Required)

Release Version: v8.5.0-alpha-134-g4a6bf46a5f
Edition: Community
Git Commit Hash: 4a6bf46
Git Branch: HEAD
UTC Build Time: 2024-11-16 07:53:03
GoVersion: go1.23.3
Race Enabled: false
Check Table Before Drop: false
Store: tikv

@apollodafoni apollodafoni added the type/bug The issue is confirmed as a bug. label Nov 18, 2024
@apollodafoni
Copy link
Author

/severity critical

@apollodafoni
Copy link
Author

/assign @hawkingrei

@hawkingrei
Copy link
Member

It is the same as #35948.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants