Skip to content

Commit d7a950d

Browse files
committed
Workaround issue #560 by removing character-set-collations
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.
1 parent 174b68b commit d7a950d

File tree

10 files changed

+22
-1
lines changed

10 files changed

+22
-1
lines changed

10.11/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ RUN set -ex; \
125125
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
126126
# don't reverse lookup hostnames, they are usually another container
127127
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
128+
# Issue #560
129+
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
128130
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
129131
if [ -L /etc/mysql/my.cnf ]; then \
130132
# 10.5+

10.5/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ RUN set -ex; \
127127
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
128128
# don't reverse lookup hostnames, they are usually another container
129129
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
130+
# Issue #560
131+
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
130132
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
131133
if [ -L /etc/mysql/my.cnf ]; then \
132134
# 10.5+

10.6/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ RUN set -ex; \
127127
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
128128
# don't reverse lookup hostnames, they are usually another container
129129
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
130+
# Issue #560
131+
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
130132
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
131133
if [ -L /etc/mysql/my.cnf ]; then \
132134
# 10.5+

11.0/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ RUN set -ex; \
125125
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
126126
# don't reverse lookup hostnames, they are usually another container
127127
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
128+
# Issue #560
129+
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
128130
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
129131
if [ -L /etc/mysql/my.cnf ]; then \
130132
# 10.5+

11.1/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ RUN set -ex; \
125125
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
126126
# don't reverse lookup hostnames, they are usually another container
127127
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
128+
# Issue #560
129+
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
128130
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
129131
if [ -L /etc/mysql/my.cnf ]; then \
130132
# 10.5+

11.2/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ RUN set -ex; \
125125
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
126126
# don't reverse lookup hostnames, they are usually another container
127127
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
128+
# Issue #560
129+
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
128130
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
129131
if [ -L /etc/mysql/my.cnf ]; then \
130132
# 10.5+

11.3/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ RUN set -ex; \
125125
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
126126
# don't reverse lookup hostnames, they are usually another container
127127
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
128+
# Issue #560
129+
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
128130
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
129131
if [ -L /etc/mysql/my.cnf ]; then \
130132
# 10.5+

11.4/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ RUN set -ex; \
125125
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
126126
# don't reverse lookup hostnames, they are usually another container
127127
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
128+
# Issue #560
129+
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
128130
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
129131
if [ -L /etc/mysql/my.cnf ]; then \
130132
# 10.5+

Dockerfile.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ RUN set -ex; \
127127
| xargs -rt -0 sed -Ei 's/^(bind-address|log|user\s)/#&/'; \
128128
# don't reverse lookup hostnames, they are usually another container
129129
printf "[mariadb]\nhost-cache-size=0\nskip-name-resolve\n" > /etc/mysql/mariadb.conf.d/05-skipcache.cnf; \
130+
# Issue #560
131+
sed -i -e '/character-set-collations/d' /etc/mysql/mariadb.conf.d/50-server.cnf; \
130132
# Issue #327 Correct order of reading directories /etc/mysql/mariadb.conf.d before /etc/mysql/conf.d (mount-point per documentation)
131133
if [ -L /etc/mysql/my.cnf ]; then \
132134
# 10.5+

update.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ update_version()
6565
-e '/memory\.pressure/,+7d' \
6666
"$version/docker-entrypoint.sh"
6767
sed -i -e 's/ REPLICA\$/ SLAVE$/' "$version"/healthcheck.sh
68-
sed -i -e 's/\/run/\/var\/run\//g' "$version/Dockerfile"
68+
sed -i -e 's/\/run/\/var\/run\//g' \
69+
-e '/character-set-collations/d' \
70+
-e '/^# Issue #560/d' \
71+
"$version/Dockerfile"
6972
;; # almost nothing to see/do here
7073
10.5)
7174
sed -i -e '/--old-mode/d' \

0 commit comments

Comments
 (0)