Another developer tells me that there is a MySQL ConnectorJ option which can be turned on/off. This developer says that after turning this jdbc option to ‘on’, I can run a java jdbc query in the form:
Connection jdbc = session.connection();
PreparedStatement pstmt = jdbc.prepareStatement("Update myTable set myField = 1 where myId = 1; Update myTable set anotherField = 2 where myId = 2");
pstmt.execute();
The idea behind running this prepared statement is that it runs two sql queries in a single execution. I’ve looked at the mysql documentation, but I haven’t been able to find this option. The developer does not recall the name of this setting, but is certain that it exists. Does anyone know which mysql option controls this behavior?
Perhaps allowMultiQueries?
https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html