title: Check if row exists using Mysql store procedure not working
body: <p>At mysql command prompt, I run:</p>
  
  <pre><code>SELECT EXISTS (SELECT 1 FROM test1 WHERE name1 like '%Nadiya%')
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>EXISTS (SELECT 1 FROM test1 WHERE name1 like '%Nadiya%')
  1
  </code></pre>
  
  <p>but following procedure doesn't print as Exists. I need to get inside IF statement.
  Please let me know what change could get me inside IF.</p>
  
  <pre><code>DELIMITER //
  CREATE PROCEDURE verifyAndUpdate30(in searchName  varchar(12), in searchId   bigint, inout result int)
  BEGIN
      IF ( SELECT EXISTS (SELECT 1 FROM test1 WHERE name1 like '%searchName%') ) THEN 
          SELECT 'EXISTS';
          UPDATE TEST SET testFlag=1 WHERE id=searchId;
          SET result=1;
      ELSE
          SELECT 'DOES NOT EXISTS';
      END IF; 
  
      SELECT result;
  END 
  //
  DELIMITER ;
  </code></pre>
  
  <p>Call to procedure:</p>
  
  <pre><code>SET @increment = 0;
  call verifyAndUpdate30('Nadiya', 5532, @increment);
  </code></pre>