diff -Naur src/com/mysql/jdbc/PreparedStatement.java src-rit/com/mysql/jdbc/PreparedStatement.java --- src/com/mysql/jdbc/PreparedStatement.java 2006-12-14 09:33:00.000000000 -0500 +++ src-rit/com/mysql/jdbc/PreparedStatement.java 2006-12-14 09:33:38.000000000 -0500 @@ -953,6 +953,8 @@ getBatchedGeneratedKeys(batchedStatement); } + batchedStatement.close(); + int[] updateCounts = new int[this.batchedArgs.size()]; for (int i = 0; i < this.batchedArgs.size(); i++) {