Bug #77383 | allowMultiQueries only works if first parameter in connection string | ||
---|---|---|---|
Submitted: | 17 Jun 2015 9:09 | Modified: | 17 Jun 2015 10:08 |
Reporter: | Chris Blackwell | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.35 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[17 Jun 2015 9:09]
Chris Blackwell
[17 Jun 2015 9:47]
MySQL Verification Team
Hello Chris Blackwell, Thank you for the report and test case. Thanks, Umesh
[17 Jun 2015 9:56]
MySQL Verification Team
May be issue with & instead of & in url? [umshastr@hod03]/export/umesh/server/binaries/mysql-5.6.26: javac MySQLMultiQueryTest.java [umshastr@hod03]/export/umesh/server/binaries/mysql-5.6.26: java -classpath '.:/home/umshastr/bugs/mysql-connector-java-5.1.35/mysql-connector-java-5.1.35-bin.jar' MySQLMultiQueryTest ok [umshastr@hod03]/export/umesh/server/binaries/mysql-5.6.26: cat MySQLMultiQueryTest.java import java.sql.*; class MySQLMultiQueryTest { public static void main (String[] args) { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); String url = "jdbc:mysql://localhost:3306/test?characterEncoding=UTF-8&allowMultiQueries=true"; Connection conn = DriverManager.getConnection(url, "ushastry", "123"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT 1; SELECT 2;"); System.out.println("ok"); } catch (Exception e) { System.out.println("failed"); e.printStackTrace(System.out); } } }
[17 Jun 2015 10:08]
Chris Blackwell
Hi Umesh Yes thats exactly the issue. The url was generated by another library with & in it, so i will file a bug with them to replace with & Thanks
[17 Jun 2015 10:11]
MySQL Verification Team
Thanks for confirming! Regards, Umesh