--- src/com/mysql/jdbc/ServerPreparedStatement.java 5.1.7
+++ src/com/mysql/jdbc/ServerPreparedStatement.java 5.1.7 + optim
@@ -266,7 +266,7 @@
 	 */
 	private static final byte MAX_TIME_REP_LENGTH = 13;
 	
-	private boolean hasOnDuplicateKeyUpdate = false;
+	private int hasOnDuplicateKeyUpdate = -1;
 
 	private void storeTime(Buffer intoBuf, Time tm) throws SQLException {
 		
@@ -2897,6 +2897,14 @@
 	}
 
 	protected boolean containsOnDuplicateKeyUpdateInSQL() {
+		return this.hasOnDuplicateKeyUpdate != -1;
+	}
+	
+	protected int indexOfOnDuplicateKeyUpdateInSQL() {
 		return this.hasOnDuplicateKeyUpdate;
 	}
+    
+    protected boolean containsOnDuplicateKeyUpdateInSQLWithArgs() {
+        return true; //To use the previous methode 
+    }
 }
