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

CTE is blocked when got error in Projection #31302

Closed
guo-shaoge opened this issue Jan 4, 2022 · 1 comment · Fixed by #33085
Closed

CTE is blocked when got error in Projection #31302

guo-shaoge opened this issue Jan 4, 2022 · 1 comment · Fixed by #33085
Assignees
Labels
affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@guo-shaoge
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

go run t.go . Create table and insert rows.

with recursive cte(iter, first, second, result) as (select 1, first, second, first+second from src  union all  select iter+1, second, result, second+result from cte where iter < 80 ) select * from cte;

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

mysql> with recursive cte(iter, first, second, result) as (select 1, first, second, first+second from src  union all  select iter+1, second, result, second+result from cte where iter < 80 ) select * from cte;
ERROR 1690 (22003): BIGINT value is out of range in '(src.src.second + Column#14)'

3. What did you see instead (Required)

blocked

4. What is your TiDB version? (Required)

+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()
                                      |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v5.5.0-alpha-22-g68642193b9-dirty
Edition: Community
Git Commit Hash: 68642193b9d1105a2521009986efa10c9e85f1b7
Git Branch: fix_cte_apply
UTC Build Time: 2022-01-04 14:26:18
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@guo-shaoge guo-shaoge added type/bug The issue is confirmed as a bug. severity/major affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. labels Jan 4, 2022
@guo-shaoge
Copy link
Collaborator Author

We can set tidb_projection_concurrency to 1 to avoid this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects the 5.4.x(LTS) versions. severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants