title: mysql regexp query hangs, but displays results when mysql process restarts
body: <p>I have two tables. Table1 is 10mil rows, Table2 is 1mil rows. I need to search Table2 with regexp and then join the tables. </p>
  
  <p>When I do:</p>
  
  <pre><code>SELECT * FROM table2
  LEFT JOIN table1 
  ON table1.ID1=table2.ID2 
  WHERE table2.column REGEX 'regexp'
  </code></pre>
  
  <p>the query never finishes. </p>
  
  <p>However, when I kill mysqld process, it displays the results (in PHPMyAdmin) and the execution time displayed is just 0.07 sec. </p>
  
  <p>If I use LIKE instead of REGEXP, there is no problem, neither is there problem if I use REGEX on table2 alone. </p>
  
  <p>ID1 &amp; ID2 are indexed. If I EXPLAIN the select, it shows the keys are used.</p>
  
  <p>Any idea, what's wrong?</p>