Bypass MariaDB performance bug of the "IN" sub-query, fix incorrect IssueIndex (#26279)

Close #26277
Fix #26285
This commit is contained in:
wxiaoguang 2023-08-07 18:23:59 +08:00 committed by GitHub
parent 24fbf4e059
commit e4b1ea6f15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 9 deletions

View file

@ -248,7 +248,7 @@ func deleteIssue(ctx context.Context, issue *issues_model.Issue) error {
issue.MilestoneID, err)
}
if err := activities_model.DeleteIssueActions(ctx, issue.RepoID, issue.ID); err != nil {
if err := activities_model.DeleteIssueActions(ctx, issue.RepoID, issue.ID, issue.Index); err != nil {
return err
}