title: Java: Callablestatement.prepareCall turns CALL in SELECT
body: <pre><code>String call = "{?= CALL Proc(?)}";
  
  CallableStatement cs = conn.prepareCall(call);
  
  cs.registerOutParameter(1, Types.DECIMAL, 0);       
  cs.setString(2, "String");
  System.out.println(cs);
  
  cs.execute(); // &lt;-- ERROR
  </code></pre>
  
  <p>First line of simple MySQL procedure: </p>
  
  <pre><code>CREATE DEFINER=`dev`@`11.22.33.44` PROCEDURE `Proc`(IN `login` VARCHAR(255), OUT `var` DECIMAL(20,2) 
  </code></pre>
  
  <p>.prepareCall turns my CALL into a SELECT (my guess) which mysql considers a Function and gives me a error: </p>
  
  <pre><code>com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION Proc does not exist
  </code></pre>
  
  <p>The System.out gives me:</p>
  
  <pre><code>com.mysql.jdbc.JDBC4CallableStatement@38d060ac: SELECT Proc('flavi')
  </code></pre>
  
  <p>How can I properly call this procedure?</p>