title: OUT or INOUT argument 1 for routine xxx is not a variable or NEW pseudo-variable in BEFORE trigger
body: <p>Can't find the solution.
  I'm having the following stored procedure:</p>
  
  <pre><code>CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_process_upload_log`(
  inout prm_upload_id int,
  prm_location_id integer,
  prm_week_start integer,
  prm_error_code integer,
  prm_last_attempt_date integer,
  prm_error_log_url varchar(256))
  BEGIN 
  select null from dual;
  -- real impementation is ommited, it's not an issue, im sure
  end
  </code></pre>
  
  <p>and corresponing php code:</p>
  
  <pre><code>  function update_log($conn, $upload_id, $location_id, $errcode, $att_date, $err_url) {
      $week = 1;
      $sql = "call sp_process_upload_log (:p0,:p1,:p2,:p3,:p4,:p5);";
      try {
        $stmt = $conn-&gt;prepare($sql);
        $stmt-&gt;bindParam(':p0', $upload_id, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 4000); 
        $stmt-&gt;bindValue(':p1', $location_id); 
        $stmt-&gt;bindValue(':p2', $week); 
        $stmt-&gt;bindValue(':p3', $errcode); 
        $stmt-&gt;bindValue(':p4', $att_date); 
        $stmt-&gt;bindValue(':p5', $err_url); 
  
          if ( ! $stmt-&gt;execute() ) {
            post_msg ("PDO Error: ".var_dump($stmt-&gt;errorInfo())."\n");
            return false;
          }
       } catch (PDOException $e) {
         post_msg ("Exception: " . $e-&gt;getMessage() . "\n");
         return false;
      }
      return $upload_id;
    }
  
  //$conn variable is assigned with db connection resource properly
    $upload_id = update_log($conn, false, 1, false, time(), "someurl");
  </code></pre>
  
  <p>It fails with the error:</p>
  
  <pre><code>array(3) {
    [0]=&gt;
    string(5) "42000"
    [1]=&gt;
    int(1414)
    [2]=&gt;
    string(125) "OUT or INOUT argument 1 for routine hex_tvdb.sp_process_upload_log is not a variable or NEW pseudo-variable in BEFORE trigger"
  }
  </code></pre>
  
  <p>Even when trying to call for that stored procedure in MySQL Query Browser getting the same error.</p>