title: Stored procedure returns incorrect values
body: <p>My query returns correct values , but when i run the query as a stores procedure it returns incorrect results. this is my query which returns correct values</p>
  
  <pre><code>select imageId,imageVerified,isCoverImage,isDeleted,isProfileImage,path,profileId
   from images  where profileId = 5;
  </code></pre>
  
  <p>and when i run this stored procedure, it is returning all rows and shows profieId as the passed in profileId , this is my stored procedure</p>
  
  <pre><code>CREATE DEFINER=`root`@`localhost` PROCEDURE `getImagesForUser`(in profileId long)
  BEGIN
      select imageId,imageVerified,isCoverImage,isDeleted,isProfileImage,path,profileId
      from images  where profileId = profileId;
  END
  </code></pre>
  
  <p>this is how i call the procedure</p>
  
  <pre><code>CALL `tfm`.`getImagesForUser`(5);
  </code></pre>
  
  <p>Please see the screenshots </p>
  
  <p>screenshot for query
  <a href="https://i.stack.imgur.com/K6a4j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K6a4j.png" alt="screenshot for query"></a></p>
  
  <p>this is the incorrect result from stored procedure</p>
  
  <p><a href="https://i.stack.imgur.com/id2eC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/id2eC.png" alt="incorrect result from stored procedure"></a></p>
  
  <p>you can see, mysql says all the images belongs to profileId 5 , which i passed in.
  What is wrong with my stored procedure</p>