Skip to content

Commit

Permalink
Workaround issue #560 by removing character-set-collations
Browse files Browse the repository at this point in the history
This only has an effect on the 11.3 and 11.4 that have the configuration
item set in their configuration file.

The 10.4 instance doesn't have this file.
  • Loading branch information
grooverdan committed Feb 22, 2024
1 parent 174b68b commit d7a950d
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 1 deletion.
2 changes: 2 additions & 0 deletions 10.11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ RUN set -ex; \
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
# don't reverse lookup hostnames, they are usually another container
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
# Issue #560
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
if [ -L /etc/mysql/my.cnf ]; then \
# 10.5+
Expand Down
2 changes: 2 additions & 0 deletions 10.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ RUN set -ex; \
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
# don't reverse lookup hostnames, they are usually another container
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
# Issue #560
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
if [ -L /etc/mysql/my.cnf ]; then \
# 10.5+
Expand Down
2 changes: 2 additions & 0 deletions 10.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ RUN set -ex; \
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
# don't reverse lookup hostnames, they are usually another container
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
# Issue #560
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
if [ -L /etc/mysql/my.cnf ]; then \
# 10.5+
Expand Down
2 changes: 2 additions & 0 deletions 11.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ RUN set -ex; \
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
# don't reverse lookup hostnames, they are usually another container
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
# Issue #560
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
if [ -L /etc/mysql/my.cnf ]; then \
# 10.5+
Expand Down
2 changes: 2 additions & 0 deletions 11.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ RUN set -ex; \
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
# don't reverse lookup hostnames, they are usually another container
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
# Issue #560
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
if [ -L /etc/mysql/my.cnf ]; then \
# 10.5+
Expand Down
2 changes: 2 additions & 0 deletions 11.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ RUN set -ex; \
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
# don't reverse lookup hostnames, they are usually another container
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
# Issue #560
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
if [ -L /etc/mysql/my.cnf ]; then \
# 10.5+
Expand Down
2 changes: 2 additions & 0 deletions 11.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ RUN set -ex; \
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
# don't reverse lookup hostnames, they are usually another container
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
# Issue #560
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
if [ -L /etc/mysql/my.cnf ]; then \
# 10.5+
Expand Down
2 changes: 2 additions & 0 deletions 11.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ RUN set -ex; \
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
# don't reverse lookup hostnames, they are usually another container
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
# Issue #560
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
if [ -L /etc/mysql/my.cnf ]; then \
# 10.5+
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ RUN set -ex; \
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
# don't reverse lookup hostnames, they are usually another container
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
# Issue #560
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
if [ -L /etc/mysql/my.cnf ]; then \
# 10.5+
Expand Down
5 changes: 4 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ update_version()
-e '/memory\.pressure/,+7d' \
"$version/docker-entrypoint.sh"
sed -i -e 's/ REPLICA\$/ SLAVE$/' "$version"/healthcheck.sh
sed -i -e 's/\/run/\/var\/run\//g' "$version/Dockerfile"
sed -i -e 's/\/run/\/var\/run\//g' \
-e '/character-set-collations/d' \
-e '/^# Issue #560/d' \
"$version/Dockerfile"
;; # almost nothing to see/do here
10.5)
sed -i -e '/--old-mode/d' \
Expand Down

0 comments on commit d7a950d

Please sign in to comment.