title: mysql, space equals empty string
body: <p>Just took me 2 hours to troubleshoot an issue on my backend.</p>
  
  <p>Cause was that of empty string being equal to space:</p>
  
  <pre><code>SELECT ' ' = '';
  -&gt; 1
  
  SELECT STRCMP(' ', '');
  -&gt; 0 /* means equal */
  </code></pre>
  
  <p>Interestingly enough,</p>
  
  <pre><code>SELECT '' REGEXP '[ ]';
  -&gt; 0
  SELECT '' REGEXP ' ';
  -&gt; 0
  SELECT ' ' REGEXP ' ';
  -&gt; 1
  </code></pre>
  
  <p>Can I prevent this? Is it a setting?</p>