Comments that contain # which are perfectly valid in mysql 5.7 according to: https://dev.mysql.com/doc/refman/5.7/en/comments.html seem to break the init file for a mysql docker test container. When I initialize a datasource in the application-test.properties file as:
spring.datasource.jdbcUrl=jdbc:tc:mysql:5.7:///test?TC_INITSCRIPT=file:src/test/resources/test-init.sql
Any comment like this in the test-init.sql file will cause mysql to ignore the rest of the file when the comment is structured like this:
# Dump of table USERS
# ------------------------------------------------------------
However, when the comment is like this:
/*
# Dump of table USERS
# ------------------------------------------------------------
*/
The rest of the file executes successfully.
Also, test containers does not throw a mysql error. Instead, it tells me my tables do not exist when I try to reference them in my application code.
I also am using test containers instead of H2 because I want it to support the exact mysql syntax. Does anyone have a hint at how I can correct this? I normally export schema from an existing database using sequel pro's export.