MySQL testcontainer has a my.cnf override which, among other things, sets thread_stack = 128K. This leads to the following problem:
Caused by: java.sql.SQLException: Thread stack overrun: 7704 bytes used of a 131072 byte stack, and 128000 bytes needed. Use 'mysqld --thread_stack=#' to specify a bigger stack.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503)
at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:839)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:739)
at org.flywaydb.core.internal.dbsupport.JdbcTemplate.executeStatement(JdbcTemplate.java:238)
at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java:114)
... 53 more
This SO thread can be of help: https://stackoverflow.com/questions/8821575/mysql-error-1436-thread-stack-overrun-with-simple-query .
Providing local my.cnf override with thread_stack = 256K solves the problem.
Why mysql testcontainer needs my.cnf at all? Shouldn't the default configuration of MySQL be good enough?
MySQL testcontainer has a
my.cnfoverride which, among other things, setsthread_stack = 128K. This leads to the following problem:This SO thread can be of help: https://stackoverflow.com/questions/8821575/mysql-error-1436-thread-stack-overrun-with-simple-query .
Providing local
my.cnfoverride withthread_stack = 256Ksolves the problem.Why mysql testcontainer needs
my.cnfat all? Shouldn't the default configuration of MySQL be good enough?