Skip to content

Commit b0a0e54

Browse files
marc-mabetianon
authored andcommitted
Execute SQL in entrypoint with "--comments"
The primary reason to disable this seems to be to avoid normally-unnecessary data transfer, but in this case we're explicitly connecting over the local unix socket, so streaming the comments to the server and letting it strip them should be *almost* as efficient as the client doing so.
1 parent 79fb37b commit b0a0e54

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

5.6/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

5.7/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8.0/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

template/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ docker_process_sql() {
208208
set -- --database="$MYSQL_DATABASE" "$@"
209209
fi
210210

211-
mysql --defaults-extra-file=<( _mysql_passfile "${passfileArgs[@]}") --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" "$@"
211+
mysql --defaults-extra-file=<( _mysql_passfile "${passfileArgs[@]}") --protocol=socket -uroot -hlocalhost --socket="${SOCKET}" --comments "$@"
212212
}
213213

214214
# Initializes database with timezone info and root password, plus optional extra db/user

0 commit comments

Comments
 (0)