title: How to handle session value interpretation in MySQL
body: <p>I have a following schema.</p>
  
  <pre><code>DROP TABLE IF EXISTS REF_CONNECTION1;
  CREATE TABLE  REF_CONNECTION1 (
    BPIN INT(11) DEFAULT NULL,
    RIN INT(11) DEFAULT NULL,
    SRC_RIN INT(11) DEFAULT NULL,
    PRIMARY KEY (BPIN,RIN,SRC_RIN)
  );
  
  INSERT INTO REF_CONNECTION1 VALUE(14,1,2);
  INSERT INTO REF_CONNECTION1 VALUE(14,1,3);
  INSERT INTO REF_CONNECTION1 VALUE(14,1,4);
  INSERT INTO REF_CONNECTION1 VALUE(14,1,5);
  INSERT INTO REF_CONNECTION1 VALUE(14,1,6);
  INSERT INTO REF_CONNECTION1 VALUE(14,1,7);
  
  SET @S1 = '2,3,4';
  
  SELECT * FROM REF_CONNECTION1 WHERE SRC_RIN IN (@S1);
  </code></pre>
  
  <p>Result Set is giving only 1 row, but it should have given 3 rows. I am understanding why it is happening because it is actually converting to following query</p>
  
  <pre><code>SELECT * FROM REF_CONNECTION1 WHERE SRC_RIN IN ('2,3,4');
  </code></pre>
  
  <p>But I want it to look like following query.</p>
  
  <pre><code>SELECT * FROM REF_CONNECTION1 WHERE SRC_RIN IN (2,3,4);
  </code></pre>
  
  <p>How can I do this? Any help is highly appreciated.</p>