In MySQL Connector/J 5.1.39 there was com.mysql.jdbc.jdbc2.optional.MysqlDataSource.setAllowMultiQueries()
to allow multiple statements in SQL queries.
In new version 6.0.4 MysqlDataSource is moved to com.mysql.cj.jdbc.MysqlDataSource
and there is no setAllowMultiQueries
method.
How can I enable execution of multi-statement queries?
UPDATE
This question is not duplicate of Multiple queries executed in java in single statement.
I know that I can specify allowMultiQueries
in JDBC url by calling MysqlDataSource.setUrl()
but I use various MysqlDataSource.set*
methods to set server, port, etc. In previous version there was same method for allowing multi-queries. I want to understand why it's gone.