Skip to content

Conversation

@marc-mabe
Copy link
Contributor

@marc-mabe marc-mabe commented Nov 14, 2020

... to prevent lost of SQL comments in triggers, procedures etc. on initdb.

fixes #718

@marc-mabe marc-mabe marked this pull request as ready for review November 14, 2020 14:49
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.
@tianon
Copy link
Member

tianon commented Dec 19, 2020

Rebased, updated the template copy also, and added this note to the commit message:

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.

@tianon
Copy link
Member

tianon commented Dec 19, 2020

Thank you for the contribution (and your patience)! ❤️

@tianon tianon merged commit 1612c57 into docker-library:master Dec 19, 2020
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Dec 19, 2020
Changes:

- docker-library/mysql@1612c57: Merge pull request docker-library/mysql#728 from marc-mabe/patch-1
- docker-library/mysql@b0a0e54: Execute SQL in entrypoint with "--comments"
@slashformotion
Copy link

For reference, this does not work as intended for MySQL 5.7.41 and we had to remove it by using

RUN sed -i 's/--comments //' /usr/local/bin/docker-entrypoint.sh 

in our Dockerfile. The issue was the comment at the top of the file made the import of the MySQL dump crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lost SQL comments in /docker-entrypoint-initdb.d

3 participants