Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set utf8mb4 as the default charset on MySQL if CHARSET is unset #12563

Conversation

zeripath
Copy link
Contributor

MySQL in its infinite wisdom determines that UTF8 does not
mean UTF8. Our install scripts know about this and will set
CHARSET to utf8mb4 if we users choose this but... users who
do not explicitly set this variable will default to utf8mb3
without knowing it.

This PR changes the unset CHARSET value to utf8mb4 if users
choose to use mysql.

Signed-off-by: Andrew Thornton art27@cantab.net

MySQL in its infinite wisdom determines that UTF8 does not
mean UTF8. Our install scripts know about this and will set
CHARSET to utf8mb4 if we users choose this but... users who
do not explicitly set this variable will default to utf8mb3
without knowing it.

This PR changes the unset CHARSET value to utf8mb4 if users
choose to use mysql.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! label Aug 22, 2020
@zeripath zeripath added this to the 1.13.0 milestone Aug 22, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Aug 22, 2020
@zeripath zeripath removed the pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! label Aug 22, 2020
@zeripath
Copy link
Contributor Author

as this just makes the code match the documentation I'm removing the breaking label and adding the bug label

@zeripath
Copy link
Contributor Author

Technically that makes it backportable too.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 22, 2020
@lunny
Copy link
Member

lunny commented Aug 22, 2020

I don't think we should back port this one.

@codecov-commenter
Copy link

Codecov Report

Merging #12563 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #12563   +/-   ##
=======================================
  Coverage   43.42%   43.43%           
=======================================
  Files         643      643           
  Lines       71157    71159    +2     
=======================================
+ Hits        30903    30907    +4     
+ Misses      35243    35240    -3     
- Partials     5011     5012    +1     
Impacted Files Coverage Δ
modules/setting/database.go 59.57% <100.00%> (+0.87%) ⬆️
modules/indexer/stats/db.go 43.47% <0.00%> (-17.40%) ⬇️
modules/indexer/stats/queue.go 64.70% <0.00%> (-11.77%) ⬇️
modules/git/utils.go 73.77% <0.00%> (-3.28%) ⬇️
modules/log/event.go 56.60% <0.00%> (-0.95%) ⬇️
modules/git/repo.go 49.23% <0.00%> (-0.51%) ⬇️
services/pull/check.go 48.46% <0.00%> (+0.76%) ⬆️
modules/queue/unique_queue_disk_channel.go 55.38% <0.00%> (+1.53%) ⬆️
modules/queue/workerpool.go 60.81% <0.00%> (+2.04%) ⬆️
modules/process/manager.go 75.00% <0.00%> (+2.50%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b78448e...5265293. Read the comment docs.

@zeripath zeripath merged commit fcabbae into go-gitea:master Aug 22, 2020
@zeripath zeripath deleted the change-default-charset-for-mysql-if-charset-is-not-set branch August 22, 2020 12:56
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants