import com.mysql.jdbc.StringUtils; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; /** * * @author raminorujov */ public class Bug71929 { /** * @param args the command line arguments */ public static void main(String[] args) { try { Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306", "raminorujov", "test"); Statement stmt = con.createStatement(); // stmt.executeQuery("/* comment */CREATE TABLE t_test (id INT)"); // stmt.executeQuery("/* comment *//* comment again */CREATE TABLE t_test (id INT)"); stmt.executeQuery("/* comment */ /* some more comment */CREATE TABLE test.t_test (id INT)"); stmt.executeUpdate("SELECT 1"); // throws exception stmt.executeUpdate("/* comment */ SELECT 1"); // now throws exception stmt.close(); con.close(); } catch (SQLException ex) { ex.printStackTrace(); } } }