title: MySQL issue: LEFT JOIN on empty table
body: <p>Given a database with two tables <code>X</code> and <code>Y</code>, I have a query that should <code>LEFT JOIN</code> the two tables on attributes <code>X.a1</code> and <code>Y.b1</code>.  I used the following query:</p>
  
  <pre><code>SELECT X.a1, X.a2, Y.b1, Y.b2 FROM X LEFT JOIN Y ON (X.a1 = Y.b1)
  </code></pre>
  
  <p>I thought that would be good enough to work, even if <code>Y</code> is currently an empty table.  However, the query breaks because table <code>Y</code> is empty, it seems.  Is there any way to reformat this query so that even if <code>Y</code> is an empty table, the <code>LEFT JOIN</code> will not break?  Or do I just need to always make sure that there is some data in table <code>Y</code>, even if it doesn't match anything in table <code>X</code> (hence the <code>LEFT JOIN</code>).</p>