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

Error 500 when visit /issues and /pulls (too many SQL variables) #7750

Closed
2 of 7 tasks
yasuokav opened this issue Aug 4, 2019 · 4 comments · Fixed by #8409 or #11696
Closed
2 of 7 tasks

Error 500 when visit /issues and /pulls (too many SQL variables) #7750

yasuokav opened this issue Aug 4, 2019 · 4 comments · Fixed by #8409 or #11696
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Milestone

Comments

@yasuokav
Copy link
Contributor

yasuokav commented Aug 4, 2019

  • Gitea version (or commit ref): 1.9.0 / 76408d5
  • Git version: 2.20.1
  • Operating system: macOS
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
routers/user/home.go:269:Issues() [E] CountIssuesByRepo: too many SQL variables

Description

The above error should be able to explain this issue.

gitea/models/issue.go

Lines 1357 to 1366 in cd238bc

if len(opts.IssueIDs) > 0 {
sess.In("issue.id", opts.IssueIDs)
}
if len(opts.RepoIDs) > 0 {
// In case repository IDs are provided but actually no repository has issue.
sess.In("issue.repo_id", opts.RepoIDs)
}

gitea/models/issue.go

Lines 1649 to 1658 in cd238bc

case FilterModeAll:
stats.OpenCount, err = x.Where(cond).And("is_closed = ?", false).
And(builder.In("issue.repo_id", opts.UserRepoIDs)).
Count(new(Issue))
if err != nil {
return nil, err
}
stats.ClosedCount, err = x.Where(cond).And("is_closed = ?", true).
And(builder.In("issue.repo_id", opts.UserRepoIDs)).
Count(new(Issue))

gitea/models/issue.go

Lines 1708 to 1710 in cd238bc

stats.YourRepositoriesCount, err = x.Where(cond).
And(builder.In("issue.repo_id", opts.UserRepoIDs)).
Count(new(Issue))

@lunny lunny added the type/bug label Aug 5, 2019
@stale
Copy link

stale bot commented Oct 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Oct 4, 2019
@lunny
Copy link
Member

lunny commented Oct 5, 2019

This should be closed by #8347

@guillep2k
Copy link
Member

This should be reopened as per #8427

@techknowlogick techknowlogick reopened this Oct 8, 2019
@lafriks lafriks modified the milestones: 1.9.4, 1.9.5 Oct 8, 2019
@techknowlogick techknowlogick modified the milestones: 1.9.5, 1.x.x Nov 1, 2019
@stale
Copy link

stale bot commented Dec 31, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Dec 31, 2019
@zeripath zeripath added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Dec 31, 2019
@stale stale bot removed the issue/stale label Dec 31, 2019
@lunny lunny modified the milestones: 1.x.x, 1.13.0 Jun 18, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
6 participants