diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-11-17 21:59:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-18 05:59:04 +0000 |
commit | 696fbe60365d59a2d979f977b5ae6f13c52f9188 (patch) | |
tree | d79af3d789fb1874dbdd10afdc0a4906f0a621b3 /models/db | |
parent | 8a20fba8eb1ac01a0de9355eff84af69d4636d96 (diff) | |
download | gitea-696fbe60365d59a2d979f977b5ae6f13c52f9188.tar.gz gitea-696fbe60365d59a2d979f977b5ae6f13c52f9188.zip |
Refactor push mirror find and add check for updating push mirror (#32539)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'models/db')
-rw-r--r-- | models/db/collation.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/db/collation.go b/models/db/collation.go index c128cf5029..a7db9f5442 100644 --- a/models/db/collation.go +++ b/models/db/collation.go @@ -68,7 +68,8 @@ func CheckCollations(x *xorm.Engine) (*CheckCollationsResult, error) { var candidateCollations []string if x.Dialect().URI().DBType == schemas.MYSQL { - if _, err = x.SQL("SELECT @@collation_database").Get(&res.DatabaseCollation); err != nil { + _, err = x.SQL("SELECT DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = ?", setting.Database.Name).Get(&res.DatabaseCollation) + if err != nil { return nil, err } res.IsCollationCaseSensitive = func(s string) bool { |