title: Transfer mysql binary log into select in CDC
body: <p>I would like to do a real time reading from mysql.
  The idea is simple. I use the binary log to trigger the select statement.
  Meanwhile I'd like to read only the new rows on every change.
  And currently I just consider insert.</p>
  
  <p>So when someone do</p>
  
  <pre><code>insert into sometable(uid,somecolumn) values(uid,something)
  </code></pre>
  
  <p>My code will be triggered and do</p>
  
  <pre><code>select from sometable where uid=uid
  </code></pre>
  
  <p>Of course I have already written down which columns are the primary key because it seems no information from binlog.</p>
  
  <p>I cannot find a tool to analysis mysql insert statement. So I use the regex to find out which column equals which value, then extract primary keys.</p>
  
  <p>BUT the real problems what will happen if I do</p>
  
  <pre><code>Insert into `table` (`col`) values (select 0 as `col` from `dummy`);
  </code></pre>
  
  <p>How can I find out the col=0?</p>
  
  <p>Is it impossible that make a select statement that select the new changed rows, triggered by the insert statement?</p>