mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	Increase maximum SQLite variables count to 32766 (#11696)
per https://www.sqlite.org/limits.html Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							f576756b18
						
					
				
				
					commit
					a5aa5c58c1
				
			@@ -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))
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user