mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Quote table release in sql queries (#27205)
				
					
				
			Fixes #27174
`release` is a reserved keyword in MySql. I can't reproduce the issue on
my setup and we have a test for that code but it seems there can be
setups where it fails.
a101dbaa79/tests/integration/repo_activity_test.go (L45-L46)
			
			
This commit is contained in:
		@@ -101,7 +101,7 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
 | 
			
		||||
		},
 | 
			
		||||
		// find releases without existing repository
 | 
			
		||||
		genericOrphanCheck("Orphaned Releases without existing repository",
 | 
			
		||||
			"release", "repository", "release.repo_id=repository.id"),
 | 
			
		||||
			"release", "repository", "`release`.repo_id=repository.id"),
 | 
			
		||||
		// find pulls without existing issues
 | 
			
		||||
		genericOrphanCheck("Orphaned PullRequests without existing issue",
 | 
			
		||||
			"pull_request", "issue", "pull_request.issue_id=issue.id"),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user