title: Counting INSERT/ON DUPLICATE KEY UPDATE
body: <p>I have this sql query:</p>
  
  <pre><code>INSERT INTO `Items` 
  (`id`,`parent_id`,`name`) 
  VALUES (123,321,null) 
  ON DUPLICATE KEY UPDATE 
  `id` = `id`, `parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`);
  </code></pre>
  
  <p>I run the query with phpmyadmin, and it returns me right results:</p>
  
  <pre><code>0 - No update
  1 - Line inserted
  2 - Line updated
  </code></pre>
  
  <p>But when I run the query via java/jdbc, the query returns 1-1-2
  That is, 1 is returned when there's no insert/update at all.
  Any idea? Is it a bug or I just miss something?</p>
  
  <p>UPDATE: Latest connector/j - v5.1.26</p>
  
  <p>UPDATE2: Java code</p>
  
  <pre><code>    int ans1 = 0;
      int ans2 = 0;
      try {
          java.sql.Connection c = DbConnector.getConn();
  
          Statement s = c.createStatement();
          ans1 = DbConnector.execute("INSERT INTO `Items` (`id`,`parent_id`,`name`) VALUES (123,9990635,null) ON DUPLICATE KEY UPDATE `id` = `id`, `parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`);");
          ans2 = DbConnector.execute("INSERT INTO `Items` (`id`,`parent_id`,`name`) VALUES (123,9990635,null) ON DUPLICATE KEY UPDATE `id` = `id`, `parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`);");
          s.close();
      } catch (Exception e) {
          e.printStackTrace();
      }
      System.out.println(ans1);
      System.out.println(ans2);
  </code></pre>