Skip to content

Commit

Permalink
Improve testing MySQL's stats quality
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo authored and findepi committed Apr 1, 2022
1 parent 3e4fe30 commit 3189c38
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ public TestingMySqlServer(String dockerImageName, boolean globalTransactionEnabl
execute(format("GRANT ALL PRIVILEGES ON *.* TO '%s'", container.getUsername()), "root", container.getPassword());
}

protected void configureContainer(MySQLContainer<?> container) {}
private void configureContainer(MySQLContainer<?> container)
{
// MySQL configuration provided by default by testcontainers causes MySQL to produce poor estimates in CARDINALITY column of INFORMATION_SCHEMA.STATISTICS table.
container.addParameter("TC_MY_CNF", null);
}

public Connection createConnection()
throws SQLException
Expand Down

0 comments on commit 3189c38

Please sign in to comment.