From a5aa5c58c1bf5a0c91226e0cbbd7b95bb8f74692 Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Sat, 6 Jun 2020 01:57:25 +0200 Subject: Increase maximum SQLite variables count to 32766 (#11696) per https://www.sqlite.org/limits.html Co-authored-by: techknowlogick --- models/issue.go | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'models') diff --git a/models/issue.go b/models/issue.go index 82f6c926ee..1a4de26b3a 100644 --- a/models/issue.go +++ b/models/issue.go @@ -76,7 +76,6 @@ var ( const issueTasksRegexpStr = `(^\s*[-*]\s\[[\sxX]\]\s.)|(\n\s*[-*]\s\[[\sxX]\]\s.)` const issueTasksDoneRegexpStr = `(^\s*[-*]\s\[[xX]\]\s.)|(\n\s*[-*]\s\[[xX]\]\s.)` const issueMaxDupIndexAttempts = 3 -const maxIssueIDs = 950 func init() { issueTasksPat = regexp.MustCompile(issueTasksRegexpStr) @@ -1114,9 +1113,6 @@ func (opts *IssuesOptions) setupSession(sess *xorm.Session) { } if len(opts.IssueIDs) > 0 { - if len(opts.IssueIDs) > maxIssueIDs { - opts.IssueIDs = opts.IssueIDs[:maxIssueIDs] - } sess.In("issue.id", opts.IssueIDs) } @@ -1360,9 +1356,6 @@ func getIssueStatsChunk(opts *IssueStatsOptions, issueIDs []int64) (*IssueStats, Where("issue.repo_id = ?", opts.RepoID) if len(opts.IssueIDs) > 0 { - if len(opts.IssueIDs) > maxIssueIDs { - opts.IssueIDs = opts.IssueIDs[:maxIssueIDs] - } sess.In("issue.id", opts.IssueIDs) } @@ -1446,9 +1439,6 @@ func GetUserIssueStats(opts UserIssueStatsOptions) (*IssueStats, error) { cond = cond.And(builder.In("issue.repo_id", opts.RepoIDs)) } if len(opts.IssueIDs) > 0 { - if len(opts.IssueIDs) > maxIssueIDs { - opts.IssueIDs = opts.IssueIDs[:maxIssueIDs] - } cond = cond.And(builder.In("issue.id", opts.IssueIDs)) } -- cgit v1.2.3