Skip to content

Commit

Permalink
Execute SQL in entrypoint with "--comments"
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
marc-mabe authored and tianon committed Dec 19, 2020
1 parent 79fb37b commit b0a0e54
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 5.6/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 5.7/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 8.0/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion template/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ docker_process_sql() {
set -- --database="$MYSQL_DATABASE" "$@"
fi

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

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

0 comments on commit b0a0e54

Please sign in to comment.